diff --git a/docs/development/ROADMAP.md b/docs/development/ROADMAP.md index 6d0d3fea..eb50b854 100644 --- a/docs/development/ROADMAP.md +++ b/docs/development/ROADMAP.md @@ -1,6 +1,6 @@ # Revised development roadmap -Current follow-up: [real-data research workflow](real-data-research.md), complete. CL01–CL20 are independently accepted. RP01 adds scoped stored-source inspection; RP02 completed nine retained real-data runs after explicit strategy approval, exact reproduction and an evidence-linked finding reopened in the web app. CL21 and performance extensions remain deferred. Historical milestones below remain evidence, not a new activation request. +Current follow-up: [real-data research workflow](real-data-research.md), complete. CL01–CL20 are independently accepted. RP01 adds scoped stored-source inspection; RP02 completed nine retained real-data runs after explicit strategy approval, exact reproduction and an evidence-linked finding reopened in the web app. RP03 adds explicit declared-session preparation with read-only two-session source verification; RP04 explains the retained evaluation horizon beside CAGR. All 69 scheduled tasks across the original backlog and extensions are accepted; 7 conditional tasks and 4 merged redirects remain. CL21 and performance extensions remain deferred. Historical milestones below remain evidence, not a new activation request. ## Cleanup implementation — October 26, 2026 diff --git a/docs/development/backlog/README.md b/docs/development/backlog/README.md index 43226582..6a9dcf30 100644 --- a/docs/development/backlog/README.md +++ b/docs/development/backlog/README.md @@ -162,5 +162,5 @@ Owner authorized planning and per-task implementation commits. [Execution plan a - [RP01: Stored source coverage and quality](tasks/RP01.md) — done, `5bfaf37d`; explicit indexed instrument/timeframe lookup and window diagnostics. - [RP02: Retained real-data pilot](tasks/RP02.md) — done after explicit approval; nine completed runs, exact reproduction, independently reconciled results and an evidence-linked finding reopened in the web app. [Evidence](../real-data-research.md). -- [RP03: Declared-session source preparation](tasks/RP03.md) — in progress; extends the existing capture path without changing financial semantics. -- [RP04: Evaluation horizon and CAGR presentation](tasks/RP04.md) — in progress; makes short-sample annualization explicit. +- [RP03: Declared-session source preparation](tasks/RP03.md) — done, `d2b78eac`; explicit session capture preserves strict validation and captured-input retention. +- [RP04: Evaluation horizon and CAGR presentation](tasks/RP04.md) — done, `302ba60e`; retained UTC bounds and calendar duration make short-sample annualization explicit. diff --git a/docs/development/backlog/manifest.json b/docs/development/backlog/manifest.json index aa3545b1..02e9ec8c 100644 --- a/docs/development/backlog/manifest.json +++ b/docs/development/backlog/manifest.json @@ -1,8 +1,8 @@ { "schema_version": 1, - "plan_revision": "2026-10-27.89", + "plan_revision": "2026-10-27.90", "repository_base": "b7aeca4", - "plan_status": "multi_session_research_preparation_in_progress", + "plan_status": "research_preparation_followup_complete", "execution_authorized": true, "execution_scope": { "authorized_by": "Owner: commit and continue with the rest of the tasks till 100%", @@ -3145,7 +3145,7 @@ "epic": "E12", "priority": "P1", "severity": "High", - "status": "in_progress", + "status": "done", "dependencies": [ "RP01", "D01" @@ -3154,12 +3154,18 @@ "task_file": "backlog/tasks/RP03.md", "complexity": "M", "assignment": "/root/implement_source_inspection", - "completed_commit": null, + "completed_commit": "d2b78eacdfb8013f188f4260ba2a8cc86b9cb009", "blocker": null, - "integration_state": "implementing", - "integration_base": "91cc7e48", + "integration_state": "accepted", + "integration_base": "76eb1b1255643c797a8a82f313480932f299b84a", "completion_evidence": "real-data-research.md", - "release_gates": [] + "release_gates": [], + "review_status": "accepted", + "reviewers": [ + "/root/review_cleanup_backend", + "/root/review_cleanup_frontend" + ], + "review_notes": "Independent review and combined repository, PostgreSQL and Chromium gates passed. RP03 includes read-only actual source validation; no new real research execution." }, { "id": "RP04", @@ -3167,7 +3173,7 @@ "epic": "E12", "priority": "P1", "severity": "High", - "status": "in_progress", + "status": "done", "dependencies": [ "RP02" ], @@ -3175,12 +3181,17 @@ "task_file": "backlog/tasks/RP04.md", "complexity": "S", "assignment": "/root/review_cleanup_frontend", - "completed_commit": null, + "completed_commit": "302ba60e53cb104c32ad414432767e953f4b0777", "blocker": null, - "integration_state": "implementing", - "integration_base": "91cc7e48", + "integration_state": "accepted", + "integration_base": "76eb1b1255643c797a8a82f313480932f299b84a", "completion_evidence": "real-data-research.md", - "release_gates": [] + "release_gates": [], + "review_status": "accepted", + "reviewers": [ + "/root/review_cleanup_backend" + ], + "review_notes": "Independent review and combined repository, PostgreSQL and Chromium gates passed. RP03 includes read-only actual source validation; no new real research execution." } ], "review_note": "Independent skeptical revision: four superseded tasks retain stable IDs; deferred work is not a dependency of scheduled tasks. Release gates are distinct from implementation prerequisites.", diff --git a/docs/development/real-data-research.md b/docs/development/real-data-research.md index 77430383..1de82d70 100644 --- a/docs/development/real-data-research.md +++ b/docs/development/real-data-research.md @@ -81,3 +81,35 @@ Baseline total return was approximately -0.054575%. The fixed SMA 3/8 cost scena Independent reviewer `/root/review_cleanup_backend` accepted 2,374 file-only assertions across the nine results and finding: fixed-eight cash/fee/quantity/P&L/owner reconciliation, no negative cash or position quantity in the observed fills, exact artifact/lock and sliced-dataset identities, reproduction hashes, sealed report/selection hashes, training-only winner, unchanged non-cost policy and all 19 evidence references. This audit does not claim to cover every possible risk path or independently prove unrelated database state was untouched. Full failure-oriented repository/PostgreSQL tests provide the broader regression gate. Actual development Chromium signed in and reopened the [saved baseline and trades](http://localhost:5173/backtests/373e1046-64fc-409e-b414-da46fb20bea3/run/3f87ca4c-b61c-4eba-996a-94fdb525369d) and the [project finding](http://localhost:5173/research/59027da7-4e84-4c71-ac3e-10cab219f0c4). That browser context blocked every non-read API operation except authentication. Local `browser-reopened.json`, `execution-summary.json`, `execution-status.json`, `independent-audit.json` and `independent-review.mts` retain the completion evidence. The original execution plan and pending capability snapshots remain historical records; they were not rewritten to conceal the approval sequence. + +## RP03 / RP04 — Session preparation and result interpretation + +Owner continuation on October 27 authorized these two follow-ups; planning commit `76eb1b12` records their scope. RP03 (`d2b78eac`) adds an explicit declared-session choice to the existing stored-EOD preparation panel and API. RP04 (`302ba60e`) shows retained UTC evaluation bounds and exact elapsed calendar duration beside canonical metrics, explains CAGR's 365-calendar-day extrapolation, and distinguishes periodic-statistics annualization. No financial calculations, dataset hash format, risk policy or native execution semantics changed. + +Session selection intersects the chosen series' declared calendar with its bounds, reads each window sequentially through the existing strict reader, snapshots returned values before another read and assigns global deterministic ordinals. The default continuous query and response remain compatible. Missing sessions, invalid selected rows and partial bars fail; no rows are coerced or post-filtered. The web client checks the echoed selection, fences stale responses and retains/retries the captured input and hash without source rereads. [Usage and limitations](../backtest-datasets.md#stored-eod-preparation-across-declared-sessions-v2). + +Independent backend and frontend reviews accepted RP03. The backend's 44 focused tests / 361 assertions plus eight adversarial probes covered selected-calendar identity, invalid/empty windows, cancellation and mutation isolation. Independent frontend review passed 96 tests / 361 assertions covering selection echo, stale replies and retention locking. RP04's independent review passed 21 UI tests / 157 assertions; the duration formatter uses retained reporting facts and preserves all stored metrics/null reasons and the fills-only view. Root-authored PostgreSQL/browser tests were also independently reviewed. + +Actual read-only AAPL five-minute source validation used explicitly declared October 1 and 2 windows, each 13:30–20:00 UTC: + +| Evidence | Result | +| --- | --- | +| Continuous source query | 157 rows; preparation rejects the interior October 1 20:00 null-volume marker | +| Declared-session preview | Exactly two strict-reader queries; 156 unchanged bars, 78 per session | +| Repeated preview | Exact input rows, global ordinals and v2 hash reproduced | +| Raw selected capture SHA256 | `7e2925c8c97bcbb01406efdb5a5a8557c2135c0a1f28aa557c7ccf0e6f8dd067` | +| Prepared dataset hash | `3b2411cecc4014e7090f04d4220732968aec1a58041fce82b7149765d9ba00a3` | +| Independent actual-source validation | 2,366 assertions passed; no retention, database writes or research runs | + +Ignored local evidence and the reproducible validator are under `.data/research-pilots/aapl-20241001-02-preparation/`. The calendar/action metadata explicitly declares engineering validation scope; eligibility means contract validity, not certified market coverage. Sequential reads are not an atomic database snapshot. Captured values define the eventual dataset; cancellation fences later reads/results but does not interrupt an already dispatched Mongo query. This two-session check is not evidence of strategy performance, market-data vintage or general completeness. + +Combined checkout gates: + +- `CARGO_BUILD_JOBS=2 bun run check`: passed — 134 tooling, 43 utility, 44 calculation, 1,266 integration and 150 Rust tests; 14 conditional integration skips and 4 ignored Rust measurement tests remain. Build, application/contract types, lint and secret audit passed. +- Relevant disposable PostgreSQL suites (`stored-dataset-preparation`, `dataset-source-preparation`, `canonical-research`): 14 passed / 169 assertions. Preview writes nothing; retention after source changes and retries save one exact dataset, with unrelated tables unchanged. +- Full Chromium workbench: 20 passed / 685 assertions. New coverage checks both displayed UTC windows, exact source queries, captured-input retention after source removal, unchanged template/no runs or dispatch, and the actual-native result horizon/CAGR explanation. +- Authored application/test types, focused zero-warning lint, production frontend build, formatting and diff checks passed. No development data was used as a mutable test fixture. + +The initial sandbox checks could not reach fixture ports/launch Chromium or complete native workers. Authorized reruns passed. One browser attempt also overlapped the general frontend build and picked up the wrong API target; it was stopped, then the complete browser suite passed after serializing builds. Those interrupted attempts are not counted as successful validation. Logs: `/tmp/stock-bot-rp03-root-check-escalated.log`, `stock-bot-rp03-postgres.log`, `stock-bot-rp03-browser-final.log`, `stock-bot-rp03-root-test-types.log` and independent `stock-bot-rp03-*-review*.log` / `stock-bot-rp04-independent-review.log`. + +Both stories are accepted. All 69 scheduled tasks are complete; seven conditional tasks and four merged redirects remain in the 80-ID manifest. Performance work, CL21 and paper/live activation remain deferred.