feat(research): retry failed experiment trials with retained history
This commit is contained in:
parent
6f64ef62ba
commit
b373410320
32 changed files with 3336 additions and 61 deletions
|
|
@ -31,7 +31,7 @@ Write locks: sql-migrations, experiment-api. One agent owns this change. Lock na
|
|||
|
||||
## Dependencies and blockers
|
||||
|
||||
The retained-input component requires the accepted R05 durable-run/provenance slice plus R01/R10/F08/S02/D01/W03/C06/R12. The manifest records that narrower prerequisite; provider preparation and broader default cutover remain outside it. Full R06 still requires the failed-retry acceptance below.
|
||||
The retained-input component requires the accepted R05 durable-run/provenance slice plus R01/R10/F08/S02/D01/W03/C06/R12. The manifest records that narrower prerequisite; provider preparation and broader default cutover remain outside it. The failed-retry continuation satisfies the remaining acceptance below; final integration evidence is recorded in its validated handoff.
|
||||
|
||||
Architecture decisions: ADR-006. Agents may not independently amend their policies.
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ Report scope changes (if any), fixture expectations, API/schema changes, measure
|
|||
|
||||
## Authorized component — 2026-10-24
|
||||
|
||||
Retained-input single-asset experiments depend on the accepted R05 runner/provenance component (`618fb9e`), not provider preparation or default cutover. One atomic bounded grid uses a current approved retained built-in, one eligible dataset and installed build, and fixed financial/reporting policy. Preview commits to exact inputs; submission receipts survive current eligibility changes. Existing runs/outbox/worker own execution. Failed retry is excluded from this component; full R06 remains incomplete until retry diagnostics/fencing acceptance is met.
|
||||
Retained-input single-asset experiments depend on the accepted R05 runner/provenance component (`618fb9e`), not provider preparation or default cutover. One atomic bounded grid uses a current approved retained built-in, one eligible dataset and installed build, and fixed financial/reporting policy. Preview commits to exact inputs; submission receipts survive current eligibility changes. Existing runs/outbox/worker own execution. Failed retry was excluded from this first component; its continuation below supplies the remaining diagnostics/fencing acceptance.
|
||||
|
||||
### Pinned experiment contract
|
||||
|
||||
|
|
@ -77,8 +77,22 @@ Retained-input single-asset experiments depend on the accepted R05 runner/proven
|
|||
|
||||
All children and outbox rows commit with the immutable experiment in one transaction. The initial bound is 100 trials; it bounds atomic admission and does not introduce a parallel scheduler. Only parameters and new run/account/session identities vary. `experiment_id`/`trial_key`/`trial_index` are immutable and mutually exclusive with new-run reproduction lineage. Child submission receipts are null; the experiment owns the unique principal/key receipt. SQL reconstructs exact trial requests from the manifest and preserves ordinary/reproduction admission guards. No template cloning/edit loop or separate financial engine.
|
||||
|
||||
Cancellation latches once, cancels pending children and requests worker acknowledgement for active children, preserving terminal outcomes. Counts are derived from actual children; the frozen candidate count exposes missing rows. Compact summaries validate retained provenance and statistical conventions, preserve null reasons and list inconsistent results as incomparable. No detail-array loading or financial recalculation is needed. Failed-run retry remains absent until history/fencing tests are implemented.
|
||||
Cancellation latches once, cancels pending children and requests worker acknowledgement for active children, preserving terminal outcomes. Counts are derived from actual children; the frozen candidate count exposes missing rows. Compact summaries validate retained provenance and statistical conventions, preserve null reasons and list inconsistent results as incomparable. No detail-array loading or financial recalculation is needed. Failed-run retry was deferred from this first component to the continuation below.
|
||||
|
||||
### Validated component handoff
|
||||
|
||||
The retained-input component is implemented and independently reviewed. Full repository, PostgreSQL and Chromium gates passed; exact source hashes and logs are in `manifest.json` → `twenty_seventh_wave_validation`. See the twenty-seventh-wave roadmap handoff. This component is uncommitted and does not complete the full task or release its downstream dependencies.
|
||||
The retained-input component is implemented and independently reviewed. Full repository, PostgreSQL and Chromium gates passed; exact source hashes and logs are in `manifest.json` → `twenty_seventh_wave_validation`. See the twenty-seventh-wave roadmap handoff. This first component is committed as `6f64ef6`; it did not alone complete the full task or release its downstream dependencies.
|
||||
|
||||
## Failed-trial retry continuation — 2026-10-24
|
||||
|
||||
The retained-input experiment component is committed as `6f64ef6`. This continuation completes its failed-trial retry acceptance using the same immutable logical run. POST `/api/v2/experiments/:id/trials/:runId/retry` requires a stable idempotency key and both observed attempt/retry counters. GET the corresponding `/retries` path returns append-only snapshots captured by accepted manual retries.
|
||||
|
||||
The new receipt retains the prior failure directly from SQL before clearing execution state; PostgreSQL timestamp precision is preserved. Current original-version approval and retained build/data eligibility are rechecked for fresh acceptance, with current approval recorded separately from the immutable original request. Completed/cancelled/result-bearing trials and cancelled experiments cannot be retried. Receipt replay precedes current eligibility checks.
|
||||
|
||||
Lock order is parent → experiment → run → strategy family. Atomic acceptance increments `manual_retry_count`, resets execution fields and makes the existing outbox due; `attempt_number` remains monotonic and the worker supplies a fresh UUID. Manual retry does not reset the existing lifetime automatic-recovery budget. History is explicitly previous failure snapshots preserved by manual retries, not invented history of every old automatic attempt. Existing simulator/financial semantics remain unchanged.
|
||||
|
||||
### Validated retry handoff
|
||||
|
||||
R06's retained-input acceptance is complete and independently reviewed; status is `review` / `validated_uncommitted`. Existing bounded expansion/cancellation/compact comparison behavior is preserved. Full repository gates, PostgreSQL (190 tests / 1609 assertions) and Chromium (11 workflows / 285 assertions) passed. Exact source hashes and logs: `manifest.json` → `twenty_eighth_wave_validation`.
|
||||
|
||||
The retry suite proves exact failure snapshots, duplicate/stale intent handling, lifetime counter monotonicity, rollback, old-attempt fencing, Redis recovery, current original-version approval and actual Rust completion with one result. SQL23 adds guards only to experiment retry semantics; ordinary run lifecycle behavior remains intact. No engine or dispatcher changes were required. Downstream R08 remains blocked until acceptance/commit; broader R05 cutover is still separate.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue