From 6976f1a25eb9090a96f63805fbbe09c070b23341 Mon Sep 17 00:00:00 2001 From: Boki Date: Tue, 27 Oct 2026 19:33:11 -0400 Subject: [PATCH] docs(research): record validated October pilot results (RP18) --- docs/development/ROADMAP.md | 2 +- docs/development/backlog/README.md | 4 +-- docs/development/backlog/manifest.json | 14 ++++++---- docs/development/backlog/tasks/RP18.md | 4 ++- docs/development/real-data-research.md | 38 ++++++++++++++++++++++++++ 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/docs/development/ROADMAP.md b/docs/development/ROADMAP.md index d9bcf0ec..502d1035 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). [RP18](backlog/tasks/RP18.md) is in progress: a frozen 1,794-bar October dataset, October 1 warmup and October 2–31 trading, with exactly nine predeclared baseline/reproduction, training/holdout and fixed-cost runs. Reuse the existing approved SMA version and financial policy; independent accounting/evidence review and web reopening are required before completion. RP17 is complete: candidate defaults are accepted consistently by the shared response decoder and additive SQL admission migration, preserving original inputs and hashes. RP15/RP16 are complete: structured CLI receipts survive journal/cleanup failure, and candidate publication accepts automatic catalog lineage while preserving exact retries. RP14 protects drafts and pending saves when following the creation dialog’s strategy link. RP13 restores browser reproduction of eligible unreviewed isolated candidates; RP11/RP12 are 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. RP05 enables older-page and known-hash dataset reuse; RP06 preserves settings and captured retention retries across same-backtest tabs/run URLs. RP07 downloads validated original datasets; RP08 downloads their original run results for local exploration. RP09 protects publication/clone custody during backtest handoff; RP10 preserves experiment choices when a linked template fails to load. RP11 preserves exact hypothesis links during unrelated history failures; RP12 keeps run history selectable while metrics load and retry. The previous 82 scheduled tasks across the original backlog and extensions are accepted; RP18 adds one active task, while 7 conditional tasks and 4 merged redirects remain. 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). [RP18](backlog/tasks/RP18.md) is complete: nine retained runs over a frozen 1,794-bar October dataset, exact economic reproduction, independent financial/provenance review and web reopening of results, trades, validation, costs and the evidence-linked finding. The observed SMA losses do not support promotion. RP17 is complete: candidate defaults are accepted consistently by the shared response decoder and additive SQL admission migration, preserving original inputs and hashes. RP15/RP16 are complete: structured CLI receipts survive journal/cleanup failure, and candidate publication accepts automatic catalog lineage while preserving exact retries. RP14 protects drafts and pending saves when following the creation dialog’s strategy link. RP13 restores browser reproduction of eligible unreviewed isolated candidates; RP11/RP12 are 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. RP05 enables older-page and known-hash dataset reuse; RP06 preserves settings and captured retention retries across same-backtest tabs/run URLs. RP07 downloads validated original datasets; RP08 downloads their original run results for local exploration. RP09 protects publication/clone custody during backtest handoff; RP10 preserves experiment choices when a linked template fails to load. RP11 preserves exact hypothesis links during unrelated history failures; RP12 keeps run history selectable while metrics load and retry. All 83 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 24839e99..19547000 100644 --- a/docs/development/backlog/README.md +++ b/docs/development/backlog/README.md @@ -8,7 +8,7 @@ [manifest.json](manifest.json) owns scheduling metadata: status, priorities, dependencies, ADR approvals, assignments and write locks. Task Markdown owns implementation scope/evidence/acceptance. This index and the [graph](dependencies.mmd) are derived views. Only the planning/integration owner updates scheduling state. -**Current total: 94 retained IDs — 82 done, 1 in progress, 7 deferred, 4 merged.** RP18 is the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation. +**Current total: 94 retained IDs — 83 done, 7 deferred, 4 merged.** RP18 completes the bounded October multi-session pilot; RP01–RP17 add the authorized real-data workflow and its dataset reuse, export and workflow recovery follow-ups. The earlier 68 IDs retain their state. E11 adds seven authorized cleanup tasks and one conditional replay extraction; see the manifest for current scheduling. The original backlog accounted for 55 IDs. F09/P07 added projection/profiling work; the owner deferred P08's TypeScript optimization. Merged records preserve traceability; never execute them separately. Deferred work requires its stated trigger and explicit activation. States: ready, claimed, in_progress, review, done, blocked, deferred, merged. “Ready” means no code/ADR prerequisite, not execution authority. Implementation dependencies require accepted integration. `release_gates` govern enabling an end-to-end feature, not component coding or integration; conditional gates apply only to the named capability. F05 may integrate before F06, but its replay behavior is not released until F06 proves it. @@ -187,4 +187,4 @@ Owner authorized planning and per-task implementation commits. [Execution plan a - [RP17: Candidate default parameters](tasks/RP17.md) — done, `1502ab41`; decode normalized validation children without changing original inputs or hashes. -- [RP18: October multi-session pilot](tasks/RP18.md) — in progress; freeze the 23-session dataset and exactly nine runs using the existing approved SMA version. Execution, independent accounting/evidence review and web reopening remain required; the seven conditional tasks stay deferred. +- [RP18: October multi-session pilot](tasks/RP18.md) — done; nine retained native runs, exact reproduction, independent accounting/provenance review and opened web findings passed. The seven conditional tasks stay deferred. diff --git a/docs/development/backlog/manifest.json b/docs/development/backlog/manifest.json index 9dd80651..b2831e6c 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.109", + "plan_revision": "2026-10-27.110", "repository_base": "b7aeca4", - "plan_status": "october_multisession_pilot_in_progress", + "plan_status": "october_multisession_pilot_complete", "execution_authorized": true, "execution_scope": { "authorized_by": "Owner: commit and continue with the rest of the tasks till 100%", @@ -3564,7 +3564,7 @@ "epic": "E12", "priority": "P1", "severity": "High", - "status": "in_progress", + "status": "done", "dependencies": [ "RP02", "RP03", @@ -3579,14 +3579,16 @@ "aapl-october-research-pilot" ], "blocker": null, - "integration_state": "in_progress", + "integration_state": "validated_external_workflow", "completion_evidence": "real-data-research.md", "release_gates": [], - "review_status": "pending", + "review_status": "accepted", "completed_commit": null, + "planning_commit": "40f00e16", + "reviewer": "/root/review_recovery_changes", "integration_base": "1a60c04603622629354a4fc48d203a30634be1b5", "authorization": "Owner commit-and-continue follows the recommended longer pilot; reuse the existing approved version. Prior October 1 approval record and deferred-task activation gates remain unchanged.", - "review_notes": "Frozen 1794-bar/23-session source passed 25297 independent assertions and exact repeated API preparation. Nine predeclared runs only; actual execution, financial reconciliation, independent review and web reopen remain pending." + "review_notes": "Nine predeclared native runs completed, baseline/reproduction/cost-baseline economic hashes match and receipt retries retain nine IDs. Independent file audit passed 109207 assertions over prices, fees, ownership, cash/equity, provenance, phase selection, reporting and finding references. Actual Chromium reopened results/trades/report/costs and finding body with 18 evidence links. Source review passed 25297 assertions. No application source changes; runtime records are not Git commits. File-only audit does not establish absence of unrelated database writes; see real-data-research.md." } ], "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/backlog/tasks/RP18.md b/docs/development/backlog/tasks/RP18.md index 58dc6c70..78ba8b3b 100644 --- a/docs/development/backlog/tasks/RP18.md +++ b/docs/development/backlog/tasks/RP18.md @@ -1,6 +1,6 @@ # RP18 — Complete a bounded October multi-session research pilot -Parent E12. Priority P1. Complexity M. Dependencies RP02, RP03, R08 and R09. Status remains `in_progress` until execution, independent reconciliation and web reopening are accepted. Root owns pilot artifacts and execution; independent review can run against frozen captures and completed results without writing research state. +Parent E12. Priority P1. Complexity M. Dependencies RP02, RP03, R08 and R09. Status `done`: execution, independent reconciliation and web reopening are accepted. Root owns pilot artifacts and execution; independent review can run against frozen captures and completed results without writing research state. Authorization: the owner's current “commit and continue” follows the recommended longer pilot. Reuse the already approved SMA version `a67fb31d-7d13-4337-91fb-b49745983160`, artifact `008a42dc373168ba17d5e73a1cc769de6b0bc24b7e487f07a422ceaa3618aa71`. Verify its current catalog eligibility. Catalog approval is version-scoped (`canonical-research.service.ts:240`, `strategy-catalog.service.ts:476`); this continuation does not fabricate a new review event or broaden the historical October 1 approval record. A changed or unavailable version is a blocker. @@ -34,3 +34,5 @@ Acceptance and mandatory checks: Limits are frozen in `.data/research-pilots/aapl-202410-month/evidence.json`: retrospective asset/window selection; 2026 capture without historical vendor arrival/vintage evidence; assumed zero-delay bar-end availability; inferred rather than certified action-free coverage; scenario costs; independent phase accounts; and a small single-asset sample that cannot establish alpha, regime robustness or statistically meaningful out-of-sample superiority. Boundary markers remain in raw captures and are outside explicit half-open sessions; selected bars are never coerced or post-filtered. Regression risk: confusing preparation with execution, duplicating submissions after interruption, changing the winning rule after results, or treating valid metadata as certified market evidence. Existing RP02/RP03/R08/R09 behavior is retained; no new application tests or performance work are required unless execution exposes a concrete defect. + +Accepted October 27, 2026. Plan `40f00e16` preceded all nine runs. Baseline/reproduction/cost-baseline economic hashes match; exact receipt replay preserves nine completed IDs. Independent review passed 109,207 assertions across financial postings, risk/price bounds, provenance, phases and findings. Actual Chromium opened the saved results/trades/report/costs and finding body with 18 evidence links. [Execution evidence](../../real-data-research.md#rp18--october-multi-session-pilot) records outcomes, identities and limits. This is a validated runtime workflow with no application source changes; `completed_commit` remains null for the runtime records. File-only review cannot prove absence of unrelated database writes or all rejected-order paths. All seven conditional tasks remain deferred. diff --git a/docs/development/real-data-research.md b/docs/development/real-data-research.md index 77924353..0107e8c6 100644 --- a/docs/development/real-data-research.md +++ b/docs/development/real-data-research.md @@ -280,3 +280,41 @@ Root validation passed: - Authored test types, scoped lint/formatting and diff checks passed. Isolated worktree execution hit the known `zod/index.js` packaging read failure; the same direct SQL tests passed in the fully built root checkout. No dependency workaround was committed. Logs: `/tmp/candidate-validation-defaults-probe.log`, `/tmp/stock-bot-rp17-defaults-debug.log`, `/tmp/stock-bot-rp17-postgres-initial-sql.log`, `/tmp/stock-bot-rp17-independent-decoder.log`, `/tmp/stock-bot-rp17-independent-phases.log`, `/tmp/stock-bot-rp17-root-check.log`, `/tmp/stock-bot-rp17-postgres.log`, `/tmp/stock-bot-rp17-root-sql-guards.log`, `/tmp/stock-bot-rp17-browser.log` and `/tmp/stock-bot-rp17-root-types.log`. Disposable PostgreSQL/Redis fixtures were stopped. No development research execution, paper/live activation or conditional performance work occurred. + +## RP18 — October multi-session pilot + +Plan commit `40f00e16` fixed the dataset, financial policy, two-candidate grid, chronological windows and nine-run bound before execution. This is real local research using existing application functionality; no application source changed. The existing SMA version remained approved, and template admission verified the configured dataset and policy. No new catalog review was fabricated and the historical October 1 approval record was preserved. + +Local artifacts are under `.data/research-pilots/aapl-202410-month/`, intentionally outside Git: source capture, metadata, exact plan, preparation/repeat, immutable API receipts, original results, scripts, build identity and finding revisions. The source file hash is `1328c9f32a4a1b5a88a67de52c29cba0c7341da53d220d903d0ee41b12f8a793`; predeclared plan hash is `1f5a9d9c9d0cc88f950104121366dbb3af60ab8e2db00dd550b8cceff6380024`. The retained dataset is `9624ee17fd1b7f7b6787226a004704c5c92461355734a6b01891079816ec8e4b`. + +The raw capture contains 1,816 rows. Explicit half-open regular sessions select 1,794 unchanged bars, exactly 78 on each of 23 dates. The remaining 22 rows are 20:00 UTC markers with null volume; October 29 has no marker. They remain in the raw capture and are excluded by query bounds, not removed from selected data or coerced. Independent source review passed 25,297 assertions; actual API preparation repeated exactly, including the normalized dataset hash. + +Root rendered and visually inspected the [Nasdaq 2024 calendar](https://www.nasdaqtrader.com/content/technicalsupport/2024tradingcalendar.pdf): October has no exchange closure or early-close marks. [Regular hours](https://www.nasdaq.com/market-activity/stock-market-holiday-schedule) give 13:30–20:00 UTC for these dates. Action-free coverage is an inference from [Apple's published dividend/split history](https://investor.apple.com/dividend-history/), not a certified full corporate-action feed. Historical listing is supported by [Apple's June 2024 10-Q](https://www.sec.gov/Archives/edgar/data/320193/000032019324000081/aapl-20240629.htm), [filed August 2](https://www.sec.gov/Archives/edgar/data/320193/000032019324000081/0000320193-24-000081-index.htm); metadata uses August 3 as its listing cutoff. Asset/window selection remains retrospective. [EODHD's intraday documentation](https://eodhd.com/financial-apis/intraday-historical-data-api) describes UTC bar starts and delayed finalization: simulated availability at interval end is an explicit zero-delay assumption, not observed historical vendor arrival. The 2026 snapshot does not establish 2024 data vintage. + +Exactly nine runs completed through the existing `BacktestRunner` and `RustBacktestAdapter`, scoped to newly admitted IDs. Replaying six accepted submission receipts retained exactly those nine IDs. Baseline, exact reproduction and the cost experiment's baseline have identical economic hash `7574c19ff41fa0d1cd01d08c7a71dea99f456276214bcb3b740bf8ee122f1199`. The native binary hash remained `df0ecbd5c3772d7e8aeb0226b40ae290cfaddf9d87fb3a7375f2a31c2acf05e5`; complete worker/wrapper/lock/runtime identities are retained in `execution-provenance.json` and every request. + +All accounts start at USD 10,000 with the unchanged USD 1,000 owner budget. Returns below use total account capital, not only deployed strategy capital. Training uses October 2–11, validation October 14–18 and test October 21–31, with prior-session warmup and fresh accounts. Training total return selected SMA 4/8 over SMA 2/8; neither holdout influenced selection. The baseline and cost scenarios use fixed SMA 3/8 over October 2–31. + +| Outcome | Final equity (USD) | Fees (USD) | Account return | Fills | Complete reporting periods | +| --- | ---: | ---: | ---: | ---: | ---: | +| SMA 3/8 baseline, reproduced exactly | 9,810.10157801 | 165.51893827 | -1.898984% | 180 | 21 | +| Training SMA 2/8 | 9,882.93199484 | 92.36706460 | -1.170680% | 102 | 7 | +| Training SMA 4/8, selected | 9,904.04487297 | 76.03153611 | -0.959551% | 84 | 7 | +| Validation SMA 4/8 | 9,977.38710995 | 46.48247089 | -0.226129% | 50 | 4 | +| Test SMA 4/8 | 9,846.01047963 | 109.74987085 | -1.539895% | 118 | 8 | +| Cost baseline SMA 3/8 | 9,810.10157801 | 165.51893827 | -1.898984% | 180 | 21 | +| Zero fee/slippage, spread retained | 9,964.80450548 | 0.00000000 | -0.351955% | 262 | 21 | +| Stressed fee/slippage 0.002/0.0005 | 9,805.24661534 | 152.09169682 | -1.947534% | 84 | 21 | + +Baseline and stressed-cost runs finished with the configured USD 200 drawdown halt latched; zero fee/slippage did not. Their last observed fills were October 24 13:35, October 11 17:45 and October 31 19:40 UTC respectively. Compact results expose final risk state and fill times, not complete rejection/event histories: exact first halt times and rejection counts are unverified. These are cost-dependent trading paths under risk constraints, not fees subtracted from a common trade list. The fixed-baseline cost study is not a cost validation of the selected winner. + +Reporting samples account session openings; the final close is partial. The verified complete counts 21/7/4/8 are not close-to-close daily returns. Accounts reset across phases, so phase returns must not be compounded into one portfolio. Annualized metrics and sampled drawdown are excluded from strategy-quality conclusions. One retrospectively chosen asset/month and two candidates cannot establish alpha, significance or regime robustness. The test interval is now inspected; subsequent strategy changes need genuinely fresh holdouts. + +Saved identities and web reopening: + +- Project `d4687b34-24cd-4ead-ab2b-d0d71afef153`; backtest `faab4e06-60d1-4d54-a570-41cb1f5ff9cc`; baseline run `5a77c377-4e37-4396-97fc-d60b622d993b`; reproduction `3ceccd32-e562-40e0-a165-8d972663b5c2`. +- Validation `fbdc6b2f-1a39-47e4-af2b-889b57585082`; report `1e0e9150-a903-48f0-88a2-7c2e9a2aba11`, hash `784b7390c7d36ccd679d7c8aa1d8f1816201a2500dabd3862f5553e68329d3e0`; cost experiment `800bd042-b5f3-4152-ad91-7b36ee756536`. +- Finding `0e8c21bd-ba4a-4499-82a5-2efcd56699c8`, revision 2, retains 18 exact metric references. It remains AI-authored and unvalidated; revision 2 adds the verified risk-state interpretation without replacing original evidence. +- Actual Chromium reopening passed for the canonical result, buy fills, saved validation report/hash, cost trial view and opened finding body, including its risk interpretation and exactly 18 cited-run links. The browser blocked every non-read API request except authentication. `browser-reopened.json` retains exact URLs and assertions. + +Independent reviewer `/root/review_recovery_changes` accepted 109,207 assertions over all nine results: exact decimal fill pricing/notional/fees/basis/P&L, cash and owner/equity reconciliation, executed quantity/exposure bounds, raw/dataset/slice/package/build hashes, prior-session warmup, training-only selection, reporting counts and finding references. `independent-review.mts` and `independent-audit.json` retain the checks. This file-only audit does not prove absence of unrelated database writes, reconstruct every rejected/reserved order path or establish absence of all possible leakage. Root also validated manifest references/dependencies/counts and `git diff --check`; the application suite was not repeated because no application code changed. The manifest now records 83 done, seven deferred and four merged IDs (94 total). No paper/live deployment or deferred optimization work was activated. The observed losses supply no positive evidence for promotion; the useful next research step is a predeclared economic hypothesis and fresh unseen coverage, not tuning against this inspected month.