From f4cee5affa257660c1ebb5f8b93f411eddb58ee0 Mon Sep 17 00:00:00 2001 From: Boki Date: Tue, 27 Oct 2026 14:05:36 -0400 Subject: [PATCH] docs(research): plan partial-read recovery fixes --- docs/development/ROADMAP.md | 2 +- docs/development/backlog/README.md | 5 ++- docs/development/backlog/dependencies.mmd | 3 ++ docs/development/backlog/manifest.json | 50 ++++++++++++++++++++++- docs/development/backlog/tasks/RP11.md | 13 ++++++ docs/development/backlog/tasks/RP12.md | 13 ++++++ 6 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 docs/development/backlog/tasks/RP11.md create mode 100644 docs/development/backlog/tasks/RP12.md diff --git a/docs/development/ROADMAP.md b/docs/development/ROADMAP.md index 27894052..94c4bab3 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. 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. All 75 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. +Current follow-up: [real-data research workflow](real-data-research.md). RP11/RP12 address verified partial-read recovery defects; all preceding work is accepted. 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. All 75 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 a79008d9..148f7263 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: 86 retained IDs — 75 done, 7 deferred, 4 merged.** RP01–RP10 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: 88 retained IDs — 75 done, 2 in progress, 7 deferred, 4 merged.** RP01–RP12 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. @@ -174,3 +174,6 @@ Owner authorized planning and per-task implementation commits. [Execution plan a - [RP09: Strategy handoff custody](tasks/RP09.md) — done, `49da701a`; finish or clear publication/clone work before handing a version to backtest setup. - [RP10: Missing-template recovery](tasks/RP10.md) — done, `f0e7d074`; preserve valid experiment choices when the linked template lookup fails. + +- [RP11: Partial hypothesis-history recovery](tasks/RP11.md) — in progress; retain verified exact links despite unrelated history errors. +- [RP12: Available run history](tasks/RP12.md) — in progress; keep saved runs selectable while optional metrics load. diff --git a/docs/development/backlog/dependencies.mmd b/docs/development/backlog/dependencies.mmd index 71e3f5a9..1ac81e5f 100644 --- a/docs/development/backlog/dependencies.mmd +++ b/docs/development/backlog/dependencies.mmd @@ -299,3 +299,6 @@ flowchart TD R02 --> RP09 A02 --> RP09 R07 --> RP10 + + R04 --> RP11 + W01 --> RP12 diff --git a/docs/development/backlog/manifest.json b/docs/development/backlog/manifest.json index 2abcb3b7..e343fdec 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.98", + "plan_revision": "2026-10-27.99", "repository_base": "b7aeca4", - "plan_status": "strategy_handoff_and_experiment_recovery_complete", + "plan_status": "partial_read_recovery_in_progress", "execution_authorized": true, "execution_scope": { "authorized_by": "Owner: commit and continue with the rest of the tasks till 100%", @@ -3363,6 +3363,52 @@ "review_status": "accepted", "reviewer": "/root/review_recovery_changes", "review_notes": "Independent review accepted. Full repository check passed: 1334 integration and 150 Rust tests. All 21 browser scenarios covered by 20 successful full-suite scenarios and the corrected RP09 focused rerun (50 assertions); initial fixture lineage-count assumption corrected without application changes. Authored types/lint/build pass; evidence records exact results." + }, + { + "id": "RP11", + "title": "Preserve verified hypothesis links during partial history failure", + "epic": "E12", + "priority": "P2", + "severity": "Medium", + "status": "in_progress", + "dependencies": [ + "R04" + ], + "decision_dependencies": [], + "task_file": "backlog/tasks/RP11.md", + "complexity": "S", + "assignment": "/root/audit_research_entry_recovery", + "write_locks": [ + "research-hypothesis-reference" + ], + "blocker": null, + "integration_state": "pending", + "completion_evidence": "real-data-research.md", + "release_gates": [], + "review_status": "pending" + }, + { + "id": "RP12", + "title": "Keep run history usable while result metrics load", + "epic": "E12", + "priority": "P2", + "severity": "Medium", + "status": "in_progress", + "dependencies": [ + "W01" + ], + "decision_dependencies": [], + "task_file": "backlog/tasks/RP12.md", + "complexity": "S", + "assignment": "/root/audit_recovery_next", + "write_locks": [ + "run-history-enrichment" + ], + "blocker": null, + "integration_state": "pending", + "completion_evidence": "real-data-research.md", + "release_gates": [], + "review_status": "pending" } ], "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/RP11.md b/docs/development/backlog/tasks/RP11.md new file mode 100644 index 00000000..3aa1ebf3 --- /dev/null +++ b/docs/development/backlog/tasks/RP11.md @@ -0,0 +1,13 @@ +# RP11 — Preserve verified hypothesis links during partial history failure + +Parent E12. Priority P2 / Medium recovery defect. Complexity S. Dependency R04. Owner continuation authorizes this correction. + +Verified baseline: `ResearchEntry.tsx` resolves a finding's older hypothesis revision with `Promise.all` across every project hypothesis. A 503 from an unrelated history discards a successful exact match. The existing HappyDOM workspace harness reproduces the missing link; `/tmp/stock-bot-rp11-baseline.log` records the failing assertion. + +Scope: preserve an identity-verified match despite unrelated lookup failures. When no match is found, distinguish incomplete lookup from confirmed absence. Preserve project ownership, exact revision navigation, cancellation and stale-response fencing. Use existing project refresh for retry. No API/schema change, new resolver service or persistent cache. + +Ownership: implementation agent owns `apps/stock/web-app/src/features/research/components/ResearchEntry.tsx` and `test/integration/research-workspace-ui.test.tsx`. Root owns shared browser tests, planning state and commits. Parallel with RP12; independent review required. + +Acceptance/tests: a valid historical match plus unrelated HTTP failure still links the exact hypothesis/revision. No match with a failed read reports incomplete resolution; all successful reads without a match report unavailable history. Refresh recovers a failed lookup. A late previous response cannot attach a link to a different selected finding or project. Existing archived-hypothesis and evidence revision behavior remains intact. + +Gates: focused workspace UI regressions, application/authored types, lint/build, root repository check and the existing research browser workflow. No financial or execution changes. diff --git a/docs/development/backlog/tasks/RP12.md b/docs/development/backlog/tasks/RP12.md new file mode 100644 index 00000000..f4077311 --- /dev/null +++ b/docs/development/backlog/tasks/RP12.md @@ -0,0 +1,13 @@ +# RP12 — Keep run history usable while result metrics load + +Parent E12. Priority P2 / Medium recovery defect. Complexity S. Dependency W01. Owner continuation authorizes this correction. + +Verified baseline: `RunsListWithMetrics.tsx` waits for every completed result before publishing any rows and passes a blocking loading state to `DataTable`. One delayed result hides already-loaded failed/active run rows. `useRunMonitoring.ts` replaces the runs array on each active poll, restarting the reads. The existing HappyDOM/Virtuoso harness reproduces zero selectable rows while two run records are already available; `/tmp/stock-bot-rp12-baseline.log` records the failure. + +Scope: render authoritative current run records immediately and enrich their metrics independently by run/backtest identity. A pending or failed result must not hide other rows or replace current status. Preserve honest unavailable values, canonical/legacy display conventions, identity validation and stale-response fencing. Keep the fix local to the history component; no result-summary endpoint, shared table redesign, global cache or financial/throughput optimization. + +Ownership: implementation agent owns `apps/stock/web-app/src/features/backtest/components/RunsListWithMetrics.tsx` and `test/integration/canonical-workbench.test.tsx`. Root owns shared browser tests, planning state and commits. Parallel with RP11; independent review required. + +Acceptance/tests: all current rows remain visible/selectable while result reads are pending or failed. Polling updates status without hiding history or starving unchanged result reads. Healthy metrics become visible without waiting for unrelated reads. Removed/changed-parent rows and late unmounted reads cannot restore obsolete data. Failed reads have an honest local state and an explicit local retry. Preserve existing foreign-parent rejection and canonical/legacy drawdown tests. Browser: delay a completed result and open another saved run without creating a new one. + +Gates: focused canonical workbench regressions, application/authored types, lint/build, root repository check and browser delayed-result navigation. No backend, accounting or API changes.