Skip to content

Block experiment restarts until saved cleanup warnings are resolved - #3

Merged
gpu004 merged 2 commits into
mainfrom
fix/issue-1-block-unresolved-cleanup
Nov 12, 2026
Merged

gpu004 merged 2 commits into
mainfrom
fix/issue-1-block-unresolved-cleanup

Conversation

@gpu004

@gpu004 gpu004 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

A saved cleanup failure currently becomes an ordinary completed key on restart, allowing the next allocation while the earlier allocation is still unresolved. Startup now scans all saved attempts under the experiment lock before building completed keys or selecting scheduled work. Both failed and creation_unconfirmed block the experiment until an exact-attempt resolution receipt exists.

resolve-cleanup records an explicit manual attestation with the full saved-row hash, provider/name/known box ID, operator, UTC timestamp, allocation scope, terminal outcome, and evidence. It uses the same lock and publishes a separate, fsynced receipt atomically. Failed persistence leaves the warning unresolved. Original measurement rows stay unchanged, healthy recorded attempts remain skipped, and uncertain recovery never triggers provider lookups or deletion from list differences. Burst runs save already-submitted workers before stopping ahead of the next provider group.

Closes #1.

Validation:

  • uv run --locked python -m unittest discover -v: all 33 tests pass, including 11 new restart/recovery regressions using child runners and persistent local fake allocations. No real cloud credentials or resources used.
  • uv run --locked python test_properties.py: all property tests pass.
  • uv run --locked ruff check scenarios.py test_cleanup.py, formatting checks for changed Python files, and git diff --check: pass.
  • Replayed the pre-fix scheduler with the fake provider: both warning types reproduce a new allocation while the first box remains live; the healthy control passes.
  • The issue's original TLA+ model was not present in the repository. Added a scoped bounded model: RecordedFailureBlocksLaunch and the terminal-evidence invariant pass across 349 distinct states, bounded to two allocations and two restarts. Disabling the startup guard reproduces the expected invariant violation.

Existing checker failures remain outside this change: full Ruff reports the same 15 unused re-export imports in benchpress.py as the base commit; ty check reports one diagnostic at unchanged providers.py:395 for E2B TemplateBuilder.copy.

Resolution evidence is manually verified by the operator; the command does not independently establish provider state. Allocations interrupted before saving an attempt remain the scope of #2.

@gpu004
gpu004 merged commit 78c2d53 into main Nov 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block experiment restart while a saved cleanup failure remains unresolved

1 participant