feat(research): download original canonical run results (RP08)

This commit is contained in:
Boki 2026-10-27 12:34:15 -04:00
parent 8e9d0cf619
commit e8a6b70968
8 changed files with 245 additions and 13 deletions

View file

@ -11,3 +11,5 @@ Ownership: one frontend agent owns the result action, minimal shared download he
Acceptance/tests: a downloaded file deep-equals the displayed canonical API result, including decimal amounts, null reasons and full original provenance. Distinct run IDs produce the corresponding filenames and contents; failed Blob/click work creates no success and releases resources. Downloading does not fetch, save settings, create runs or mutate the result. Preserve RP07 cancellation/raw-text semantics. Chromium reopens an original native run after changing its editable template, downloads the result and compares the complete JSON with that original API response; run/dispatch counts remain unchanged. Existing run-selection tests remain the identity gate; do not add a competing result validator or async loader.
Gates: focused result/download UI tests, authored-test/application types, strict lint, production build, root full repository check and Chromium workbench. Document that the JSON is analysis evidence, not a standalone replay archive: dataset bars and engine binaries are separate, and retained strategy JavaScript is data, not automatically executed. No candidate approval, research execution, paper/live activation or performance work.
Accepted October 27, 2026. Independent review and implementer checks passed 64 focused tests / 457 assertions. Root full repository check passed, including 1,320 integration and 150 Rust tests. Final Chromium suite passed all 21 scenarios / 726 assertions, comparing the actual downloaded result with its original API response after template changes and checking no extra API requests/writes. The repeated archive-fixture shutdown failure was addressed by returning its WebSocket upgrade synchronously; HTTP handling and teardown checks remain unchanged, with authored types and full browser suite passing. [Evidence](../../real-data-research.md) records the initial failure and final gates; [usage](../../../guide/backtest-walkthrough.md#take-the-result-into-a-notebook-or-local-ai-workflow) covers local inspection and replay limitations.