feat(research): prepare and retain explicit source datasets in the web workbench
This commit is contained in:
parent
06039d17ba
commit
366bee810b
21 changed files with 2677 additions and 76 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Canonical development backlog
|
||||
|
||||
**First thirty-three waves committed; R09 research source citations are validated and ready to commit.** R07 functional comparison is committed as `46a4f13`; **36 of 45 scheduled tasks are fully committed (80% by count)**, with R09 in review. R05 remains partial, and R07 retains its paused table measurement.
|
||||
**First thirty-four waves committed; R05 explicit source-export preparation is validated and ready to commit.** R09 is committed as `06039d1`; **37 of 45 scheduled tasks are fully committed (82% by count)**. Full R05 remains partial, and R07 retains its paused table measurement.
|
||||
|
||||
## One source of truth
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
|
|||
| [R06 Create immutable experiments and bounded sweep expansion](tasks/R06.md) | P1 / done | Accepted R05 retained-input component; R01/R10/F08/S02/D01/W03/C06/R12, ADR-006 | — | Full-stack research product / M |
|
||||
| [R07 Deliver sweep configuration and comparable-result views](tasks/R07.md) | P1 / in_progress (functional committed; measurement paused) | R06, ADR-006 | W04 | Full-stack research product / M |
|
||||
| [R08 Add bounded chronological and reset-segment validation](tasks/R08.md) | P1 / done | R06, ADR-006 | — | Quantitative research integrity / M |
|
||||
| [R09 Expose validation, cost and regime evidence in the workbench](tasks/R09.md) | P1 / review (validated, uncommitted) | R08, committed R07 functional component, ADR-006 | S05 when Regime comparison is enabled; R03 when Saving or linking a research finding is enabled | Full-stack research product / M |
|
||||
| [R09 Expose validation, cost and regime evidence in the workbench](tasks/R09.md) | P1 / done | R08, committed R07 functional component, 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 / done | Accepted R05 retained-input component; W04/R01/R10/F08/S02/D01/W03/C06, ADR-006 | — | Full-stack reproducible research / S |
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"schema_version": 1,
|
||||
"plan_revision": "2026-10-24.71",
|
||||
"plan_revision": "2026-10-24.72",
|
||||
"repository_base": "b7aeca4",
|
||||
"plan_status": "thirty_fourth_wave_validated_awaiting_commit",
|
||||
"plan_status": "thirty_fifth_wave_validated_awaiting_commit",
|
||||
"execution_authorized": true,
|
||||
"execution_scope": {
|
||||
"authorized_by": "User: commit and continue; accepted R07 functional comparison committed 46a4f13acd5fdce08f1b19e465f428471656269f",
|
||||
"tasks": ["R09"],
|
||||
"authorized_by": "User: commit and continue; accepted R09 committed 06039d17bac7220d8504e68d1d4f66896eb13b91",
|
||||
"tasks": ["R05"],
|
||||
"permissions": [
|
||||
"R09 exact experiment/report source links in existing research findings; historical verification, web save/reopen and explicit unavailable regime evidence."
|
||||
"R05 partial explicit source-export web preparation: read-only normalization preview, exact content-addressed retention and existing canonical dataset selection."
|
||||
],
|
||||
"excluded": [
|
||||
"performance_profiling_or_optimization",
|
||||
|
|
@ -1303,34 +1303,34 @@
|
|||
"release_gates": [
|
||||
"Explicit owner disposition of the simultaneous multi-asset mark/risk policy before canonical default activation"
|
||||
],
|
||||
"integration_state": "partial_validated_committed",
|
||||
"integration_base": "d929db707a4894096b8b31ebd25c5e39d15289c1",
|
||||
"integration_state": "partial_validated_uncommitted",
|
||||
"integration_base": "06039d17bac7220d8504e68d1d4f66896eb13b91",
|
||||
"worktree": "/home/boki/repos/stock-bot",
|
||||
"implementation_slices": [
|
||||
{
|
||||
"owner": "/root/r12_backend",
|
||||
"worktree": "/tmp/stock-bot-wave35.fQycky/backend",
|
||||
"scope": "Preparation routes/service, shared retention and existing eligibility reuse, focused integration/PostgreSQL tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root/r12_frontend",
|
||||
"worktree": "/tmp/stock-bot-wave35.fQycky/frontend",
|
||||
"scope": "Canonical setup source-file panel, existing API client, focused UI tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root",
|
||||
"scope": "Shared pure contracts, admission/API, migration19, offline dataset import, browser/fixture integration and planning"
|
||||
},
|
||||
{
|
||||
"owner": "/root/s04_controls_audit",
|
||||
"worktree": "/tmp/stock-bot-wave23.D3gFzn/durable",
|
||||
"scope": "One durable runner/repository/adapter lifecycle and focused recovery tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root/s03_review",
|
||||
"worktree": "/tmp/stock-bot-wave23.D3gFzn/worker",
|
||||
"scope": "Retained executable bytes and exact worker/native build verification with child tests"
|
||||
},
|
||||
{
|
||||
"owner": "/root/s04_feed_audit",
|
||||
"worktree": "/tmp/stock-bot-wave23.D3gFzn/frontend",
|
||||
"scope": "Explicit canonical setup/capability and canonical result UI; focused DOM tests"
|
||||
"scope": "Shared DTO, actual native browser lifecycle, integrated gates and planning"
|
||||
}
|
||||
],
|
||||
"reviewed_by": ["/root/s03_review", "/root/s04_controls_audit", "/root/s04_feed_audit"],
|
||||
"verification_reference": "ROADMAP.md#twenty-third-wave-handoff--2026-10-23",
|
||||
"review_notes": "Reviewed retained-builtin/single-asset vertical slice only. Full R05 remains in progress; provider-to-v2 preparation and broader cutover are not claimed. Corrected warmup clock, series/rate/decimal admission mismatches, concurrent approval proof, UI parent identity and drawdown severity.",
|
||||
"partial_commit": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94"
|
||||
"reviewed_by": "/root/r04_review",
|
||||
"verification_reference": "ROADMAP.md#thirty-fifth-wave-handoff--2026-10-24",
|
||||
"review_notes": "Independent exact-source review accepted explicit source-export preparation component; all integrated gates pass. Existing retained execution remains; full R05 remains partial for provider-query preparation/first binding and broader cutover. No inferred source evidence or activation.",
|
||||
"partial_commit": "618fb9e33cebc1fde4869eb1f975a12c55bd9b94",
|
||||
"execution_component": "Explicit source-export JSON preview and content-addressed retention through the existing web canonical setup",
|
||||
"component_exclusions": [
|
||||
"No automatic provider-query preparation, durable pending source request/first-run binding, default or multiasset activation; source metadata is supplied evidence, not independently certified.",
|
||||
"Performance and AI/paper/live activation remain paused or separately gated."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "R06",
|
||||
|
|
@ -1487,7 +1487,7 @@
|
|||
"epic": "E6",
|
||||
"priority": "P1",
|
||||
"severity": "High",
|
||||
"status": "review",
|
||||
"status": "done",
|
||||
"dependencies": ["R08"],
|
||||
"decision_dependencies": ["ADR-006"],
|
||||
"task_file": "backlog/tasks/R09.md",
|
||||
|
|
@ -1499,7 +1499,7 @@
|
|||
"assignment": "/root",
|
||||
"branch": null,
|
||||
"pull_request": null,
|
||||
"completed_commit": null,
|
||||
"completed_commit": "06039d17bac7220d8504e68d1d4f66896eb13b91",
|
||||
"blocker": null,
|
||||
"release_gates": [],
|
||||
"conditional_release_gates": [
|
||||
|
|
@ -1513,7 +1513,7 @@
|
|||
}
|
||||
],
|
||||
"component_readiness": "R08 and R03 committed; R07 functional component accepted. S05 does not retain per-session as-of regime annotations, so positive regime slicing remains unavailable.",
|
||||
"integration_state": "validated_uncommitted",
|
||||
"integration_state": "validated_committed",
|
||||
"integration_base": "46a4f13acd5fdce08f1b19e465f428471656269f",
|
||||
"worktree": "/home/boki/repos/stock-bot",
|
||||
"execution_component": "Exact retained experiment/report citations through existing findings, with explicit unavailable regime evidence",
|
||||
|
|
@ -7403,7 +7403,7 @@
|
|||
"No performance, native financial changes, candidate/AI/default/multiasset/paper/live activation or new-wave commits/push/PR."
|
||||
],
|
||||
"thirty_fourth_wave_validation": {
|
||||
"state": "validated_uncommitted",
|
||||
"state": "validated_committed",
|
||||
"integration_base": "46a4f13acd5fdce08f1b19e465f428471656269f",
|
||||
"log_directory": "/tmp/stock-bot-wave34.02YVEd",
|
||||
"scope": "Supported R09 source-linked findings and explicit unavailable-regime state; positive regime slicing requires future retained annotations.",
|
||||
|
|
@ -7499,11 +7499,98 @@
|
|||
"Existing finding creation remains non-idempotent; ambiguous writes freeze and require checking saved records, without automatic retry.",
|
||||
"Performance, R07 table measurement, R05 provider/default cutover and candidate/AI/multiasset/paper/live activation remain paused or separately gated."
|
||||
],
|
||||
"commits": "Wave33 committed46a4f13. Wave34 remains uncommitted; no push or PR.",
|
||||
"commits": "Wave34 accepted and committed 06039d17bac7220d8504e68d1d4f66896eb13b91 at owner request; no push or PR.",
|
||||
"fixture_cleanup": {
|
||||
"result": "Both exact disposable --rm containers stopped after successful final gates; development services untouched.",
|
||||
"postgres": "c9d963c8b00dd98b4b4058fa91a9ad19cdf57ca4239853c3d55d8aa3b23e48d1",
|
||||
"redis": "f5edaed388c92939721f4afe32e18619068587a87b07d12ffadbd38fa2168bd3"
|
||||
},
|
||||
"completed_commit": "06039d17bac7220d8504e68d1d4f66896eb13b91"
|
||||
},
|
||||
"thirty_fifth_wave_validation": {
|
||||
"state": "validated_uncommitted",
|
||||
"integration_base": "06039d17bac7220d8504e68d1d4f66896eb13b91",
|
||||
"log_directory": "/tmp/stock-bot-wave35.fQycky",
|
||||
"scope": "Partial R05 explicit source-export web normalization preview and content-addressed retention; existing canonical selection and Rust execution unchanged.",
|
||||
"source_archive": "/tmp/stock-bot-wave35.fQycky/validated-source.tar.gz",
|
||||
"source_archive_sha256": "029dd93e14ee7a9fa72f7b06118c708ce1ecad6711fa6d0411bc0fe2e0ada7fa",
|
||||
"source_hashes": {
|
||||
"apps/stock/config/src/contracts/canonical-research.ts": "cfe483420deb2d61cd68c66f878ea8f29d24bed93efbdce9ac23475dbe5c1e77",
|
||||
"apps/stock/orchestrator/src/data/retained-research-dataset.ts": "a58018046fcbb42d84b8f2dba74ffe955cf5ec9edf2ec01a1d4f001a8fa07ab0",
|
||||
"apps/stock/web-api/src/routes/create-routes.ts": "c5241c0b508e5c72c842c17af427107a7bab0195f59f975ab3302980076b75d9",
|
||||
"apps/stock/web-api/src/routes/datasets.routes.ts": "4ac8a612fb4f4ce739eb453bd3090bf626be1e7523c64e0ddf02540b1d47ccfa",
|
||||
"apps/stock/web-api/src/server-with-websocket.ts": "91c3ed7a31c4bfb4e0e5f5dcf632ea3c1fc10996774caac9120fc4e12d105963",
|
||||
"apps/stock/web-api/src/services/canonical-research.service.ts": "8380dd8441114a7ecb855e7f9e4f6cc5663e20d1ae95f33d6ee90f3ccc263535",
|
||||
"apps/stock/web-api/src/services/dataset-preparation.service.ts": "3218b47d9274c41c355e2298f65a3b6b46809b856c24f9579f7439af4142f239",
|
||||
"apps/stock/web-app/src/features/backtest/components/CanonicalSetup.tsx": "6cbe42e8f2fb26a2dca388df1dea62b4e6d1a6b3d5db345f81c49b18270eb4e9",
|
||||
"apps/stock/web-app/src/features/backtest/components/DatasetPreparation.tsx": "ac57b1428752659f4397ac605a320ea0e1588f06e1121a192d0ef81321747e03",
|
||||
"apps/stock/web-app/src/features/backtest/services/backtestApiV2.ts": "dee06f75602c626e37005113774d1119d3788a1f0e8991e25b8b6693d2478188",
|
||||
"scripts/import-research-dataset.ts": "82f944dcfae92c4e84ffc1b86d25a1f830c39487d9b60e682ca04b0b5dfcf960",
|
||||
"test/e2e/fixture.ts": "a6471482ad6e06edc1c1f2ed5445b241b0b824e691d5f24289fbc4bcf38102f9",
|
||||
"test/e2e/workbench.test.ts": "74564afb5b3ffe69f109963ffed4b5d6ae2bf12d8b30cf2b435c95394754ef0a",
|
||||
"test/integration/dataset-source-preparation-ui.test.tsx": "1eb22ab01e11189bdd379e64d5d54e1ccb30182e20936882d0c679e9a7d91378",
|
||||
"test/integration/dataset-source-preparation.test.ts": "2f35cf78e2b41d00561ba3e7c696b00e82a78f06d0f791c9c88271fea01d2c0f",
|
||||
"test/postgres/dataset-source-preparation.test.ts": "24556cd201985fbd7d126ce1994f86fd53dcfc5487efbabd0439d91e735169ca"
|
||||
},
|
||||
"commands": [
|
||||
{
|
||||
"command": "CARGO_BUILD_JOBS=2 bun run check",
|
||||
"log": "integration-check-final.log",
|
||||
"result": "Passed secret audit/build/types/contracts/lint; 93 tooling, 43 utility, 44 calculation, 1077 integration and 150 Rust tests. Four existing manual Rust cases ignored."
|
||||
},
|
||||
{
|
||||
"command": "bun run test:postgres",
|
||||
"log": "integration-postgres-final.log",
|
||||
"result": "Passed final release PostgreSQL/Redis: 240 tests /2157 assertions across28 files; zero failures."
|
||||
},
|
||||
{
|
||||
"command": "bun run test:e2e",
|
||||
"log": "integration-browser-final.log",
|
||||
"result": "Passed final production Chromium: 16 workflows /590 assertions; zero failures. Includes actual source JSON preview/retention/picker/save/native oracle and saved finding reopening."
|
||||
},
|
||||
{
|
||||
"command": "Strict all affected/new test TypeScript; explicit sixteen-file ESLint and Prettier",
|
||||
"logs": [
|
||||
"root-tests-types-final.log",
|
||||
"authored-lint-final.log",
|
||||
"source-format-final.log"
|
||||
],
|
||||
"result": "Passed without exclusions for new/affected files."
|
||||
},
|
||||
{
|
||||
"command": "git diff --check; source hashes; task file references/dependency DAG",
|
||||
"result": "Passed: 16 source/test hashes, 55 unique task files, acyclic dependencies; engine source and all historical SQL unchanged."
|
||||
}
|
||||
],
|
||||
"review": {
|
||||
"independent_reviewer": "/root/r04_review",
|
||||
"backend_archive": "/tmp/stock-bot-wave35.fQycky/backend-final.tar",
|
||||
"backend_archive_sha256": "12bbb5206b7d22d3519c0bac50ef6b27200217f45d37fcc220d2c54c461c1621",
|
||||
"backend": "Accepted all seven exact integrated files. Focused integration/native/auth8/131; PostgreSQL5/58; compatible normalizer/catalog suite26/251. Types, scoped test types, all-file lint/format pass. Shared custody/CLI reexport and existing eligibility semantics preserved.",
|
||||
"frontend_archive": "/tmp/stock-bot-wave35.fQycky/frontend-final.tar",
|
||||
"frontend_archive_sha256": "f4136bb6e3cd8f8590c60cc623fdd2162eee30ffadbd7230a9fa456ecf2a5a44",
|
||||
"frontend": "Accepted all four exact integrated files. Focused45/166, combined existing/new UI132/662. New tests cover unknown-response exact retries, definitive rejection repair, source/parent stale responses, different-hash selection, disabled/save races and metadata display. Root strict affected-test check passes without the owner local inherited noUnusedParameters exception.",
|
||||
"root": "Shared DTO, web-only transport setting and fixture, actual existing native browser oracle extended with file preview/retention/reopen accepted. Focused browser1/119,15 unselected workflows skipped; actual >1MiB JSON consumption preserves identical normalized content and zero preview writes. Final full repository, database and browser suites passed on the frozen integrated source.",
|
||||
"corrections": "Review closed same-event Retain→Clear retry-state loss, response parser unknown-field stripping/direct-source lineage gap, and distinguished definitive400/409 from uncertain retention. First browser failures were exact hash/overbroad calendar selectors; scoped visible metadata selectors fixed them with unchanged application behavior."
|
||||
},
|
||||
"engine": {
|
||||
"debug_sha256": "75e33ffdd1e2738537879e62243a9d8f63665864835a58c46087bb4b78f274ff",
|
||||
"release_sha256": "ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103",
|
||||
"note": "Engine source unchanged. Fullcheck built debug; verified unchanged release restored before final database/browser suites."
|
||||
},
|
||||
"limits": [
|
||||
"Source export is complete supplied metadata/bars, not provider retrieval or independent provenance certification. No calendar, universe, action-free coverage or publication-time inference.",
|
||||
"Preview performs no IO. Exact-hash content custody can retain valid unavailable datasets; current canonical eligibility continues to reject exploratory/ineligible/multiasset execution.",
|
||||
"R05 remains partial: durable provider-query preparation/first-run binding and broader default cutover are outstanding. No v1 conversion, migrations, new scheduler or financial semantics.",
|
||||
"Web server small1MiB application restriction removed using MAX_SAFE_INTEGER transport setting and shared browser fixture. This is not an unlimited-size or performance guarantee; generic service boot unchanged.",
|
||||
"Existing mounted operator/service/admin and browser-origin authorization retained, including existing local AUTH_DISABLED development semantics. No new research-agent credentials.",
|
||||
"Performance/R07 measurement paused; candidate/AI/multiasset/paper/live/default activation gates unchanged."
|
||||
],
|
||||
"commits": "R09 committed06039d1 at owner request. Wave35 changes uncommitted; no push or PR.",
|
||||
"fixture_cleanup": {
|
||||
"result": "Both exact disposable --rm containers stopped after final suites passed; development services untouched.",
|
||||
"postgres": "cd8467b474238ca03f14fc2a0d24a0ff9d400e87c5161957c78b5847f81e42c8",
|
||||
"redis": "3acb7f10faa1bfe77c0ca72fe58f5a2251770a73f8ed080fc9982571ab4f354d"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,3 +105,19 @@ Deploy the existing **native research runner (`useRustEngine: true`)**, bundled
|
|||
- No profiling, performance optimization, benchmark runs, DSL, second job engine, simulator or deployment framework was added.
|
||||
|
||||
Final validation and source identity are recorded in `manifest.json` → `twenty_third_wave_validation` and the roadmap handoff.
|
||||
|
||||
## Authorized source-export preparation slice — 2026-10-24
|
||||
|
||||
Implement explicit web upload of complete `HistoricalDatasetInputV2` source metadata/bars, read-only normalized preview and exact-hash retention into the existing immutable dataset store. Reuse `createDatasetV2`, importer custody and current canonical eligibility. Show source/calendar/action/universe declarations and availability assumptions without claiming independent provider certification. Preview writes nothing; retain does not save a template or start a run. Identical retry/concurrent requests converge on one content-addressed row. Unknown/ineligible or unsupported multiasset datasets remain unavailable for canonical execution.
|
||||
|
||||
Acceptance: malformed/missing metadata and invalid bars reject; preview hash drift rejects before persistence; corrupt retained rows fail without overwrite; API authorization/CSRF/no-store preserved; file/input/request changes fence stale UI state; exact retention can retry after lost responses; other setup edits survive. A real browser uploads source JSON, previews without writes, retains, selects, saves and runs the unchanged Rust next-open oracle, then reopens identical provenance. Existing importer CLI and v1 datasets remain intact.
|
||||
|
||||
This slice excludes v1 conversion, external provider access, inferred evidence, new migrations/schedulers, financial semantics and any default/multiasset/paper/live/AI activation. Full R05 remains partial for durable provider-query preparation and cutover. No performance measurements.
|
||||
|
||||
## Validated source-export handoff — 2026-10-24
|
||||
|
||||
The above slice is independently reviewed and `partial_validated_uncommitted` on `06039d1`. The web now previews and retains complete explicit source exports using the same normalizer/custody as existing research, then selects through canonical setup. Existing offline importer behavior and historical datasets remain intact; no SQL or engine source changed. Definitive rejection repair, exact uncertain retries, content corruption/concurrency, parent/late UI state and actual native economics pass. The web transport accepts source requests beyond its former 1 MiB cap; this is a functional correction, not a throughput measurement.
|
||||
|
||||
Final gates: repository check 1077 integration /150 Rust plus93 tooling/43 utility/44 calculation tests; PostgreSQL240/2157; Chromium16/590; strict affected-test types, all16-file lint/format/hash/DAG/diff checks. Independent agent overlays and root browser/transport changes are accepted. Four prior manual Rust cases remain ignored. Logs/hashes/limits are in `manifest.json` → `thirty_fifth_wave_validation` and the [roadmap handoff](../../ROADMAP.md#thirty-fifth-wave-handoff--2026-10-24). Both disposable containers were removed.
|
||||
|
||||
Full R05 stays `in_progress`: automatic provider-query preparation/first binding and default cutover are not delivered. No performance work or candidate/multiasset/paper/live/AI activation occurred. Changes await the next authorized commit.
|
||||
|
|
|
|||
|
|
@ -79,3 +79,5 @@ Supported scope is independently reviewed and validated on `46a4f13`; status is
|
|||
Validation: full repository check passed 1024 integration /150 Rust, plus 93 tooling /43 utility /44 calculation tests; final PostgreSQL/Redis 235/2099 and Chromium 16/569. Strict test types, source/test lint, formatting, diff/source hash/DAG checks passed. The real SQL24 upgrade regression confirms missing role metadata fails closed before migration and ordinary experiments qualify afterward. Four preexisting Rust cases remain ignored. Both temporary test containers were removed.
|
||||
|
||||
Positive `regime_slice_reconciliation` remains conditional and unrun because no retained as-of annotation contract exists. The unavailable-state UI is tested; S05 alone does not enable classification. No performance work, financial changes or trading/AI activation. Exact hashes, logs, independent review and limits: [wave34 manifest evidence](../manifest.json), [roadmap handoff](../../ROADMAP.md#thirty-fourth-wave-handoff--2026-10-24).
|
||||
|
||||
Accepted by owner continuation and committed as `06039d1` on 2026-10-24. Supported R09 is done; conditional regime-annotation limitations remain unchanged.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue