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

@ -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.