docs(research): close final risk-state visibility story (RP19)

This commit is contained in:
Boki 2026-10-27 19:52:28 -04:00
parent e6616fdc3d
commit 079d9a7c34
5 changed files with 34 additions and 11 deletions

View file

@ -1,6 +1,6 @@
# Revised development roadmap
Current follow-up: [real-data research workflow](real-data-research.md). [RP19](backlog/tasks/RP19.md) adds missing final risk-state visibility using retained Rust result fields; no new simulation or financial policy. [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. The previous 83 scheduled tasks are accepted; RP19 is active, with 7 conditional tasks and 4 merged redirects remaining. 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). [RP19](backlog/tasks/RP19.md) is complete: canonical results show retained native risk flags, exact limits and snapshot timing, verified through real halted/unhalted browser runs. [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 84 scheduled tasks 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

View file

@ -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: 95 retained IDs — 83 done, 1 in progress, 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.
**Current total: 95 retained IDs — 84 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.
@ -189,4 +189,4 @@ Owner authorized planning and per-task implementation commits. [Execution plan a
- [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.
- [RP19: Final risk state](tasks/RP19.md) — in progress; show existing native halt flags and retained limits in canonical results without reconstructing a halt history.
- [RP19: Final risk state](tasks/RP19.md) — done, `e6616fdc`; canonical results show exact native halt flags, limits and snapshot times without inferring halt history.

View file

@ -1,8 +1,8 @@
{
"schema_version": 1,
"plan_revision": "2026-10-27.111",
"plan_revision": "2026-10-27.112",
"repository_base": "b7aeca4",
"plan_status": "final_risk_visibility_in_progress",
"plan_status": "final_risk_visibility_complete",
"execution_authorized": true,
"execution_scope": {
"authorized_by": "Owner: commit and continue with the rest of the tasks till 100%",
@ -3596,7 +3596,7 @@
"epic": "E12",
"priority": "P2",
"severity": "Medium",
"status": "in_progress",
"status": "done",
"dependencies": [
"W03",
"RP18"
@ -3609,14 +3609,17 @@
"canonical-results-ui"
],
"blocker": null,
"integration_state": "in_progress",
"integration_state": "accepted",
"completion_evidence": "real-data-research.md",
"release_gates": [],
"review_status": "pending",
"completed_commit": null,
"integration_base": "6976f1a2",
"review_status": "accepted",
"completed_commit": "e6616fdc3d8cdd69b4301230797bdeed007beed3",
"integration_base": "7a86b15e",
"branch": "rp19/final-risk-state",
"worktree": "/tmp/stock-bot-rp19-ui",
"reviewer": "/root/review_recovery_changes",
"authorization": "Owner commit-and-continue authorizes the pilot-driven final risk visibility correction; no new research execution or deferred work.",
"review_notes": "Verified canonical result component omits retained final risk fields despite RP18 halted outcomes. Native financial semantics and stored contracts unchanged."
"review_notes": "Accepted independent review: 48 component tests / 445 assertions. Root full check passed 1378 integration and 150 Rust tests; four scoped native/history browser scenarios passed 91 assertions. Exact retained states, limits and times survive reload without added runs or changed results. Types/lint/format/diff passed. Initial sandbox worker timeouts and manual browser build configuration corrected in verification; real-data-research.md records limits. No financial/API/schema change."
}
],
"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.",

View file

@ -20,3 +20,5 @@ Acceptance and mandatory tests:
Regression risk: presenting final false flags as historical absence, labeling the last processed event as a halt timestamp, or implying all orders must stop when exposure-reducing orders remain permitted. Review wording against `risk.rs` (`increase_check`, `observe_equity`, risk-session boundary handling). Preserve the existing distinction between authoritative native risk and sampled research analytics.
Implementation agents work in an isolated branch/worktree. Root integrates the narrow diff after baseline/focused validation, runs combined gates and records evidence in `real-data-research.md` before marking the task done. All seven conditional tasks remain deferred.
Accepted October 27, 2026: planning `7a86b15e`, implementation `e6616fdc`. Independent review passed 48 component tests / 445 assertions. Root full repository check passed (1,378 integration, 150 Rust tests); four relevant browser scenarios passed 91 assertions with disposable stores. Types, lint, formatting and diff checks passed. [Execution evidence](../../real-data-research.md#rp19--final-risk-state-visibility) records baseline failures, the restricted-check and browser-build setup corrections, and final gates. No financial semantics or stored research data changed.

View file

@ -318,3 +318,21 @@ Saved identities and web reopening:
- 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.
## RP19 — Final risk-state visibility
Planning `7a86b15e`; accepted implementation `e6616fdc`. The pilot exposed a result-interpretation gap: `CanonicalResults` never read `financial.view.risk`. An independent render probe across the three retained cost scenarios produced identical HTML after reversing both halt flags. Four component regressions and the real native browser regression failed on the absent section before the fix.
The overview now displays the authoritative final daily-loss/drawdown flags, exact monetary limits, baseline and peak equity, risk calendar/session and last processed event time. It reads only the retained native view/policy. Copy distinguishes risk-increasing orders from permitted reductions, final inactive state from historical absence, daily-session resets from latched drawdown, and last event time from first halt time. No new request, financial calculation, API/schema/engine change or halt-history reconstruction was introduced. Fills-only rendering is preserved.
Independent reviewer `/root/review_recovery_changes` accepted all 48 component tests / 445 assertions and checked wording against Rust admission/reset semantics. Cases cover all four flag combinations, recovered-equity latches, later daily-session snapshots, empty fills, run changes, exact decimals, no requests/input mutation and fills-only exclusion.
Root verification:
- Full repository check passed: 144 tooling, 43 utility, 44 calculation, 1,378 integration and 150 Rust tests. Existing 14 conditional integration skips and four ignored Rust measurements remain. Build, application types, contracts, lint and secret audit passed.
- Four targeted Chromium scenarios passed, zero failures, 91 assertions: final risk state, canonical native smoke, run-history switching and legacy history. Eighteen unrelated scenarios were excluded by name. The new case executes real halted/unhalted Rust runs against disposable PostgreSQL/Redis, verifies every displayed field against saved results before/after reload, and confirms two unchanged run/dispatch identities and unchanged result payloads.
- Authored-test types, scoped lint/formatting and diff checks passed. Disposable fixtures were stopped after verification.
The initial restricted full-check attempt timed out in native child-worker tests and was interrupted; the permitted rerun passed. The first browser rerun used a manual build without `NODE_ENV=production` and failed at authentication before reaching the panel. Rebuilding with explicit production mode and empty `VITE_API_BASE_URL` restored the existing same-origin fixture setup; the four scenarios then passed. A test-only missing-braces lint error was corrected before acceptance. No application workaround was added for those setup failures.
Logs: `/tmp/stock-bot-post-rp18-result-audit.log`, `/tmp/stock-bot-rp19-red.log`, `/tmp/stock-bot-rp19-browser-red.log`, `/tmp/stock-bot-rp19-independent-ui.log`, `/tmp/stock-bot-rp19-root-check.log`, `/tmp/stock-bot-rp19-root-check-escalated.log`, `/tmp/stock-bot-rp19-browser-green.log`, `/tmp/stock-bot-rp19-browser-final.log`, `/tmp/stock-bot-rp19-root-types.log`, `/tmp/stock-bot-rp19-root-lint.log` and `/tmp/stock-bot-rp19-root-format.log`. The manifest now has 84 done, seven deferred and four merged tasks: 95 IDs. No development research runs, paper/live activation or deferred performance work occurred in RP19.