feat(research): add strategy catalog and versioned backtest setup
This commit is contained in:
parent
8cca0ee588
commit
d929db707a
44 changed files with 4198 additions and 209 deletions
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"plan_revision": "2026-10-23.46",
|
||||
"plan_revision": "2026-10-23.48",
|
||||
"repository_base": "b7aeca4",
|
||||
"plan_status": "twenty_first_wave_review",
|
||||
"plan_status": "twenty_second_wave_review",
|
||||
"execution_authorized": true,
|
||||
"execution_scope": {
|
||||
"authorized_by": "User: commit and continue with backlog (2026-10-23). R01 accepted and committed 4a2e5ad362f7746a45a694dbcd9c51efac390526.",
|
||||
"authorized_by": "User: commit and continue after validated R10 handoff named R02 next. R10 committed 8cca0ee588b55cf904f46199ccb65942de70ee99.",
|
||||
"tasks": [
|
||||
"R10"
|
||||
"R02"
|
||||
],
|
||||
"permissions": [
|
||||
"R10 isolated implementation, correctness tests, independent review and planning updates; prior R01 commit authorized and completed"
|
||||
"R02 isolated implementation, correctness tests, independent review and planning updates; prior R10 commit authorized and completed"
|
||||
],
|
||||
"excluded": [
|
||||
"performance_profiling_or_optimization",
|
||||
|
|
@ -1442,7 +1442,7 @@
|
|||
"epic": "E6",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "ready",
|
||||
"status": "review",
|
||||
"dependencies": [
|
||||
"R01",
|
||||
"W03"
|
||||
|
|
@ -1461,14 +1461,33 @@
|
|||
"web-backtest-detail",
|
||||
"web-strategies"
|
||||
],
|
||||
"parallel_policy": "Allowed only with satisfied dependencies/approvals and disjoint write locks AND actual files; see agents/integration.md.",
|
||||
"assignment": null,
|
||||
"parallel_policy": "Pinned shared DTOs and draft admission contract. Isolated backend and frontend owners; root owns existing fixture/browser integration/planning, independent read-only reviewer.",
|
||||
"assignment": "/root",
|
||||
"branch": null,
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": null,
|
||||
"release_gates": [
|
||||
"W04"
|
||||
],
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_base": "8cca0ee588b55cf904f46199ccb65942de70ee99",
|
||||
"worktree": "/home/boki/repos/stock-bot",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/s04_controls_audit",
|
||||
"worktree": "/tmp/stock-bot-wave22.fPRkAC/backend",
|
||||
"scope": "Shared DTOs, saved catalog selection/validation, migration18 and execution gates, new API/PostgreSQL tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root/s04_feed_audit",
|
||||
"worktree": "/tmp/stock-bot-wave22.fPRkAC/frontend",
|
||||
"scope": "Catalog/version/clone/comparison/forms and existing backtest draft UI with focused interaction tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root",
|
||||
"scope": "Existing fixture compatibility, real browser catalog-to-draft workflow, integration/planning"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1477,7 +1496,7 @@
|
|||
"epic": "E6",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "blocked",
|
||||
"status": "ready",
|
||||
"dependencies": [
|
||||
"R01",
|
||||
"R10"
|
||||
|
|
@ -1546,7 +1565,7 @@
|
|||
"epic": "E6",
|
||||
"priority": "P0",
|
||||
"severity": "Critical",
|
||||
"status": "blocked",
|
||||
"status": "ready",
|
||||
"dependencies": [
|
||||
"F08",
|
||||
"S02",
|
||||
|
|
@ -1578,7 +1597,9 @@
|
|||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"blocker": null,
|
||||
"release_gates": []
|
||||
"release_gates": [
|
||||
"Explicit owner disposition of the simultaneous multi-asset mark/risk policy before canonical default activation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "R06",
|
||||
|
|
@ -1732,7 +1753,7 @@
|
|||
"epic": "E6",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "review",
|
||||
"status": "done",
|
||||
"dependencies": [
|
||||
"R01"
|
||||
],
|
||||
|
|
@ -1754,11 +1775,11 @@
|
|||
"assignment": "/root",
|
||||
"branch": null,
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"completed_commit": "8cca0ee588b55cf904f46199ccb65942de70ee99",
|
||||
"blocker": null,
|
||||
"release_gates": [],
|
||||
"integration_base": "4a2e5ad362f7746a45a694dbcd9c51efac390526",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_state": "validated_committed",
|
||||
"worktree": "/home/boki/repos/stock-bot",
|
||||
"implementation_slices": [
|
||||
{
|
||||
|
|
@ -6855,5 +6876,136 @@
|
|||
"f90476a79b0df259a204bbc2f2015b2b6a8e582a8771729f48775cb18b4bac65"
|
||||
],
|
||||
"next": "After acceptance/commit, R02 delivers the strategy catalog UI and version-aware backtest setup without claiming retained-artifact execution before R05. Performance remains deferred."
|
||||
},
|
||||
"twenty_second_wave": [
|
||||
"R02"
|
||||
],
|
||||
"twenty_second_wave_base": "8cca0ee588b55cf904f46199ccb65942de70ee99",
|
||||
"twenty_second_wave_notes": [
|
||||
"R10 accepted and committed; R02 catalog and save-only versioned templates authorized.",
|
||||
"No catalog version execution, run snapshots or default cutover until R05. All versions remain non-runnable independently of review approval.",
|
||||
"Exact version+normalized parameters persisted separately from execution config; legacy/catalog mode conversion forbidden, current independent legacy workflows remain supported.",
|
||||
"No performance work, benchmarks, new-wave commits/pushes/PRs or paper/live operations."
|
||||
],
|
||||
"twenty_second_wave_validation": {
|
||||
"status": "validated_uncommitted",
|
||||
"log_directory": "/tmp/stock-bot-wave22.fPRkAC",
|
||||
"source_hashes": {
|
||||
"apps/stock/config/src/contracts/backtest.ts": "6c01dc72f8bde73b0ec4357a0a2293560b749f7246e145c2f3f62e92f383e810",
|
||||
"apps/stock/config/src/contracts/strategy.ts": "490cf68d955e622a28733452508d540060cc4df341036ecb32269b9c533887b2",
|
||||
"apps/stock/orchestrator/src/backtest/PostgresBacktestRunRepository.ts": "f15195b3c3108f33e5d78d1a0bdf52c5d923a867b43e02989dadeb9ed428b82f",
|
||||
"apps/stock/web-api/src/migrations/migration-runner.ts": "c573bf2a7e9eae38f422c0352c9f0f7975a9380841805addf519174bb66dfadc",
|
||||
"apps/stock/web-api/src/routes/backtests-v2.routes.ts": "ec5610a79d96e92a0f033f336024eff051fe19f2b0d4cdccb4f57a5da6d9f603",
|
||||
"apps/stock/web-api/src/services/backtest-v2.service.ts": "d81494606741335096f872e872a6b2d64bfb65eac361840ec8556e437717e474",
|
||||
"apps/stock/web-api/src/services/backtest.service.ts": "c2e8dbedca288be928f3aa68e5b31c8c49776efd2cac8c646ae328d77d8aa5ce",
|
||||
"apps/stock/web-api/src/services/dataset-catalog.service.ts": "0c12046adaa0ed3886d25f314a5da416e244be0bd21fefe0de8cc23e9a093a41",
|
||||
"apps/stock/web-api/src/services/strategy-catalog.service.ts": "000b23fa1cbd78c9693c5beaa0cb69b17064c7f8eda5ba5b59fb33f37f5cdfd1",
|
||||
"apps/stock/web-app/src/app/App.tsx": "abf33f3a675ccbc6c88d5b08b1e5d31efb61e3b25c62cbf6482b327909ede69d",
|
||||
"apps/stock/web-app/src/features/backtest/BacktestDetailPageV2.tsx": "83db281e6160dc3ed0ae7f34a62ffba27b8021267b48148d91c73a52acaad92a",
|
||||
"apps/stock/web-app/src/features/backtest/BacktestListPageV2.tsx": "44093e2efb5b5ca2e84a82381ec3495b1df9adf4d2698b66720297ad655beada",
|
||||
"apps/stock/web-app/src/features/backtest/components/BacktestConfiguration.tsx": "11abd70aec6ac20ffbb3389746d084aca798a5ff284430457a6b6690008ac3af",
|
||||
"apps/stock/web-app/src/features/backtest/components/CreateBacktestDialog.tsx": "8afd246afe647e08412d14d556a566586cc4cd4e1a0e496c0970d70cead74d32",
|
||||
"apps/stock/web-app/src/features/backtest/components/RunControlsCompact.tsx": "1dc8619e659670d477d4a411840f0819c65be64b1f4dae86a6128c06fc5ed38c",
|
||||
"apps/stock/web-app/src/features/backtest/hooks/useBacktestV2.ts": "da35dac1cebaf3e36a5d6a6ccb9d59760187298fc6a4f9e9ac6c94bd184454bd",
|
||||
"apps/stock/web-app/src/features/backtest/services/backtestApiV2.ts": "d331cefe99209f09e12b79fc313a408087b9f55bcc1d6f97de1a53eb56412e85",
|
||||
"apps/stock/web-app/src/features/backtest/types/backtest.types.ts": "d7965fc66fd43f65811e50cc4df5ad3fac9655c1bc2cfaa838316a7bb8fe9f4f",
|
||||
"apps/stock/web-app/src/features/strategies/StrategyDetailPage.tsx": "3d6f4fad802bf2e63d1d730110f5fd76f7cf4da9bd3d4092b5c394e83893fbee",
|
||||
"apps/stock/web-app/src/features/strategies/StrategyListPage.tsx": "5fedd203ee945f59adb22b01e93eb5b61f5bdebeb5dfa5a3d02c06e01ad20bd4",
|
||||
"apps/stock/web-app/src/features/strategies/components/StrategyParameterForm.tsx": "d532d8af8dcfc3c6d62424138db4fae2b356704f6143c53b6ce8ecf16d3473f4",
|
||||
"apps/stock/web-app/src/features/strategies/components/StrategySelection.tsx": "42026ae8c87ef90c617a61917dfd874d5b83f0373b22d74128285007f8553be5",
|
||||
"apps/stock/web-app/src/features/strategies/components/useUnsavedWarning.ts": "9029a84d183803a4125b7c5808070ad69ad928c0dd4773cf30e376d3e81a326f",
|
||||
"apps/stock/web-app/src/features/strategies/index.ts": "0d3a6b0010b25f739c2ff2753bbdd8f5cc118e73e1f6b7e95f559cb8336cfacf",
|
||||
"apps/stock/web-app/src/features/strategies/services/strategyApi.ts": "be7dcd0226ec8c4cd3307643b385540ab060bbeddd1156a547c9845f74d33023",
|
||||
"database/postgres/init/18-backtest-strategy-versions.sql": "ad60e1d33be3131ddc5df34e3adcdb50c0efa7e12c2adbbbee8d132c92b5d240",
|
||||
"libs/core/types/src/index.ts": "2b9e3f1cc9f93ad5342a7064a3d8045688f33a8417c0a6e68eeaace01056d5d9",
|
||||
"libs/core/types/src/strategy-catalog.ts": "8c1ccca63c4c32ebd34f9f2fa2813014a874c4d0378c96512e854e0f4160900e",
|
||||
"test/e2e/fixture.ts": "0d9360e1eb3bddfb86ba4619d9e20e8c427faba98a67c654377ab286809075bf",
|
||||
"test/e2e/workbench.test.ts": "472ecf91b5b2f6c591f4cac9ae441243b32f3a2bc0c1fec5226734253b140dfa",
|
||||
"test/integration/backtest-workflow.test.ts": "7abdfb22370554619946728e9e7e33c4c90839aec7dba7b401e8e8a4981c7cac",
|
||||
"test/integration/catalog-backtest-contract.test.ts": "df6a15add6305586a483fe52f6bf2253ea3913a4c26d5b8b4f981c1909928d64",
|
||||
"test/integration/strategy-workbench.test.tsx": "d28f30f773724caa8c628c7b361976bd97df84ec9a7495ffe572be76fbb3a151",
|
||||
"test/postgres/catalog-backtest-drafts.test.ts": "2e15de1732d0820b3bab5fafa128a7e0cec3b34edfd3ddae9b9dcfe99e71549d",
|
||||
"test/postgres/dataset-catalog.test.ts": "13e0f3f0256b9bdcc542709e14b83cc85ce9225b49684880b6725c59c94acc91",
|
||||
"test/postgres/durable-backtest.test.ts": "b5436a2aa3cbbf7fccaf0cc715df113d8abbb746575726d548c9f3455e9df5fd",
|
||||
"test/postgres/migration-runner.test.ts": "a9a866a8a1054e3bda525d1e9c64826f72ff9f42e8513599ecc82947010adee8",
|
||||
"test/postgres/research-retention.test.ts": "86560c30b62c0af4664c5d9775594cce294e1b32083bece4566686dd57f1e78b",
|
||||
"test/postgres/research-runtime-isolation.test.ts": "ca5a84728ee36426a2d1955ff997ac3119d51c61ec605c9157ef7885dd6addc7"
|
||||
},
|
||||
"independent_review": {
|
||||
"owner": "/root/s03_review",
|
||||
"outcome": "Final G1/G2/G3 signoff from /root/s03_review: no remaining must-fix findings; all 39 final hashes match, no unlisted source changes. Reviewed artifact/parameter custody, admission gates, clone identity, settings reset and suite-owned Chromium/context cleanup. Reviewer inspected green full-check, database and unfiltered browser logs; ran no tests/builds. Integration owner executed all recorded gates.",
|
||||
"backend_archive_sha256": "8d4f58e353649399ffaf5bbf95720151e6972dae9e5d9a4c9b7427bc31ffc78f",
|
||||
"frontend_base_archive_sha256": "63dedea37e23368d3c4cd942961773597680bf70a053f4b22f8f74137ec97fba",
|
||||
"frontend_clone_delta_sha256": "4acccf336fcc50ef6dc9b23fdda8ada972b42ffb7e2114a005bc8d08cc3b5b35",
|
||||
"frontend_settings_delta_sha256": "b129d4067f13359f0147d079facea5566b2bd9da0a5d55eae855ed08960e4889",
|
||||
"source_manifest_sha256": "05d8a9fa9ef6d6b99444bf63b4ff5c62a1e2a3baefc44d27fc7d31968467bd84"
|
||||
},
|
||||
"checks": [
|
||||
{
|
||||
"command": "CARGO_BUILD_JOBS=2 bun run check",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/check-final.log",
|
||||
"outcome": "All repository checks passed: build/source/contracts, 93 tooling/12168 assertions, 43 utility/86, 44 calculation/2285, 541 integration/4685, 150 Rust (4 manual ignored), lint and secret audit. No application source changed afterward; final browser-only lifecycle changes passed strict test types, scoped lint/format and the full browser gate."
|
||||
},
|
||||
{
|
||||
"command": "PIPELINE_TEST_DATABASE_URL=postgres://fixture:fixture@127.0.0.1:32827/stock_bot_safety BACKTEST_TEST_REDIS_URL=redis://127.0.0.1:32828/15 bun run test:postgres",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/postgres-final.log",
|
||||
"outcome": "137 tests / 1052 assertions passed across all 15 PostgreSQL/Redis files. Catalog draft validation/edit/archive locking and API/repository/SQL admission rejection; additive migration compatibility; existing retention, idempotency, lease/recovery, paper custody and runtime isolation."
|
||||
},
|
||||
{
|
||||
"command": "CARGO_BUILD_JOBS=2 bun run --cwd apps/stock/engine build:napi",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/native-release-final.log",
|
||||
"outcome": "Release addon restored; matches checkout release library and prior wave release hash. No Rust source or financial policy changes."
|
||||
},
|
||||
{
|
||||
"command": "PIPELINE_TEST_DATABASE_URL=postgres://fixture:fixture@127.0.0.1:32827/stock_bot_safety BACKTEST_TEST_REDIS_URL=redis://127.0.0.1:32828/15 bun run test:e2e",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/e2e-isolated-contexts.log",
|
||||
"outcome": "All 8 workflows / 117 assertions passed unfiltered, without retries, against fresh same-origin UI build and release addon. Catalog create/edit, exact validation, save/reopen, settings save/reset, immutable publication, safe bundle display, clone lineage, and no run/outbox; existing native/frozen-dataset/submission/retention workflows remain green."
|
||||
},
|
||||
{
|
||||
"command": "bunx tsc --project /tmp/stock-bot-wave22.fPRkAC/tests-tsconfig.json --noEmit",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/strict-tests-final.log",
|
||||
"outcome": "Passed strict new catalog contract/component/PostgreSQL tests and changed modern migration/dataset/retention/browser fixtures. This is not a broad strict claim for older legacy harnesses."
|
||||
},
|
||||
{
|
||||
"command": "bunx eslint test/postgres/catalog-backtest-drafts.test.ts test/postgres/dataset-catalog.test.ts test/postgres/migration-runner.test.ts test/postgres/research-retention.test.ts test/integration/catalog-backtest-contract.test.ts test/integration/strategy-workbench.test.tsx test/e2e/fixture.ts test/e2e/workbench.test.ts",
|
||||
"log": "/tmp/stock-bot-wave22.fPRkAC/scoped-lint-final.log",
|
||||
"outcome": "Passed; final browser lifecycle edits also passed focused ESLint."
|
||||
},
|
||||
{
|
||||
"command": "bunx prettier --check <changed TS/TSX>; git diff --check",
|
||||
"logs": [
|
||||
"/tmp/stock-bot-wave22.fPRkAC/scoped-format.log",
|
||||
"/tmp/stock-bot-wave22.fPRkAC/format-last.log"
|
||||
],
|
||||
"outcome": "Passed; final two browser files rechecked after lifecycle fix. Manifest/reference/hash validation recorded separately."
|
||||
},
|
||||
{
|
||||
"command": "Validate manifest IDs/task paths/dependency DAG, exact changed-source/hash inventory, HEAD and release-addon identity; git diff --check",
|
||||
"outcome": "Passed: 55 unique IDs, valid references, acyclic task graph, 39 matching reviewed implementation/test hashes, 5 planning artifacts, HEAD 8cca0ee, release addon matches checkout library. No unlisted source changes."
|
||||
}
|
||||
],
|
||||
"native_release_sha256": "ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103",
|
||||
"scope": "39 application/shared-contract/migration/test files; one additive migration, existing catalog APIs and React backtest workflow. No new service, compiler/editor, financial simulator or engine semantics.",
|
||||
"limitations": [
|
||||
"Every catalog version remains non-runnable, including approved built-ins. R05 must verify executable artifact identity and connect durable canonical execution; candidates also require A02 isolation. No catalog request_snapshot, run or outbox is created in R02.",
|
||||
"Independent legacy name-based runs retain existing economics/provenance qualifications; saving a catalog setup does not certify performance or make it a legacy alias.",
|
||||
"Source comparison shows retained bundled JavaScript and schema/identity metadata, not reconstructed original TypeScript. Publication remains repository/offline tooling or existing artifact APIs; no upload/editor UI.",
|
||||
"Version-linked run/deployment histories are explicitly unavailable until integration; no inference from name-based legacy runs.",
|
||||
"Unsaved warnings cover local discard actions and document unload; no application-wide route-blocking framework. Clone retries preserve a frozen key/body during the mounted detail view, not across reloads.",
|
||||
"R05 multi-asset default activation still requires explicit owner disposition of simultaneous-mark risk. No trading or default activation in this wave."
|
||||
],
|
||||
"environment_notes": [
|
||||
"Initial PostgreSQL regression run exposed four legacy test helpers spreading the expanded response DTO into legacy input. Helpers now explicitly project definition input; parser null-marker rejection remains intact. Full suite rerun passed.",
|
||||
"Initial browser helper selected the first select after the new mode select was added; it now selects the labelled Legacy strategy. Exact version loading is awaited before assertions.",
|
||||
"Repeated serial Chromium launch/close cycles lost the control pipe, including during existing native smoke and ordinary catalog validation. Isolated workflows passed; diagnostic logs support likely runtime pipe lifecycle interference, not proven native-worker causation. The suite now owns one Chromium process and each fixture closes its own fresh context before its server/queue/database cleanup. The final complete suite passes with no retries or swallowed disconnects; production worker code is unchanged.",
|
||||
"Native worker/browser and disposable database checks needed sandbox escalation. Development services were untouched. Worktrees and logs retained.",
|
||||
"Strict checks cover new/modern tests; pre-existing broad legacy-harness strict errors from prior waves were not suppressed or expanded into this task.",
|
||||
"Exact disposable fixture containers stopped after verification. No profiling, performance benchmarks, new-wave commit, push, PR or trading/default activation."
|
||||
],
|
||||
"stopped_fixture_ids": [
|
||||
"25dcbeefeecdf21189f42b6d2694acf51f84878e3c4bedcb21494f2bf4c5fcee",
|
||||
"ea7d33b519a35b14ca493e460734a70d98937507a29406765edff53688f12b9a"
|
||||
],
|
||||
"next": "After acceptance/commit, R05: integrate verified retained executable identity, frozen provenance and existing canonical reports with the durable runner. Begin with a trusted-built-in single-asset slice, without claiming all R05 complete or enabling candidates/multi-asset default. R03 is independently ready. Performance remains deferred."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue