feat(research): download exact saved revisions (RP26)

This commit is contained in:
Boki 2026-10-27 23:11:22 -04:00
parent 6ce3b68b3d
commit 5434950263
7 changed files with 320 additions and 3 deletions

View file

@ -154,6 +154,19 @@ the normal preview and confirmation steps.
4. Run **cost sensitivity** on the selected configuration and compare ordinary experiments with compatible inputs. Save findings with explicit run/report references.
5. Reopen those saved IDs to inspect or reproduce the work. The browser is the normal research interface; authorized AI clients use the same backend capabilities with separate grants and budgets.
Open a hypothesis, note or finding and choose **Download saved revision** to take its
narrative and citations into local analysis. When viewing history, the file contains that
exact older revision. While editing, it exports the saved version and leaves your draft
untouched. Archived entries can still be downloaded.
The file `research-<entryId>-<revisionId>.json` has `kind: "research-revision-export/v1"`,
`projectId`, an `entry` identity/kind (including an artifact's linked hypothesis-revision
ID), and the complete saved `revision`. Authorship, source/report hashes, raw cited values,
unavailable reasons and limitations are preserved. Downloading uses the loaded record and
makes no additional API request. A local failure offers **Retry saved revision download**.
Pair it with the separate run-result and dataset files above for notebook or AI analysis.
The file is an analysis record; replay uses the retained execution path.
Useful entry points are [ResearchProjectPage](../../apps/stock/web-app/src/features/research/ResearchProjectPage.tsx), [ExperimentDetailPage](../../apps/stock/web-app/src/features/experiments/ExperimentDetailPage.tsx), [ChronologicalValidationDetailPage](../../apps/stock/web-app/src/features/experiments/ChronologicalValidationDetailPage.tsx), and [WalkForwardDetailPage](../../apps/stock/web-app/src/features/experiments/WalkForwardDetailPage.tsx).
The [AI research-cycle example](../../scripts/examples/research-cycle.ts) submits prepared candidate packages, bounded searches, held-out validation and cost studies, then creates evidence-linked findings. It records request intents and receipts for recovery. It does not independently generate code, supply a model SDK or activate trading; AI-written findings remain distinguishable from validated results.