IOS-099 · Дефект · Инфраструктура · ios
Deep Research: complete отдаёт reportId, но отчёт отсутствует в readback тетради
Закрыт
P1 · важно
ведёт: —
Лента
2026-08-02T19:31:02.434Z · fc-fixfc-fix IOS-099 proof/fix
FACT:
- ONEPAGE-2 stream complete returned report source IDs:
- documents: deep-research-report:deep-research:92eca736-f061-4533-9974-df846a5baac9
- web: deep-research-report:deep-research:1eed8de9-321a-4bf2-9959-536168ed1b51
- both: deep-research-report:deep-research:2c49b955-f546-4dd2-89b2-d36fa228d7a4
- Prod readback probes with the same ONEPAGE-2 cookie jar:
- GET /api/deep-research/reports* -> 404
- GET /api/notes?notebookId=onepage2-20260802185417-gmbo5o -> 404
- GET /api/documents?notebookId=onepage2-20260802185417-gmbo5o -> 404
- GET /api/sync -> notebook has sourceCount=1, notes=0, corpora=[], only original TXT source.
ROOT CAUSE:
- /api/deep-research/run normalized client saveTarget down to reportSourceId only.
- runDeepResearch emitted saving/complete and called processDocument(sourceId, reportContent, ...), but never created/upserted a Notebook Source row. UI client addSource could mask this in browser state, but API/server readback had nothing durable.
FIX:
- Added trusted server save target: notebookId/corpusId are resolved and canEdit-gated in route before provider work.
- Web save uses saveTarget.notebookId -> generated:notebook:<notebookId>.
- Documents/both infer notebook from selected sourceIds, reject mismatched save targets, and preserve single-corpus Generated targets.
- runDeepResearch now upserts Generated Corpus + Source before complete with marker IOS-099_DEEP_RESEARCH_SOURCE_PERSISTED.
ARTIFACT:
- /Users/milamarty/Downloads/FC-FIX-099.patch
- verify.json: /Users/milamarty/.agent_runs/IOS-099/verify.json
PROOF:
- ./node_modules/.bin/tsx --test src/lib/deepResearch/__tests__/requestBody.test.ts src/app/api/deep-research/run/__tests__/route.test.ts -> exit 0, 24 pass
- ./node_modules/.bin/eslint changed files -> exit 0
- git diff --check -> exit 0
- git apply --check /Users/milamarty/Downloads/FC-FIX-099.patch on clean synthetic base -> exit 0
- tsc full baseline still RED (1148 pre-existing errors); grep for changed files in /tmp/ios099-tsc.log returned no matches.
2026-08-02T20:27:02.358Z · backup-opusЗАКРЫТ на v4-cfd63d1: DR-ран с saveTarget.notebookId → отчёт сохранён в corpus generated:notebook:<id> (коллекция Generated) и виден в readback тетради (живой пруф qa-dr99d 21:26). UI шлёт saveTarget из researchActions (в составе фикса).
Воркер
не привязан — привязать:
curl -X POST https://bugs.wool2.online/api/ios/assign -H 'content-type: application/json' \
-d '{"issueId":"IOS-099","session":"<имя tmux-сессии>","host":"m4"}'
Обновлён
2026-08-02T20:27:02.267Z