feat(research): run durable chronological validation and retain reports

This commit is contained in:
Boki 2026-10-24 12:03:41 -04:00
parent 67ab30cb7a
commit abd1c5b83d
42 changed files with 5345 additions and 74 deletions

View file

@ -1,14 +1,14 @@
{
"schema_version": 1,
"plan_revision": "2026-10-24.62",
"plan_revision": "2026-10-24.64",
"repository_base": "b7aeca4",
"plan_status": "twenty_ninth_wave_validated_awaiting_commit",
"plan_status": "thirtieth_wave_validated_awaiting_commit",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "User: commit and continue after validated R06 retry handoff recommended R08 chronological validation; retry work committed b373410",
"authorized_by": "User: commit and continue; accepted chronological preflight committed 67ab30cb7a578591262cb0218fa9f6a135924c7f",
"tasks": ["R08"],
"permissions": [
"R08 preflight foundation: verified chronological dataset windows, prepared reset-account requests and input-only web preview; isolated implementation/review and full validation"
"R08 durable single chronological recipe: immutable source and phase datasets, ordinary training experiment and fixed-winner holdout children, write-once selection/report, explicit web workflow and full regression gates"
],
"excluded": [
"performance_profiling_or_optimization",
@ -24,9 +24,8 @@
"AI_execution_or_credentials",
"historical_binary_provisioning",
"cross_experiment_ranking",
"durable_validation_admission",
"validation_selection_or_performance_claims",
"validation_report_persistence"
"multi_window_walk_forward_and_cost_sensitivity_execution",
"strategy_performance_conclusions"
],
"pending_policy_decisions": [
"ADR-007",
@ -1445,32 +1444,34 @@
"blocker": null,
"release_gates": [],
"integration_state": "component_validated_uncommitted",
"integration_base": "b373410320e987ddce1ee8dd5e8a691cf183d527",
"integration_base": "67ab30cb7a578591262cb0218fa9f6a135924c7f",
"worktree": "/home/boki/repos/stock-bot",
"execution_component": "Chronological validation preflight and exact dataset slicing",
"execution_component": "Durable single train/fixed-winner validation/test recipe with immutable report",
"component_exclusions": [
"durable experiment/phase admission and immutable selection/report",
"walk-forward aggregation and cost-sensitivity execution"
"multi-window walk-forward/reset-series aggregation",
"cost-sensitivity execution",
"findings/regime evidence integration"
],
"reviewed_by": "/root/r04_review",
"verification_reference": "ROADMAP.md#twenty-ninth-wave-handoff--2026-10-24",
"review_notes": "Preflight foundation independently reviewed and all integrated gates passed. Full task stays in progress: no durable recipe/admission, selection, report, walk-forward or cost-sensitivity execution yet.",
"verification_reference": "ROADMAP.md#thirtieth-wave-handoff--2026-10-24",
"review_notes": "Single durable chronological recipe independently accepted and all integrated gates passed. Full R08 stays in progress for multi-window walk-forward/reset-series aggregation and cost sensitivity; R09 remains blocked.",
"implementation_slices": [
{
"owner": "/root/r12_backend",
"worktree": "/tmp/stock-bot-wave29.kK85O1/backend",
"scope": "Exact v2 slice export, prepared phase requests and extracted unchanged risk clock, authenticated preview API and pure/API/PostgreSQL regressions"
"worktree": "/tmp/stock-bot-wave30.K6IDyj/backend",
"scope": "SQL24, validation service/routes, ordinary experiment compatibility, new pure/API/PostgreSQL regressions"
},
{
"owner": "/root/r12_frontend",
"worktree": "/tmp/stock-bot-wave29.kK85O1/frontend",
"scope": "Explicit UTC preflight panel/client and interaction tests; ordinary sweep remains distinct"
"worktree": "/tmp/stock-bot-wave30.K6IDyj/frontend",
"scope": "Explicit training/selection/report UI, saved validations and focused interaction tests; symmetric submission ownership"
},
{
"owner": "/root",
"scope": "Shared DTO/export, native reset/suffix regression, actual browser no-write workflow, full integration and planning"
"scope": "Shared DTO, migration registry and old fixture chains, web route composition, native/browser workflow, full gates and planning"
}
]
],
"partial_commit": "67ab30cb7a578591262cb0218fa9f6a135924c7f"
},
{
"id": "R09",
@ -6806,7 +6807,7 @@
"Future fixed selection protocol: every train candidate must have a comparable finite totalReturn; maximize then tie by original candidate.index. Validation and test assess only that frozen winner."
],
"twenty_ninth_wave_validation": {
"state": "component_validated_uncommitted",
"state": "component_committed",
"scope": "R08 read-only chronological preflight foundation; full R08 remains in_progress and R09 blocked",
"integration_base": "b373410320e987ddce1ee8dd5e8a691cf183d527",
"log_directory": "/tmp/stock-bot-wave29.kK85O1",
@ -6885,6 +6886,137 @@
"No performance measurements/optimization, new scheduler/simulator, candidate code, multi-asset/default/paper/live/AI activation, new-wave commit, push or PR. Chromium only; existing bundle-size/Rust warnings remain."
],
"cleanup": "Both exact --rm disposable PostgreSQL/Redis containers stopped successfully. Nineteen source/test files archived and hashed; worktrees and logs retained. Development/production services and data untouched.",
"next": "After acceptance/commit, continue R08 with immutable experiment-owned recipe and a coordinated guarded admission branch. Freeze all windows/source/phase inputs and selection policy before training; commit the write-once complete-training winner before admitting the same winner to validation/test. Extend existing one-dataset admission/retry/result assumptions explicitly, preserve normal experiments and recovery, and persist immutable evidence. Do not call preflight OOS validation or release R09 prematurely; performance remains paused."
"next": "After acceptance/commit, continue R08 with immutable experiment-owned recipe and a coordinated guarded admission branch. Freeze all windows/source/phase inputs and selection policy before training; commit the write-once complete-training winner before admitting the same winner to validation/test. Extend existing one-dataset admission/retry/result assumptions explicitly, preserve normal experiments and recovery, and persist immutable evidence. Do not call preflight OOS validation or release R09 prematurely; performance remains paused.",
"committed_as": "67ab30cb7a578591262cb0218fa9f6a135924c7f",
"completed_commit": "67ab30cb7a578591262cb0218fa9f6a135924c7f"
},
"thirtieth_wave": ["R08"],
"thirtieth_wave_base": "67ab30cb7a578591262cb0218fa9f6a135924c7f",
"thirtieth_wave_notes": [
"Use training research_experiments row as immutable recipe root; two ordinary singleton child experiments reuse runs/outbox/retry. No run schema or financial-engine change.",
"Explicit submit, select-and-admit and finalize operations; read-only GET; full existing financial-result verification before irreversible evidence.",
"All training candidates must complete with comparable finite scores; deterministic total-return maximum then original candidate-index tie break. Same winner for validation/test; independent reset accounts.",
"Freeze write-once selection/report with atomic child admission and accepted receipt replay before current eligibility. Historical finalization does not need current execution approval.",
"Root cancellation propagates through both new and old endpoints and SQL guard; no future holdout admission after cancellation.",
"R08 remains partial for multiple walk-forward windows and cost sensitivity. R09 and performance/default/trading/AI gates unchanged."
],
"thirtieth_wave_validation": {
"state": "component_validated_uncommitted",
"scope": "R08 durable single train/fixed-winner validation/test recipe and immutable report; full R08 remains in_progress and R09 blocked",
"integration_base": "67ab30cb7a578591262cb0218fa9f6a135924c7f",
"log_directory": "/tmp/stock-bot-wave30.K6IDyj",
"source_archive": "/tmp/stock-bot-wave30.K6IDyj/validated-source.tar.gz",
"source_archive_sha256": "f2f0f6e6b462263198cf0bdbf3d8d20dfa30c3338a9425e23e97c166078b3117",
"source_files": {
"apps/stock/config/src/contracts/chronological-validation.ts": "1ec526f04d27073c6c459009e4a17a16f089bf8ffddf66e603a4075eed3b0848",
"apps/stock/web-api/src/migrations/migration-runner.ts": "d4cb8b0f07b1ac394aafb4f60a8185fe2e43d13112ecc64132d7406243f051a2",
"apps/stock/web-api/src/routes/experiments.routes.ts": "1f6d02774e54e470959a94f82ce9196c0e4bdbdf34d0914f8bf6cf64bc43420c",
"apps/stock/web-api/src/services/chronological-validation.service.ts": "1d0797b893edf382fa1b3987ee3b680b2b574743c0934c19a9bde418556416ed",
"apps/stock/web-api/src/services/experiments.service.ts": "a17132c7ae7e7fe73c4a814802995888a4d1e7dd48233cdfd81bd498d0be5ce9",
"apps/stock/web-api/src/services/validation-evidence.ts": "fa1d04ab56ae66a0c11001ead4e75e98e011193a580702ffe992cf8e0075cf11",
"apps/stock/web-app/src/app/App.tsx": "2f947e9870924422534dbdf3d7703999974cc02f3c6bd3e323f5a5e1c0102c7c",
"apps/stock/web-app/src/features/experiments/ChronologicalValidationDetailPage.tsx": "ef968704864118b053c3730cbb1ec13bdcc36dcb0e1ba73648da8ebb9389ee4f",
"apps/stock/web-app/src/features/experiments/ExperimentListPage.tsx": "c0d7d944b84a80a8c49f6d4bca0ee87543cf39b627a7ee68d3d6a3a76a684f3b",
"apps/stock/web-app/src/features/experiments/components/ChronologicalValidationPreflight.tsx": "c7a1288e225bca65a13e533ece08c5e67e34ccce54af515e1c3b3ef3d9884a31",
"apps/stock/web-app/src/features/experiments/components/ExperimentEditor.tsx": "4bbb2763742f23a684873318d4756d22dfbcf5dac153c2167707f34b9c4c98ec",
"apps/stock/web-app/src/features/experiments/components/SavedChronologicalValidations.tsx": "2aefdb987f98281a942779c92576abe6c793a673c2aa1957264b583921dfc2f8",
"apps/stock/web-app/src/features/experiments/components/ValidationEvidence.tsx": "597e5b09c67ae5063f684155506f9fff66f51d197eedf33edafbe150a7762e0d",
"apps/stock/web-app/src/features/experiments/index.ts": "2e0eb7a33673aca7b64489e8f9529ff2d0444bda5010c21ebcd3161f043e5461",
"apps/stock/web-app/src/features/experiments/services/chronologicalValidationApi.ts": "266ea263386a1be777fa5edc13286f1beaf2e3388fc0ee22791a15dce3880077",
"apps/stock/web-app/src/features/experiments/services/chronologicalValidationDurableApi.ts": "b35af5f939805eb9df65bbe4f6adad07550f8997700ca702d9af96b943d50809",
"apps/stock/web-app/src/features/experiments/services/experimentApi.ts": "6c9049ff40516f0a703f6bad02c1a8c5e1bedfb173abde48a9e1a58f01eafd27",
"database/postgres/init/24-chronological-validation.sql": "b90b3b23ecec5b753a6d091fd34af988fc8f2292c22aabb1b3ad6c75d8410f6d",
"test/e2e/fixture.ts": "fc95265629b7f11b58c0ada55d110a4434b4c899973ca7e7ae09b2428195f4f4",
"test/e2e/workbench.test.ts": "9011a4add29fcd05f80d1102dd9ac6ea5d80ed618d9641f8f20f5b7b87fee815",
"test/integration/chronological-validation-durable-api.test.ts": "61ce6a165a61d55e912168eb3d27cb675a9f15a5a26f50b99fc051e7be222018",
"test/integration/chronological-validation-durable-ui.test.tsx": "45c8d1a5740896c8e0f953f1df7e30a876235faffceb6506db256f6402d20e10",
"test/integration/chronological-validation-durable.test.ts": "bbba830783dc0e09bae54b9f95dd31a6cb7959ddbd3c2876aea11b6c934446c1",
"test/integration/chronological-validation-ui.test.tsx": "e7c4bfc7009d010569a3ed3d0fe1fa436bfc8e12c7032ff0a89b989266299531",
"test/postgres/canonical-durable-backtest.test.ts": "8bc3fce8749f712169205daa8b9b3f5183df60915017af27c8e1b2f3c976773b",
"test/postgres/canonical-research.test.ts": "8f049d38aa21a108725b8aa162fac9dac2fa4b061b17a05e5d866288eec09ddc",
"test/postgres/catalog-backtest-drafts.test.ts": "6ac07c481bbeeeabf922a5eacadafa0488392020da76d7a76c77fdebb0d836fd",
"test/postgres/chronological-validation-durable.test.ts": "6f54c297db2dff9c2ea2a92065674a976a00bf91cde1cdf38cbbb4e75c39386f",
"test/postgres/chronological-validation.test.ts": "ccaa4b41ede6b4a3b595622cede1ecad90ed660cc58ad03dd643a4e829ed68fb",
"test/postgres/dataset-catalog.test.ts": "e0fb89186cd73f6381fa49ca6b0218eb8d08d2b4677fb5f51be0adf620419b1e",
"test/postgres/durable-backtest.test.ts": "ec55ecd29abf352654bde4b4aaf668d7a962be808452c5110bd279c145f0e187",
"test/postgres/experiment-retries.test.ts": "4d3fabb6ffa22cb7ddb7719e84d0537281e61ae673a79ef6f44def3d1f7e6fb1",
"test/postgres/experiments.test.ts": "718bf826bb712e0e5de2d63fc915f6a1977f02ca56055e4174e5194f4aaf9f42",
"test/postgres/migration-runner.test.ts": "b58107cedee0530620bdce2f6d1b016d37cda67073a4ed958e03bb7442b385f3",
"test/postgres/research-retention.test.ts": "fdb9c1341b37fe78b7819f5293d54d5c5856ef7b225be300bd3c5bceef10af05",
"test/postgres/research-runtime-isolation.test.ts": "9b19c0f303c09b05a0c4cbe3387a9573de0432f926f2fe4efdbf6b2598a0a86a",
"test/postgres/research-workspace.test.ts": "5895749d199016497f0bebfa869921f4eadb79ecb3760dd64b6bc713d08dea58",
"test/postgres/run-reproduction.test.ts": "afe9c571de64cfd07a0bcc1fd5bb4ae2312b489c8ecf9d27cdd74aa243d05e73"
},
"checks": [
{
"command": "CARGO_BUILD_JOBS=2 bun run check",
"log": "/tmp/stock-bot-wave30.K6IDyj/check.log",
"outcome": "All repository gates passed: build, source/contracts types, secrets, lint; 93 tooling, 43 utility, 44 calculation, 825 integration and 150 Rust tests. Zero failures; four existing manual Rust tests ignored."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:postgres",
"log": "/tmp/stock-bot-wave30.K6IDyj/postgres.log",
"outcome": "205 tests /1773 assertions passed across 23 files, including 11 new chronological validation tests."
},
{
"command": "PIPELINE_TEST_DATABASE_URL=<disposable PG> BACKTEST_TEST_REDIS_URL=<dedicated Redis /15> bun run test:e2e",
"log": "/tmp/stock-bot-wave30.K6IDyj/e2e.log",
"outcome": "13 Chromium workflows /357 assertions passed. Real native training, explicit winner/heldout admission, finalization after archival, exact receipts, report reopening and child experiment navigation."
},
{
"command": "bunx tsc --project /tmp/stock-bot-wave30.K6IDyj/integrated-tests-tsconfig.json --noEmit",
"log": "/tmp/stock-bot-wave30.K6IDyj/integrated-test-types-final.log",
"outcome": "Strict types passed for all new durable pure/API/UI/PostgreSQL tests plus updated preflight UI and browser fixture/workflow."
},
{
"command": "bunx eslint <new and changed workflow tests>",
"log": "/tmp/stock-bot-wave30.K6IDyj/integrated-test-lint.log",
"outcome": "Scoped test lint passed; source lint passed full gate."
},
{
"command": "CARGO_BUILD_JOBS=2 bun run --cwd apps/stock/engine build:release",
"log": "/tmp/stock-bot-wave30.K6IDyj/native-release.log",
"outcome": "Release addon restored before final PostgreSQL/Chromium suites; SHA256 unchanged."
},
{
"command": "bunx prettier --check <38 source/test files excluding SQL> docs/development/backlog/manifest.json; git diff --check; manifest references/DAG/hash verification",
"log": "/tmp/stock-bot-wave30.K6IDyj/final-format-check.log",
"outcome": "Formatting, whitespace, task references/DAG and exact source/archive verification passed. Final formatter delta preserves identical whitespace-stripped source."
}
],
"native_release_sha256": "ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103",
"reviews": [
{
"owner": "/root/r04_review",
"scope": "Backend eight-file final overlay; exact source/SQL contracts and adversarial tests",
"outcome": "ACCEPT, all 8 hashes verified. Independently ran 6 pure/HTTP tests /86 assertions and reviewed author 11 native/PostgreSQL tests /118 assertions. Ordinary SQL22 source guard extraction mechanically identical; run/retry guards unchanged. Root final formatting changes only whitespace in two backend files; whitespace-stripped source exactly matches the accepted overlay.",
"archive_sha256": "cd82011090d0206e8757f75cfe7b736dad3cbc753f908cc246b7a2aa68095300"
},
{
"owner": "/root/r04_review",
"scope": "Frontend eleven-file final overlay",
"outcome": "ACCEPT, all 11 hashes verified. Independently ran 66 UI tests /285 assertions; author combined 235 UI tests /1151 assertions. Reviewed intent ownership, ambiguous receipts, retained evidence consistency and synchronous refresh/action fencing.",
"archive_sha256": "cc4c5dbd58a4905ddf980d65ad266feb7e58d3bee0969b995bbd28412a22709d"
}
],
"behaviors": [
"Atomic retention of three exact slices and training grid; only training runs admitted initially. Selection and two ordinary singleton holdout experiments/runs/outbox commit together.",
"Every complete comparable training result is verified through existing canonical financial/analytics reader; finite total-return maximum and original-index tie break. Training evidence retains original candidate order. Validation/test use exactly the same fixed winner.",
"Immutable source recipe, phase lineage, selection and report; SQL independently verifies source bars/availability/metadata/account clocks, candidate completeness and copied result facts. No second financial engine.",
"Accepted receipts replay before current eligibility; fresh holdout execution verifies original retained build/version and current approval. Historical report finalization works after archive/revocation.",
"Old/new root cancellation and direct SQL propagate to child phases; race tests reject or cancel all admitted work. Failed phase trials reuse existing retry receipts and fencing.",
"Single bounded web lifecycle with exact ambiguous-intent retry, independent reset-account results, truthful unavailable metrics/sample counts, saved report reopening and existing phase retry/history links."
],
"limitations": [
"Only one explicit train/validation/test recipe and deterministic unfitted retained built-ins with zero label horizon. Multi-window walk-forward/reset-series aggregation and cost sensitivity remain R08 acceptance work; R09 remains blocked and R05/R07 remain partial.",
"Selection is training-only within this workflow; no guarantee that source data has never been inspected in other research. Saved evidence does not establish strategy quality or statistical adequacy.",
"Prepared preview identity keeps execution=preview-only unchanged; durable stage and immutable action evidence are separate. Each phase is an independent reset account; no stitched portfolio curve.",
"No performance/profiling/benchmark work, new scheduler/simulator, candidate execution, multi-asset/default/paper/live/AI activation, new-wave commit, push or PR. Chromium only; existing build warnings remain."
],
"validation_notes": [
"An initial manually built browser fixture used the local VITE API override; its network guard rejected login. Rebuilding with explicit same-origin VITE_API_BASE_URL fixed the setup; both focused and final complete browser suites passed. No application change or test retry hid a source failure."
],
"cleanup": "Both exact disposable PostgreSQL/Redis containers stopped successfully after all suites completed. 38 source/test files archived and hashed; worktrees/logs retained. Development/production services and data untouched.",
"next": "Accept/commit this durable single-recipe component, then finish R08 with explicit repeated nonoverlapping walk-forward windows and bounded cost sensitivity through the existing recipe/experiment paths. Preserve immutable per-window winners and separate reset-account reports; avoid a general workflow scheduler. Keep performance, candidate/AI execution and default/trading activation gated."
}
}