2.7 KiB
Timeout Budget and Rerun Hygiene Design
Date: 2026-04-19 Status: Draft Upstream Diagnostic:
docs/superpowers/reports/2026-04-19-timeout-regression-diagnostic-report.md
Intent
Prevent budget-sensitive scenes from being miscounted as source-unreadable when they can resolve into:
executed-pass- structured
fail-closed
under a bounded rerun budget.
This design does not attempt to improve scene understanding. It only changes timeout handling and rerun classification hygiene.
Problem Statement
The timeout regression diagnostic produced:
| Scene id | Diagnostic label | Actual behavior under 90s |
|---|---|---|
sweep-015-scene |
timeout-rerun-pass |
completed successfully |
sweep-025-scene |
timeout-rerun-pass |
completed successfully |
sweep-040-scene |
timeout-rerun-fail-closed |
resolved into structured fail-closed |
This means the current fixed 45s budget is too coarse for a subset of scenes. It collapses:
- budget-sensitive success
- budget-sensitive fail-closed
- true unreadable or hanging cases
into the same source-unreadable bucket.
Scope
In scope:
- define a bounded timeout-budget policy
- define when a diagnostic rerun is allowed
- define how rerun results should be classified
- define output JSON and report for timeout hygiene verification
Out of scope:
- analyzer logic changes
- generator contract recovery changes
- scene promotion
- execution board updates
- full
102sweep improvement work - timeout implementation unrelated to rerun hygiene
Policy
Primary Sweep Budget
The initial sweep still runs with the fixed primary budget.
Secondary Diagnostic Budget
When a scene ends with:
source-unreadable- reason
generator timeout after 45s
it becomes eligible for one bounded rerun under a secondary timeout budget.
Rerun Result Mapping
A bounded rerun may only map to:
timeout-rerun-passtimeout-rerun-fail-closedtimeout-rerun-timeouttimeout-rerun-error
These are hygiene classifications, not promoted scene statuses.
Board and Promotion Boundary
Even when rerun succeeds:
- do not update
scene_execution_board_2026-04-18.json - do not convert the scene to promoted status
- do not silently merge the rerun result into canonical scene status
Output
tests/fixtures/generated_scene/timeout_budget_rerun_hygiene_2026-04-19.jsondocs/superpowers/reports/2026-04-19-timeout-budget-rerun-hygiene-report.md
Success Criteria
- timeout scenes are no longer treated as a single unreadable bucket in the hygiene layer
- rerun-pass and rerun-fail-closed are distinguishable
- true timeout cases remain distinguishable
- no analyzer or generator implementation changes are made
- no execution board updates are made