feat(research): reproduce retained canonical runs with economic comparison

This commit is contained in:
Boki 2026-10-24 10:02:21 -04:00
parent e3bd708838
commit 30accfcf43
31 changed files with 2969 additions and 28 deletions

View file

@ -1,8 +1,8 @@
# Revised development roadmap
Baseline `b7aeca4` · execution 2026-10-24 · **R03 committed; R04 workspace validated and awaiting acceptance/commit**
Baseline `b7aeca4` · execution 2026-10-24 · **R04 committed; R12 original reproduction validated and awaiting acceptance/commit**
Authorization update: the owner requested “commit and continue”. R03 is committed as `ee45257`; R04 is implemented under ADR-006. Performance work remains paused. New R04 commits, pushes, PRs and trading/default-engine operations remain outside this continuation’s scope.
Authorization update: the owner requested “how far are we in the backlog, also commit and continue”. R04 is committed as `e3bd708`; R12 is implemented under ADR-006 using the accepted retained-input R05 component. **33/45 scheduled tasks are committed; R12 is the next validated task.** Full R05 remains partial. Performance work remains paused. New R12 commits, pushes, PRs and trading/default-engine operations remain outside this continuation's scope.
## Strategy and review outcome
@ -568,3 +568,18 @@ The initial sandbox check stalled on native-worker IPC; permitted checks passed.
No backend financial authority, second evidence store or creation-receipt framework was added. Initial metadata creation still cannot guarantee exactly-once semantics across an ambiguous response; the UI makes this explicit. No performance work, new-wave commit, push, PR, candidate execution, default/multi-asset activation or trading operation occurred.
**Recommended next product slice: R12 original-run reproduction**, limited to already-retained inputs and a supported installed build. The current manifest still blocks R12 on full R05. Before implementation, record its narrower component prerequisite and pin lineage/admission/current-approval rules; migration 19 presently binds ordinary admission to current template settings, so snapshot copying alone is insufficient. Keep R05 incomplete, R06/S06 gated, and historical build provisioning/source preparation outside that slice.
## Twenty-sixth-wave handoff — 2026-10-24
R04 is accepted and committed as `e3bd708`. R12 is independently reviewed and `validated_uncommitted`. Twenty-six implementation/test files add original reproduction through the existing durable runner, retained artifacts and financial engine. Backend/frontend agents used disjoint worktrees under `/tmp/stock-bot-wave26.38tu9A/`; root owned shared contracts, comparison, migrations/fixtures and browser integration.
- **Original versus current:** the run detail previews the original dataset, immutable strategy version, parameters, financial policies and build. Reproduce original creates a new linked run; ordinary submission continues to use current template settings. Missing inputs or unsupported builds remain explicit, with old results readable.
- **Guarded admission:** authenticated preview/POST/comparison routes preserve the original economic request. Only new run/session/account identities and current approval of the original version change. Migration 21 enforces immutable lineage, retained identity and source-copy guards. Accepted idempotency receipts precede current eligibility checks; no provider or current-code fallback.
- **Comparison:** versioned server-side hashes cover the complete validated request, Rust financial envelope and canonical analytics. Normalize only admission identity; retain actual market sessions, owner/order/fill IDs, monetary strings, null reasons and ordered arrays. No second accounting implementation.
- **UI reliability:** ambiguous submissions retain the same intent/key; late responses cannot navigate away from a newer selection. Lineage and match/mismatch diagnostics survive reload. The existing controls test now restores its own ResizeObserver harness correctly.
- **Validation:** full repository check passed, including **662 integration and 150 Rust tests** (4 manual Rust ignored), build/source/contracts/secrets/lint and 93 tooling/43 utility/44 calculation tests. Full PostgreSQL/Redis: **169 tests / 1376 assertions**. Chromium: **9 workflows / 215 assertions**, including actual original-versus-current execution and receipt replay. Focused SQL: **10 / 97**; independent UI: **106 / 555**; independent HTTP/hash: **10 / 96**. Strict changed-test types, scoped lint/format and diff checks passed.
- **Recorded identity:** source archive/hash and all 26 authored file hashes are in `manifest.json` → `twenty_sixth_wave_validation`. Release addon SHA256 `ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103` matches the previous wave; no Rust semantics changed. Both exact disposable test containers were stopped; development services were untouched.
Scope is completed retained canonical single-asset trusted built-ins on the same installed build. Hash agreement proves matching retained economic outputs, not statistical validity or profitability. Historical executable provisioning, provider-to-v2 preparation, candidate isolation and multi-asset/default cutover are not included. R05 remains partial; R06/S06 remain blocked. No performance optimization, profiling, benchmark, new-wave commit, push, PR or trading operation occurred.
**Recommended next wave:** an R06 retained-input experiment component, then a focused R07 sweep UI against pinned APIs. One immutable strategy version, eligible single-asset dataset, installed build and fixed policies; deterministic bounded parameter grids expand into the existing durable runs/outbox. Independent review confirms provider preparation is not required for those retained inputs. Before execution, record component prerequisites without marking full R05/R06 complete or silently releasing R06/R07/S06. Experiment admission needs its own SQL guard against the immutable manifest; do not mutate templates per trial or misuse reproduction lineage. Failed retry must preserve diagnostics and fencing; if omitted initially, leave R06 partial. No parallel worker scheduler or performance work. Root owns contracts/browser integration; one backend owner and one frontend owner can work with an independent reviewer.

View file

@ -1,6 +1,6 @@
# Canonical development backlog
**First twenty-four waves committed; R04 is validated and uncommitted.** R03 is accepted as `ee45257`. The workspace now connects projects, revisioned narratives, linked strategies and exact saved-run findings through the existing APIs. Broader R05 remains in progress. Performance work remains paused. See [current handoff](../ROADMAP.md#twenty-fifth-wave-handoff--2026-10-24) and manifest execution scope.
**First twenty-five waves committed; R12 is validated and uncommitted.** R04 is accepted as `e3bd708`. Original-run reproduction now preserves retained inputs independently of current settings, with lineage, repeat-safe submission and economic comparison. **33 of 45 scheduled tasks are committed (73% by count); R12 adds one validated task awaiting acceptance/commit.** Broader R05 remains in progress. Performance work remains paused. See [current handoff](../ROADMAP.md#twenty-sixth-wave-handoff--2026-10-24) and manifest execution scope.
## One source of truth
@ -75,7 +75,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
| [R01 Persist immutable strategy versions and parameter schemas](tasks/R01.md) | P1 / done | O01, ADR-006 | — | Full-stack research product / M |
| [R02 Deliver strategy catalog and version-aware backtest setup](tasks/R02.md) | P1 / done | R01, W03, ADR-006 | W04 | Full-stack research product / M |
| [R03 Add projects, hypotheses and evidence-linked findings APIs](tasks/R03.md) | P1 / done | R01, R10, ADR-006 | — | Full-stack research product / M |
| [R04 Deliver research workspace and save-findings flow](tasks/R04.md) | P1 / review | R03, W02, ADR-006 | W04 | Full-stack research product / M |
| [R04 Deliver research workspace and save-findings flow](tasks/R04.md) | P1 / done | R03, W02, ADR-006 | W04 | Full-stack research product / M |
| [R05 Freeze complete provenance and cut over durable canonical runs](tasks/R05.md) | P0 / in_progress | F08, S02, R01, R10, D01, W03, C06, ADR-006 | Multi-asset default mark-policy disposition | Full-stack research product / M |
| [R06 Create immutable experiments and bounded sweep expansion](tasks/R06.md) | P1 / blocked | R05, ADR-006 | — | Full-stack research product / M |
| [R07 Deliver sweep configuration and comparable-result views](tasks/R07.md) | P1 / blocked | R06, ADR-006 | W04 | Full-stack research product / M |
@ -83,7 +83,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
| [R09 Expose validation, cost and regime evidence in the workbench](tasks/R09.md) | P1 / blocked | R07, R08, ADR-006 | S05 when Regime comparison is enabled; R03 when Saving or linking a research finding is enabled | Full-stack research product / M |
| [R10 Protect retained research evidence and artifact integrity](tasks/R10.md) | P1 / done | R01, ADR-006 | — | Full-stack research product / M |
| [R11 Select and reuse frozen datasets in the workbench](tasks/R11.md) | P1 / done | D01, O01, ADR-003, ADR-006 | W04 | Full-stack market data/research / M |
| [R12 Reproduce an original run separately from rerunning current settings](tasks/R12.md) | P1 / blocked | R05, W04, ADR-006 | — | Full-stack reproducible research / S |
| [R12 Reproduce an original run separately from rerunning current settings](tasks/R12.md) | P1 / review | Accepted R05 retained-input component; W04/R01/R10/F08/S02/D01/W03/C06, ADR-006 | — | Full-stack reproducible research / S |
### E7 — Measured research throughput
@ -118,4 +118,4 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
Before any wave: unique IDs; existing task/ADR references; acyclic implementation graph; no scheduled task dependent on merged/deferred work; approvals/readiness; actual file locks; isolated native build outputs/workspace dependencies and test databases. Release gates are checked separately at activation.
R03 is committed; R04 awaits acceptance/commit after independent review and full integration/browser checks. R12 original-run reproduction is the recommended next product slice, but its current manifest dependency on full R05 remains blocked. Before execution, explicitly scope it to retained, single-asset, same-installed-build inputs and pin guarded reproduction admission without weakening current authorization. R05 source preparation and broader cutover remain incomplete; R06/S06 are not unblocked. Performance and multi-asset/default/paper activation remain excluded.
R04 is committed; R12 awaits acceptance/commit after independent review and full repository/PostgreSQL/browser checks. R12 uses the accepted retained-input R05 component, not full R05 completion. Recommended next: an R06 retained-dataset experiment component and focused R07 UI after the planning owner records narrower prerequisites. Provider preparation is independent of sweeps over already eligible retained data. R05 broader cutover remains incomplete; R06/S06 are not unblocked. Performance and multi-asset/default/paper activation remain excluded.

View file

@ -160,7 +160,14 @@ flowchart TD
ADR003 --> R11
ADR006 --> R11
W04 -. release only .-> R11
R05 --> R12
%% R12 also requires R05's accepted retained-input component (618fb9e), not full cutover.
R01 --> R12
R10 --> R12
F08 --> R12
S02 --> R12
D01 --> R12
W03 --> R12
C06 --> R12
W04 --> R12
ADR006 --> R12
F07 --> P03

View file

@ -1,14 +1,14 @@
{
"schema_version": 1,
"plan_revision": "2026-10-24.54",
"plan_revision": "2026-10-24.56",
"repository_base": "b7aeca4",
"plan_status": "twenty_fifth_wave_validated_uncommitted",
"plan_status": "twenty_sixth_wave_validated_uncommitted",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "User: commit and continue after validated R03 handoff naming R04; R03 committed ee4525750741a314cbaaaf9f316b114c10dfd846.",
"tasks": ["R04"],
"authorized_by": "User: how far are we in the backlog, also commit and continue after R04 handoff naming original reproduction; R04 committed e3bd708838ce17a4da0bc2b4d6be701b72625dd8",
"tasks": ["R12"],
"permissions": [
"R04 research workspace, saved-result finding UI, browser/interaction tests, isolated implementation and independent review"
"Scoped same-installed-build retained canonical single-asset reproduction; independent implementation/review, fixtures and validation"
],
"excluded": [
"performance_profiling_or_optimization",
@ -23,7 +23,7 @@
"multi_asset_activation",
"other_backlog_tasks",
"AI_execution_or_credentials",
"R03_backend_or_financial_contract_changes_without_demonstrated_need"
"historical_binary_provisioning"
],
"pending_policy_decisions": [
"ADR-007",
@ -1238,7 +1238,7 @@
"epic": "E6",
"priority": "P1",
"severity": "High",
"status": "review",
"status": "done",
"dependencies": ["R03", "W02"],
"decision_dependencies": ["ADR-006"],
"task_file": "backlog/tasks/R04.md",
@ -1250,10 +1250,10 @@
"assignment": "/root",
"branch": null,
"pull_request": null,
"completed_commit": null,
"completed_commit": "e3bd708838ce17a4da0bc2b4d6be701b72625dd8",
"blocker": null,
"release_gates": ["W04"],
"integration_state": "validated_uncommitted",
"integration_state": "validated_committed",
"integration_base": "ee4525750741a314cbaaaf9f316b114c10dfd846",
"worktree": "/home/boki/repos/stock-bot",
"implementation_slices": [
@ -1514,8 +1514,8 @@
"epic": "E6",
"priority": "P1",
"severity": "High",
"status": "blocked",
"dependencies": ["R05", "W04"],
"status": "review",
"dependencies": ["W04", "R01", "R10", "F08", "S02", "D01", "W03", "C06"],
"decision_dependencies": ["ADR-006"],
"task_file": "backlog/tasks/R12.md",
"findings": ["WEB-03", "WEB-04", "KEEP-02"],
@ -1523,12 +1523,41 @@
"specialization": "Full-stack reproducible research",
"write_locks": ["web-backtest-service", "web-backtest-detail"],
"parallel_policy": "Allowed only with satisfied dependencies/approvals and disjoint write locks AND actual files; see agents/integration.md.",
"assignment": null,
"assignment": "/root",
"branch": null,
"pull_request": null,
"completed_commit": null,
"blocker": null,
"release_gates": []
"release_gates": [],
"integration_state": "validated_uncommitted",
"integration_base": "e3bd708838ce17a4da0bc2b4d6be701b72625dd8",
"worktree": "/home/boki/repos/stock-bot",
"satisfied_component_dependencies": [
{
"task": "R05",
"scope": "Accepted retained-input single-asset canonical durable runner/provenance slice only; source preparation/default cutover not required",
"commit": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94"
}
],
"implementation_slices": [
{
"owner": "/root",
"scope": "Shared DTO/comparison projection, migration fixture integration, browser and planning"
},
{
"owner": "/root/r12_backend",
"worktree": "/tmp/stock-bot-wave26.38tu9A/backend",
"scope": "Admission/API/migration21 and focused SQL/HTTP tests"
},
{
"owner": "/root/r12_frontend",
"worktree": "/tmp/stock-bot-wave26.38tu9A/frontend",
"scope": "Reproduction preview/retry/lineage/comparison UI and DOM tests"
}
],
"reviewed_by": "/root/r04_review",
"review_notes": "Independent backend/SQL/hash and frontend review accepted. Root full repository, PostgreSQL and Chromium gates passed. Original retained inputs remain independent of mutable template settings; current approval, immutable lineage and repeat-safe receipts remain enforced.",
"verification_reference": "ROADMAP.md#twenty-sixth-wave-handoff--2026-10-24"
},
{
"id": "P01",
@ -6330,7 +6359,7 @@
"R05 remains partial, R06/S06 remain gated; performance and AI/trading activation remain excluded."
],
"twenty_fifth_wave_validation": {
"state": "validated_uncommitted",
"state": "validated_committed",
"log_directory": "/tmp/stock-bot-wave25.X7zzoe",
"integration_base": "ee4525750741a314cbaaaf9f316b114c10dfd846",
"source_archive": "/tmp/stock-bot-wave25.X7zzoe/r04-integrated-source.tar",
@ -6403,6 +6432,98 @@
"Chromium only; existing build bundle-size/Rust warnings remain."
],
"cleanup": "Both exact --rm PostgreSQL/Redis fixture containers stopped successfully. All 17 authored source/test hashes reverified; worktrees and logs retained. Development/production services and data untouched.",
"next": "Recommend a scoped R12 same-installed-build original-run reproduction slice after explicitly recording dependence on the accepted R05 retained-input component and pinning guarded reproduction admission/approval. R12 remains blocked in the manifest until that planning step; keep full R05 in progress and R06/S06 gated."
"next": "Recommend a scoped R12 same-installed-build original-run reproduction slice after explicitly recording dependence on the accepted R05 retained-input component and pinning guarded reproduction admission/approval. R12 remains blocked in the manifest until that planning step; keep full R05 in progress and R06/S06 gated.",
"completed_commit": "e3bd708838ce17a4da0bc2b4d6be701b72625dd8"
},
"twenty_sixth_wave": ["R12"],
"twenty_sixth_wave_base": "e3bd708838ce17a4da0bc2b4d6be701b72625dd8",
"twenty_sixth_wave_notes": [
"Root narrowed R12 to accepted R05 retained-input component after independent code review; R05 remains partial and R06/S06 blocked.",
"Reproduction preserves frozen economic inputs, current original-version approval and repeat-safe receipts. No current-template dependency or historical executable manager."
],
"twenty_sixth_wave_validation": {
"state": "validated_uncommitted",
"log_directory": "/tmp/stock-bot-wave26.38tu9A",
"integration_base": "e3bd708838ce17a4da0bc2b4d6be701b72625dd8",
"source_archive": "/tmp/stock-bot-wave26.38tu9A/r12-integrated-source.tar",
"source_archive_sha256": "61ceb44bf8aa10a93e160f0ad7c8964748ae548c06a07b6954e5018688e0927a",
"source_file_count": 26,
"source_sha256": {
"apps/stock/config/src/contracts/canonical-research.ts": "d18421e275cd90d98cf05f352f7f6858580cb7cdc26124b535bfc45518521714",
"apps/stock/web-api/src/migrations/migration-runner.ts": "c4105e10b612ad1fa186f66714bb31318d4c70fab5a50229a66f7f96432b3853",
"apps/stock/web-api/src/routes/backtests-v2.routes.ts": "499a6b53c2dffedb341cbcb9b51339ab9e113584f074eb2ea92dadf2833f09a4",
"apps/stock/web-api/src/services/backtest-v2.service.ts": "76f02ff5dd60cd4b70718a2cf3703092b4f2cccb579b65c851524f4030706532",
"apps/stock/web-api/src/services/reproduction-comparison.ts": "5bde63cb6922f396ae53d5c4817c651f0a20d014deed1d9ea6d7a082c426537b",
"apps/stock/web-api/src/services/run-reproduction.ts": "02690bf2e001a6495413700aa1fcfc2accac7d12aee4369aedd5b25c10fe6ce5",
"apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx": "96f4bcbc3024d9713dc9585b8afccc058c69bcee6f715fa486ac2911b0bbb92d",
"apps/stock/web-app/src/features/backtest/components/RunReproduction.tsx": "b23f235049f9c80a317b8ca38202cd1857ea460bc9b5e009d6926e1de21bdef1",
"apps/stock/web-app/src/features/backtest/services/backtestApiV2.ts": "23d8a64fac4fcc3254166f1457a3b9f1c20d81d7b379c469b5171f51efabeea9",
"database/postgres/init/21-run-reproduction.sql": "25d6f8f6bc23666d01f104be0e1c625822450c0c08b1c2ffaa31915d2b88c6cb",
"test/e2e/fixture.ts": "7ce1d95bc95a583cd937e036d9f584149af938515d1c588dbbd952a1b5a6f295",
"test/e2e/workbench.test.ts": "d19fa08c6a8a01e3fc9e66065a1e108816bae79c3c70a11d6457321f6b3e5a7c",
"test/integration/backtest-run-controls.test.tsx": "ca9e33508bd825821fd8ade631dec8a622ed019ad20eb6ec13b6c9957d4f37e8",
"test/integration/reproduction-comparison.test.ts": "e3a61f53c2a79f553f4be234e0b07e761543354b7c617351a1e75fa6ee7cb4fd",
"test/integration/run-reproduction-api.test.ts": "108f72299cdce927694d476a98797f3039bda4c0ee5b34b76cf94023a23b7a65",
"test/integration/run-reproduction-ui.test.tsx": "c72e7a07b823f44f583cf30d9e393027293991619f336b1e6fba99bde17a3c58",
"test/postgres/canonical-durable-backtest.test.ts": "774f394ac61d32cef241b9ef7f2267b66bcb8feb072b2545da23f37f23e3c192",
"test/postgres/canonical-research.test.ts": "c87bf4453f53daf9872d70cb2475060d39b53dbd59f0c32c615eb6795d40b697",
"test/postgres/catalog-backtest-drafts.test.ts": "d47dd06f9a43dd36b15fe3f3649408cbcf89ca8a7e62c644dc32479d11098bd0",
"test/postgres/dataset-catalog.test.ts": "51c976c966ae0dc92f8b1395521c058a89eb0543f5efe5a6930109a4e3c9652a",
"test/postgres/durable-backtest.test.ts": "e42912c8c2f366abec9ac3104c3f2eb2a083dc03595374455c1d755a537e48fe",
"test/postgres/migration-runner.test.ts": "093eb76e2e718b3930dc4efb805cc97ce33cf262d590eb73a99fb3920d83286b",
"test/postgres/research-retention.test.ts": "805a7403e07bee0c3dff5bf4d8eefa61fcbea8daaa31f45d2bbbd7e61d10ec98",
"test/postgres/research-runtime-isolation.test.ts": "c58d461555ae07b47f599f9f99187a4ba36c22ed7ff05bb1b403dab317a4197a",
"test/postgres/research-workspace.test.ts": "620836176bddf0dc927a812217087372baa279890b754cfe297236037374a93c",
"test/postgres/run-reproduction.test.ts": "f357a08fa4333f4beacb6aef1b6169cdbe6278229d2eab9f54d460af207dec32"
},
"checks": [
{
"command": "CARGO_BUILD_JOBS=2 bun run check",
"log": "/tmp/stock-bot-wave26.38tu9A/check.log",
"outcome": "All repository checks passed: build/source/contracts/secrets/lint; 93 tooling, 43 utility, 44 calculation, 662 integration and 150 Rust tests (4 manual Rust ignored)."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:postgres",
"log": "/tmp/stock-bot-wave26.38tu9A/postgres.log",
"outcome": "169 tests / 1376 assertions passed across 19 files. Focused R12 PostgreSQL gate separately passed 10 tests / 97 assertions, including real native parity, concurrency, admission guards, migration upgrade and corruption/mismatch diagnostics."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:e2e",
"log": "/tmp/stock-bot-wave26.38tu9A/e2e.log",
"outcome": "9 Chromium workflows / 215 assertions passed. Real retained execution, template mutation, original-input preview/reproduction, duplicate receipt replay, economic hash match, reload/source lineage and separate current-settings execution; original results unchanged."
},
{
"command": "bunx tsc --project /tmp/stock-bot-wave26.38tu9A/tests-tsconfig.json --noEmit",
"log": "/tmp/stock-bot-wave26.38tu9A/integrated-types-final.log",
"outcome": "Strict changed/new tests and dependent sources passed after final browser assertions."
},
{
"command": "bunx eslint <new/changed scoped tests and comparison helper> --max-warnings 0; bunx prettier --check <changed TS/TSX>; git diff --check",
"log": "/tmp/stock-bot-wave26.38tu9A/scoped-lint-final.log",
"outcome": "Scoped lint, formatting and diff checks passed. Existing controls test received only its ResizeObserver harness ownership fix; unrelated existing test-file curly findings were not expanded into cleanup."
},
{
"command": "CARGO_BUILD_JOBS=2 bun run --cwd apps/stock/engine build:release",
"log": "/tmp/stock-bot-wave26.38tu9A/native-release.log",
"outcome": "Release addon restored after repository checks. SHA256 ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103 matches checkout release library and previous wave; no Rust changes."
}
],
"reviews": [
{
"reviewer": "/root/r04_review",
"scope": "Backend admission, SQL21 lineage/retained identity guards, complete economic hash projection, frontend intent/retry/late-response behavior and focused tests",
"outcome": "Accepted verified implementation hashes; independently ran combined 106 UI tests / 555 assertions and 10 HTTP/hash tests / 96 assertions. Root owns final integrated database/browser gates.",
"next_wave_note": "Independent reviewer confirms retained-dataset experiments do not technically require provider-to-v2 preparation. Existing R06/R07 dependencies remain blocked until the planning owner records a narrow component scope. Full R05 completion must not require A02 candidate execution, which would introduce a cycle through A01/R06."
}
],
"limitations": [
"Completed canonical retained single-asset trusted built-ins on the exact installed build only. Legacy, incomplete, missing/corrupt retained inputs and unavailable historical builds cannot be reproduced; existing results remain readable.",
"New reproduction requires active parent/original strategy family and latest approval of the original version. Accepted receipt retries return the same run even after eligibility changes. No execution permission is derived from old approval alone.",
"Hash equality is versioned deterministic economic-output comparison, not statistical validation or proof of strategy merit. Only admission identities are normalized; actual financial policies, market session IDs, ownership, ordered fills and null analytics are retained.",
"Full R05 remains incomplete; R06/S06 stay blocked. No source preparation, candidate execution, multi-asset/default activation, paper/live operation, historical binary manager, AI execution, performance work or benchmark runs.",
"Chromium only; existing build bundle-size/Rust warnings remain. No new-wave commit, push or PR."
],
"cleanup": "Both exact --rm PostgreSQL/Redis fixture containers stopped successfully. All 26 source/test hashes frozen; source archive, worktrees and logs retained. Development/production services and data untouched.",
"next": "Recommend an R06 retained-input experiment component using one immutable strategy version, eligible single-asset dataset, installed build and bounded parameter grid; a focused R07 UI component may follow pinned APIs. Before execution, explicitly record component prerequisites rather than treating full R05/R06 as complete. Reuse durable runs/outbox with guarded experiment admission; do not mutate templates per trial or misuse reproduction lineage. Keep provider preparation, candidate isolation, multi-asset/default cutover and performance work separately gated."
}
}

View file

@ -31,7 +31,7 @@ Write locks: web-backtest-service, web-backtest-detail. One agent owns this chan
## Dependencies and blockers
Implementation requires [R05](R05.md), [W04](W04.md) integrated.
Implementation requires the accepted retained-input/single-asset durable execution component of [R05](R05.md) (`618fb9e`), plus [W04](W04.md) and the integrated R01/R10/F08/S02/D01/W03/C06 prerequisites. Provider-to-v2 preparation and broader R05 cutover are independent; R05 remains incomplete. This component dependency was verified and recorded by the planning owner on 2026-10-24 under the owner's continuation authorization.
Architecture decisions: ADR-006. Agents may not independently amend their policies.
@ -65,3 +65,21 @@ Keep migrations additive and previous results readable. Do not add a switch that
## Handoff
Report scope changes (if any), fixture expectations, API/schema changes, measurements, remaining limitations and commit/PR references once authorized. Request independent review; only the integration/planning owner may mark the manifest done.
## Pinned execution scope — 2026-10-24
Reproduce completed retained canonical single-asset built-in runs on the exact installed worker/native/runtime build. Add immutable `original_run_id` lineage; use the existing durable runner, submission receipts and outbox. Missing/corrupt inputs or unsupported historical builds fail explicitly. No historical executable provisioning, source inference or default activation.
A fresh reproduction requires active parent/original strategy family and current approval of the **original** version, even if the template now selects another version. Copy the original request, changing only fresh run/session/account identities and the current approval receipt. Preserve all economic inputs. Receipt retries precede current eligibility checks; ordinary and reproduction intents use distinct hashes under the same principal/key uniqueness. SQL must enforce the source-copy relationship and retained identity alongside ordinary admission.
Expose read-only preview, POST reproduction and read-only result comparison. Compare versioned canonical hashes of the complete validated frozen request, financial envelope and analytics, normalizing only run/account identity and admission-review fields. Keep real market-session IDs, ownership, ordered fills, monetary strings, nulls and limitations. Do not recalculate finances or rewrite retained results. The UI separates original reproduction from current-settings submission, preserves retry keys after ambiguous responses and shows lineage/comparison after reload.
Root owns shared DTO/comparison and integration; backend/frontend worktrees have disjoint actual files. Current assignment, authority and validation live in the manifest.
## Implemented handoff — 2026-10-24
The pinned scope is implemented and independently reviewed; scheduling remains `review` / `validated_uncommitted` in the manifest. Shared preview/comparison DTOs live in `apps/stock/config/src/contracts/canonical-research.ts`; `run-reproduction.ts` checks retained admission eligibility and `reproduction-comparison.ts` hashes validated economic inputs/outputs. Migration 21 protects source-copy lineage and financial identity. GET `/api/v2/runs/:id/reproduction`, POST `/api/v2/runs/:id/reproduce` and GET `/api/v2/runs/:id/reproduction-comparison` are authenticated. POST accepts only an empty object plus an idempotency key; it returns 202 and Location for the new or previously accepted run.
`RunReproduction.tsx` consumes the same APIs, shows exact retained inputs, preserves keys after ambiguous submissions and displays source lineage and comparison. Current-settings submission is separate. The expanded Chromium research flow mutates the template, reproduces the original native result, retries the same receipt, reopens lineage, then proves a new ordinary run uses changed settings. PostgreSQL tests cover current original-version approval, direct SQL guards, retention, upgrade, corruption, concurrent receipts and economic parity/mismatch. Full gate outcomes and source hashes are recorded in the twenty-sixth-wave roadmap/manifest handoff.
No old binary provisioning or inference of missing provenance was added. R05 remains partial and R06/S06 gates remain intact.