feat(research): compare saved experiments against explicit trials

This commit is contained in:
Boki 2026-10-24 14:06:21 -04:00
parent 397cd0e160
commit 46a4f13acd
22 changed files with 3045 additions and 35 deletions

View file

@ -1,6 +1,6 @@
# Canonical development backlog
**First thirty-one waves committed; full R08 is validated and awaiting commit.** Walk-forward is committed as `3ed7b98`; **35 of 45 scheduled tasks are fully committed (78% by count), with R08 ready for acceptance**. Fee/slippage diagnostics now reuse the existing experiment workbench. R05/R07 remain partial; performance work stays paused.
**First thirty-two waves committed; R07 functional comparison is validated and awaiting commit.** Full R08 is committed as `397cd0e`; **36 of 45 scheduled tasks are fully committed (80% by count)**. R05 remains partial; R07 retains only its paused table measurement after this functional component is accepted.
## One source of truth
@ -78,8 +78,8 @@ Relative size: S narrow correction, M coherent boundary, L sensitive owner-contr
| [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 / 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 (component) | R06 component API pinned; release after integration, ADR-006 | W04 | Full-stack research product / M |
| [R08 Add bounded chronological and reset-segment validation](tasks/R08.md) | P1 / review (validated, awaiting commit) | R06, ADR-006 | — | Quantitative research integrity / M |
| [R07 Deliver sweep configuration and comparable-result views](tasks/R07.md) | P1 / in_progress (functional validated, awaiting commit; 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 / 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 |
@ -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.
R06 is complete and committed as `b373410`; R08's walk-forward component is committed as `3ed7b98`. Bounded cost sensitivity now completes supported R08 implementation, independently validated and awaiting acceptance/commit. Next non-performance work is R07 comparison across saved experiments. R05/R07 remain partial; R09 also depends on R07, and AI/default/trading activation retain their gates. Provider preparation is independent of experiments over retained data; performance work remains paused.
R06 is complete (`b373410`), and full supported R08 is committed as `397cd0e`. Wave33 independently validates read-only comparison across saved standalone experiments and awaits commit. R07 functional acceptance does not require resuming its paused table measurement; R09 may consume the accepted functional component after commit. R05 remains partial, and AI/default/trading activation retain their gates.

View file

@ -1,14 +1,14 @@
{
"schema_version": 1,
"plan_revision": "2026-10-24.68",
"plan_revision": "2026-10-24.70",
"repository_base": "b7aeca4",
"plan_status": "thirty_second_wave_validated_awaiting_commit",
"plan_status": "thirty_third_wave_functional_validated_awaiting_commit",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "User: commit and continue; accepted walk-forward workflow committed 3ed7b98f7cf0e7e1da8f00fc990c3511bd875ce9",
"tasks": ["R08"],
"authorized_by": "User: commit and continue; accepted full R08 committed 397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963",
"tasks": ["R07"],
"permissions": [
"Complete R08 bounded fee/slippage sensitivity as an existing experiment mode with immutable fixed-template inputs, Rust simulation and integrated web results/retry/reproduction"
"Read-only comparisons across two saved standalone experiments, explicit reference trial and preserved native summaries; no rankings or financial recomputation"
],
"excluded": [
"performance_profiling_or_optimization",
@ -1402,24 +1402,29 @@
"completed_commit": null,
"blocker": null,
"release_gates": ["W04"],
"integration_state": "partial_validated_committed",
"integration_base": "6f64ef62ba233b293ea1374c753bd0b467703792",
"integration_state": "partial_validated_uncommitted",
"integration_base": "397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963",
"worktree": "/home/boki/repos/stock-bot",
"execution_component": "Per-trial retry controls and retained history",
"component_exclusions": ["cross-experiment comparisons and table performance measurements"],
"component_readiness": "Integrated against the validated R06 retry contract. Full R07 still excludes broader cross-experiment comparison and paused table rendering measurements.",
"execution_component": "Read-only cross-experiment comparison with explicit reference and retained input compatibility",
"component_exclusions": ["Large-table performance measurements remain paused"],
"component_readiness": "Cross-experiment comparison is independently reviewed and all root gates pass. Functional acceptance awaits owner commit; only explicitly paused large-table measurement remains outstanding in full R07.",
"reviewed_by": "/root/r04_review",
"verification_reference": "ROADMAP.md#twenty-eighth-wave-handoff--2026-10-24",
"review_notes": "Retry/history controls independently reviewed and all integrated gates passed. Broader comparison and paused table measurements remain outstanding; full task is not complete.",
"verification_reference": "ROADMAP.md#thirty-third-wave-handoff--2026-10-24",
"review_notes": "Final exact source snapshots accepted. Full repository, PostgreSQL/Redis, Chromium and authored types/lint/format pass. Matching retained inputs is not financial/statistical equivalence; no performance measurement claimed.",
"implementation_slices": [
{
"owner": "/root/r12_backend",
"worktree": "/tmp/stock-bot-wave33.c3IAY2/backend",
"scope": "Pure compatibility helper, repeatable read-only service/API, pure/HTTP/PostgreSQL regressions"
},
{
"owner": "/root/r12_frontend",
"worktree": "/tmp/stock-bot-wave28.AqRnN8/frontend",
"scope": "Failed-trial review/retry/history UI, frozen intent through refresh and ambiguous responses, interaction regressions"
"worktree": "/tmp/stock-bot-wave33.c3IAY2/frontend",
"scope": "Saved list selection, strict comparison client/page, focused UI regressions"
},
{
"owner": "/root",
"scope": "Shared DTO, migration allowlist/old fixtures, actual native browser workflow, integrated gates and planning"
"scope": "Shared DTO/export and route, real native browser acceptance, integrated gates and planning"
}
],
"partial_commit": "b373410320e987ddce1ee8dd5e8a691cf183d527"
@ -1430,7 +1435,7 @@
"epic": "E6",
"priority": "P1",
"severity": "High",
"status": "review",
"status": "done",
"dependencies": ["R06"],
"decision_dependencies": ["ADR-006"],
"task_file": "backlog/tasks/R08.md",
@ -1442,10 +1447,10 @@
"assignment": "/root",
"branch": null,
"pull_request": null,
"completed_commit": null,
"completed_commit": "397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963",
"blocker": null,
"release_gates": [],
"integration_state": "validated_uncommitted",
"integration_state": "validated_committed",
"integration_base": "3ed7b98f7cf0e7e1da8f00fc990c3511bd875ce9",
"worktree": "/home/boki/repos/stock-bot",
"execution_component": "Bounded immutable fee/slippage diagnostics in the existing experiment lifecycle",
@ -1456,7 +1461,7 @@
],
"reviewed_by": "/root/r04_review",
"verification_reference": "ROADMAP.md#thirty-second-wave-handoff--2026-10-24",
"review_notes": "Full supported R08 scope independently accepted: chronological preflight, durable fixed-winner validation, repeated reset-segment walk-forward and bounded template cost sensitivity. All root repository/PostgreSQL/Chromium gates pass. Awaiting owner acceptance/commit; unsupported trained/nonzero-horizon models remain explicit refusals, not missing purge infrastructure.",
"review_notes": "Full supported R08 scope independently accepted: chronological preflight, durable fixed-winner validation, repeated reset-segment walk-forward and bounded template cost sensitivity. All root repository/PostgreSQL/Chromium gates pass. Accepted and committed at owner request; unsupported trained/nonzero-horizon models remain explicit refusals, not missing purge infrastructure.",
"implementation_slices": [
{
"owner": "/root/r12_backend",
@ -1506,7 +1511,8 @@
"when": "Saving or linking a research finding is enabled",
"tasks": ["R03"]
}
]
],
"component_readiness": "After accepted wave33 functional commit, replace whole-R07 prerequisite with a satisfied_component_dependencies record for accepted comparison/sweep/retry UI, retaining R08 dependency. Paused table measurement is not a functional prerequisite; do not mark ready before commit."
},
{
"id": "R10",
@ -7161,8 +7167,8 @@
"Performance and candidate/AI/multiasset/default/paper/live activation remain paused or gated."
],
"thirty_second_wave_validation": {
"state": "validated_uncommitted",
"scope": "Completes supported R08 implementation; owner acceptance/commit pending. R09 also depends on partial R07.",
"state": "committed",
"scope": "Completes supported R08 implementation; accepted and committed. R09 still requires R07 functional comparison.",
"integration_base": "3ed7b98f7cf0e7e1da8f00fc990c3511bd875ce9",
"log_directory": "/tmp/stock-bot-wave32.Dg3iwI",
"source_archive": "/tmp/stock-bot-wave32.Dg3iwI/validated-source.tar.gz",
@ -7258,6 +7264,100 @@
"Performance work stays paused. R07 comparison remains partial and R09 retains its R07 dependency; candidate/AI/multiasset/default/paper/live gates unchanged."
],
"fixture_cleanup": "Both exact disposable PostgreSQL and Redis containers removed after all final gates. Development services untouched; isolated worktrees and local evidence retained.",
"commits": "Wave31 committed3ed7b98. Wave32 remains uncommitted; no push or PR."
"commits": "Committed as 397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963 following owner authorization. No push or PR.",
"completed_commit": "397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963"
},
"thirty_third_wave": ["R07"],
"thirty_third_wave_base": "397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963",
"thirty_third_wave_notes": [
"Compare exactly two standalone saved parameter/cost experiments against explicit left trial; default frozen index0, never a best/completed candidate.",
"Same-client repeatable read-only snapshot; effective candidate inputs and compact saved summaries; no runtime/provider/full-result reads or writes.",
"Only known admission and owner IDs normalize. All retained economic/data/clock/build policies compare exactly; intended strategy/parameter differences remain visible.",
"Settings compatibility and saved summary availability remain separate; every outcome and null reason remains visible. No ranking, derived economics or significance/OOS inference.",
"R07 functional acceptance is separate from explicitly paused table measurement. After acceptance/commit, R09 can consume that functional component without resuming performance work.",
"Root integrates shared contract and actual native browser lifecycle; backend/frontend isolated; independent reviewer; no new-wave commit/push/PR."
],
"thirty_third_wave_validation": {
"state": "partial_validated_uncommitted",
"log_directory": "/tmp/stock-bot-wave33.c3IAY2",
"integration_base": "397cd0e1603b7ccd01bf80c9ff3930ba2a1b9963",
"scope": "R07 functional comparison; table measurement explicitly not run, so full original R07 checklist remains partial.",
"source_archive": "/tmp/stock-bot-wave33.c3IAY2/validated-source.tar.gz",
"source_archive_sha256": "75a32fb7883ceb58d36ee71fd0b59e4c554e8e1efbc81e7b2b79cd54d08253e0",
"source_hashes": {
"apps/stock/config/package.json": "cfa5128f4be5185c3737c501ec316715f6f20dccda65918cd87c2161f2d2a96e",
"apps/stock/config/src/contracts/experiment-comparison.ts": "11d23fc6a61cd8bc4e4322b8469a6d1f9e4e9ca85dcc48641ba84ccedc940691",
"apps/stock/web-api/src/routes/experiments.routes.ts": "7b228a520aa9692e577c75514d10dc0d33d2bfefc98d1ca917e4c4ec8ad546f2",
"apps/stock/web-api/src/services/experiment-comparison.ts": "395e3b3d86d0e1a4f8a8674094be25da7ab631dda3fb5bfbd08ecb10236d882e",
"apps/stock/web-api/src/services/experiments.service.ts": "f12dd8657acdc8c8380a1b48a8fd887e5761b8cfad98af163ea86221e17ffaad",
"apps/stock/web-app/src/app/App.tsx": "6dfbd8a249bb898e83d752675f8c0ddc757a6f51162a695a0f117cf870a40e30",
"apps/stock/web-app/src/features/experiments/ExperimentComparisonPage.tsx": "3603ff57ebaf08e6d73b16cd1d92c2a64e596af956309cbe8e1280e73fc9ec3f",
"apps/stock/web-app/src/features/experiments/ExperimentDetailPage.tsx": "f9d2339cbfc5901610cd61f9064fd8e80f198a666c22dc5ee7893947df77944a",
"apps/stock/web-app/src/features/experiments/ExperimentListPage.tsx": "76a0d715065ff637d63d81578728ab6efc447aee49112a6ed355357ce8b2b7be",
"apps/stock/web-app/src/features/experiments/components/trialMetricText.ts": "7418113711628e91427cce204d74b551b071e25789793591f380d0ce4f015937",
"apps/stock/web-app/src/features/experiments/index.ts": "291a41945d0ec33852662c4c26366ad682f74d4e2e59277af021a631c24a64f5",
"apps/stock/web-app/src/features/experiments/services/experimentComparisonApi.ts": "94d847ad138446cacdf564a56740f378b4816a312c1db8336f87c7a77d8044af",
"test/e2e/workbench.test.ts": "71962e25e40def52b75425b00ff19856c77de6bb3ba4e2ae47f1fdd2b33cc21d",
"test/integration/experiment-comparison-api.test.ts": "70e96ea65a42a2281f54ca85a1206518da5037b01fcdc5359d28e1846ac22761",
"test/integration/experiment-comparison-ui.test.tsx": "6e22626b8812a9ce5e8ff41ec25aaf8825e9dd20b43653ba3d416c69d54e5b15",
"test/integration/experiment-comparison.test.ts": "f01b412e0b045fe76238d5dc542873c74720495917cbf6faf8022d3ed79026b4",
"test/postgres/experiment-comparison.test.ts": "dfc6e7ffda1b69acecb7bfb5be65c3d5742e7be58ce108f6284a96df1547c1ce"
},
"commands": [
{
"command": "CARGO_BUILD_JOBS=2 bun run check",
"log": "integration-check-final.log",
"result": "Passed all repository gates: secret audit/build/types/contracts/lint; 93 tooling, 43 utility, 44 calculation, 988 integration and 150 Rust tests, zero failures. Four preexisting Rust cases remain ignored."
},
{
"command": "bun run test:postgres",
"log": "integration-postgres-final.log",
"result": "228 passed, 2013 assertions, zero failures against disposable PostgreSQL and Redis DB15."
},
{
"command": "bun run test:e2e",
"log": "integration-browser-final.log",
"result": "16 passed, 500 assertions, zero failures; same-origin production Chromium with native release engine."
},
{
"command": "Strict authored-test TypeScript; explicit authored source/test ESLint; changed-source Prettier",
"logs": [
"root-tests-types-final.log",
"authored-lint-final.log",
"source-format-final.log"
],
"result": "Passed, including all new pure/API/UI/PostgreSQL tests and modified native browser acceptance."
},
{
"command": "git diff --check; manifest references/dependency DAG; accepted overlay and source SHA256 verification",
"result": "Passed; all55 task references exist, implementation DAG is acyclic;12 exact agent files and all17 integrated source hashes match independent review."
}
],
"review": {
"independent_reviewer": "/root/r04_review",
"backend": "Six exact owned files reviewed; independent pure/API9 tests/95 assertions and owner native PostgreSQL4/46. Exact policy partition, unavailable default reference, historical no-write reads and genuine concurrent-update repeatable snapshot.",
"backend_archive": "/tmp/stock-bot-wave33.c3IAY2/backend-final.tar",
"backend_archive_sha256": "2c4c4db694a60390a5e553819baf36b95fa4d83497409bcd4cff32f663887f8f",
"frontend": "Six exact owned files reviewed; independent UI53 tests/139 assertions. Pair/reference identity fencing, all outcomes/nulls, click order, effective costs and existing unsaved-navigation protection.",
"frontend_archive": "/tmp/stock-bot-wave33.c3IAY2/frontend-final.tar",
"frontend_archive_sha256": "cc79b25e3a797ea5fe94d8799a37db5d9d5b77633e503f8d37c4fb2e9164adec",
"root": "DTO/export and App route reviewed. Actual five-native-trial browser case confirms saved summary parity, archival/revocation, reference changes/reload/exact run and no new work.",
"corrections": "Early browser caught ambiguous reference-select label, fixed explicitly. Review caught mixed-case PostgreSQL UUID identity mismatch, fixed via shared normalized input and client decoder reuse; regressions pass. No remaining source blockers."
},
"engine": {
"debug_sha256": "75e33ffdd1e2738537879e62243a9d8f63665864835a58c46087bb4b78f274ff",
"release_sha256": "ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103",
"note": "Financial engine unchanged. Full check builds debug; verified unchanged release artifact restored before final database/browser gates."
},
"limits": [
"Exactly two standalone parameter/cost experiments; chronological phases and walk-forward members retain their dedicated workflows.",
"Reference defaults to left frozen candidate0 even if unavailable; explicit key must belong to left. Every candidate remains visible, with original order and null reasons.",
"Matching retained settings and available compact scalar summaries do not establish economic equivalence, full financial reconciliation, independence, significance or OOS validity.",
"No new financial formulas, rankings, result persistence, SQL migration, scheduler or engine path.",
"No performance/profiling/benchmarks. Full R07 retains paused table measurement; its accepted functional component may satisfy R09 after commit.",
"R05 provider/default cutover and candidate/AI/multiasset/paper/live gates remain unchanged."
],
"commits": "Wave32 committed397cd0e. Wave33 remains uncommitted; no push or PR.",
"fixture_cleanup": "Both exact disposable PostgreSQL37f4d89... and Redisf1e69a88... containers stopped and removed after final gates. Development services untouched; worktrees and local evidence retained."
}
}

View file

@ -88,3 +88,17 @@ The first experiment UI component is committed as `6f64ef6`. Add per-trial faile
The retry/history component is independently reviewed and committed as `b373410`; full R07 remains partial. The actual Chromium workflow retries a failed canonical trial, verifies the original immutable inputs despite template edits, replays the accepted receipt after completion and reopens saved failure history and the native result. Interaction tests cover uncertain responses, stale refresh/route responses, cancellation coordination, null/history/error states and explicit discard/new intent. Exact logs and hashes: `manifest.json` → `twenty_eighth_wave_validation`.
Full R07 remains in progress for broader cross-experiment comparison and table measurements. All performance work stays paused. No new finance, statistics or result-ranking logic was added.
## Cross-experiment comparison continuation — 2026-10-24
Compare two standalone saved parameter/cost experiments from the existing list. The explicitly selected left trial is the reference; omitted key means its frozen index zero even if failed or unavailable. Show every original-order outcome. Match retained dataset/window/capital/effective costs/execution/risk/clock/analytics/seed/build/models, normalizing only specified admission/owner IDs; strategy implementation and parameters may intentionally differ. Separate matching settings from compact saved-summary availability. No ranking, financial recomputation or statistical-validity claim.
The GET API uses one repeatable read-only transaction and existing compact detail reads. Historical reads survive archival/current approval changes. Strict browser decoder verifies pair/reference/ordered row identities; route changes fence late reads, reload retains the reference, and existing editor navigation protection covers comparison links. Actual native browser acceptance plus pure/API/PostgreSQL/UI tests cover cost overrides, incomplete evidence, policy differences, strict errors and snapshot consistency.
Functional acceptance and the explicitly paused large-table measurement are tracked separately. Do not claim the measurement ran. Once this functional component is accepted and committed, downstream R09 can depend on it without waiting for performance work.
### Validated comparison handoff
The functional comparison component is independently accepted and awaiting commit. All 17 integrated source/test/config files match reviewed snapshots. Whole repository gates pass (988 integration /150 Rust), final PostgreSQL 228/2013 assertions and Chromium 16/500; all authored tests pass strict types/lint and changed-source formatting. Exact hashes, commands and review corrections: `manifest.json` → `thirty_third_wave_validation`. Historical compact reads share a repeatable read-only transaction; actual native browser acceptance confirms cost references, changed/archived inputs, saved metrics and exact-run reopening.
The large-table measurement remains explicitly paused/unrun; full R07 therefore stays partial. After functional component commit, R09 may consume the accepted sweep/comparison/retry UI through a recorded component prerequisite. No new economic formulas, ranking, statistical certification or performance work was added.

View file

@ -123,7 +123,7 @@ Reuse the existing editor ordinary owner, list/detail/retry/history and receipt
### Validated full-task handoff — 2026-10-24
Full supported R08 is independently reviewed and `validated_uncommitted`, awaiting owner acceptance/commit. Waves 29–31 provide frozen chronological input preparation, durable fixed-winner selection, immutable reports and bounded nonoverlapping heldout reset-window series. Wave 32 closes bounded cost diagnostics with one existing experiment type, automatic original-cost baseline and 1–99 explicit fee/slippage pairs. Fixed parameters/data/capital/other risk/build settings and the authoritative Rust engine are preserved; existing retry/reproduction and web workbench flows are reused.
Full supported R08 is independently reviewed and accepted, committed as `397cd0e` at owner request. Waves 29–31 provide frozen chronological input preparation, durable fixed-winner selection, immutable reports and bounded nonoverlapping heldout reset-window series. Wave 32 closes bounded cost diagnostics with one existing experiment type, automatic original-cost baseline and 1–99 explicit fee/slippage pairs. Fixed parameters/data/capital/other risk/build settings and the authoritative Rust engine are preserved; existing retry/reproduction and web workbench flows are reused.
Every repository gate passed (926 integration /150 Rust), final PostgreSQL/Redis 224 tests /1967 assertions and Chromium 15 workflows /457 assertions. Exact sources, independent reviews, controlled native fee/slippage/funding oracles, baseline economic parity, SQL/admission/recovery proofs and root browser evidence: `manifest.json` → `thirty_second_wave_validation`.