feat(research): retry failed experiment trials with retained history

This commit is contained in:
Boki 2026-10-24 10:56:58 -04:00
parent 6f64ef62ba
commit b373410320
32 changed files with 3336 additions and 61 deletions

View file

@ -1,8 +1,8 @@
# Revised development roadmap
Baseline `b7aeca4` · execution 2026-10-24 · **R12 committed; retained-input R06/R07 experiment components validated and uncommitted**
**First twenty-seven waves committed; failed-trial retries are validated and await commit.** The experiment workbench is committed as `6f64ef6`. **34 of 45 scheduled tasks are fully committed (76% by count)**; R06 now satisfies its retained-input acceptance and is in review. R07 retry/history controls are validated, while broader comparison work and full R05 remain partial. Next after acceptance: R08 chronological validation. Performance work remains paused.
Authorization update: the owner requested “comit and continue”. R12 is committed as `30accfc`; **34/45 scheduled tasks are committed**. R06/R07 components use the accepted retained-input R05 runner with pinned preview, atomic admission and same-experiment UI contracts. Full R05 remains partial; this slice excludes failed-trial retry, cross-experiment comparisons and all performance work. New-wave commits, pushes, PRs and trading/default-engine operations remain outside this continuation's scope.
Authorization update: the owner requested “commit and start”. The first R06/R07 experiment workbench is committed as `6f64ef6`; **34/45 scheduled tasks are fully committed**, plus these partial components. This continuation adds failed-trial retry receipts, diagnostic preservation, fencing and UI history using existing durable runs/outbox. Full R05 and broader R07 work remain partial. Performance stays paused; new-wave commits, pushes, PRs and trading/default-engine operations are outside this continuation's scope.
## Strategy and review outcome
@ -599,3 +599,17 @@ R12 is accepted and committed as `30accfc`. R06/R07 retained-input components ar
Full R06 remains incomplete until failed-trial retry preserves prior diagnostics and passes stale-attempt fencing tests. R07 broader comparisons/table measurement remain outstanding; all performance work stays paused. R05 provider preparation and broader cutover remain partial; R08/A01/S06 are not silently released. No candidate/multi-asset/default/paper/live/AI execution, new-wave commit, push or PR occurred. Editor retry state lives in the current page; saved experiments and accepted receipts are durable. Hash/provenance agreement does not establish strategy merit.
**Next after acceptance/commit: complete R06 failed-trial retry** using the same immutable logical run and existing attempts/outbox. Append prior diagnostics before clearing active errors; reject retries with stored results or completed/cancelled state, retain old-attempt fencing and add a focused UI action only after the backend contract passes. Performance remains paused.
## Twenty-eighth-wave handoff — 2026-10-24
The previous experiment workbench is committed as `6f64ef6`. R06 failed-trial retries and focused R07 controls are implemented, independently reviewed and validated; these new changes are uncommitted. R06 is now in review with its retained-input acceptance satisfied. R05 and full R07 remain partial.
- **Durable retry:** A manual retry preserves the logical run, immutable request, dataset, strategy parameters and original approval snapshot. Current original-version approval/build eligibility is checked separately. One atomic SQL transaction captures the exact failure, advances the manual retry counter, clears active execution state and makes the existing dispatch outbox due. Lifetime attempt counters never decrease; recovery budgets are not reset. Existing workers supply the next fresh attempt UUID.
- **Recovery evidence:** Append-only receipts preserve PostgreSQL timestamp precision. Repeated acceptance returns the same receipt, including after completion or later eligibility changes. Cancellation, retained results, stale failure counters, direct SQL tampering and late old-worker callbacks cannot create an unauthorized retry or overwrite results. No financial engine, runner or dispatcher source changed.
- **Workbench:** Per-trial review/retry/history controls retain the exact unresolved request through refresh and uncertain responses. Saved history survives reopening. This records failures captured by manual retries, not invented historical automatic-attempt logs.
Validation passed: `bun run check` (93 tooling, 43 utility, 44 calculation, 738 integration and 150 Rust tests; four existing manual Rust tests ignored), full PostgreSQL/Redis (190 tests / 1609 assertions), and Chromium (11 workflows / 285 assertions). Strict test types, scoped lint, changed-file formatting and whitespace checks passed. Independent review accepted all 12 agent-owned hashes and the root browser fixture/test delta. All 27 source/test files are archived and hashed in `manifest.json` → `twenty_eighth_wave_validation`.
The release addon remains `ef00eed556f5c32332d36a9a00ef710682e90deb00b54552e4b5c8bfdfbe8103`. Both disposable fixture containers were stopped; development services were untouched. Worktrees and logs remain under `/tmp/stock-bot-wave28.AqRnN8/`.
Next after acceptance/commit: **R08 bounded chronological selection and reset-segment validation**. Freeze train/validation/test windows and selection rules before execution, retain all tried candidates and distinguish reset segments from continuous portfolio performance. No performance work, standalone/bulk retries, candidate execution, multi-asset/default/paper/live activation, AI execution, new-wave commit, push or PR occurred.