Skip to content

fix(recovery): reset_detected preserves autopilot_wanted across a wipe (v2.9.1)#51

Merged
mabry1985 merged 1 commit into
mainfrom
fix/wipe-recovery-v291
Jul 5, 2026
Merged

fix(recovery): reset_detected preserves autopilot_wanted across a wipe (v2.9.1)#51
mabry1985 merged 1 commit into
mainfrom
fix/wipe-recovery-v291

Conversation

@mabry1985

Copy link
Copy Markdown
Member

Summary

  • The reset_detected verifier rolled the epoch with save_state({"reset_date": epoch}), which replaced the whole state dict — silently wiping autopilot_wanted (the v2.9 operator resume intent) at every universe wipe.
  • Found live at the 2026-07-05 wipe: the running engine survived (window hit 4113 → _recover re-registered), but the resume intent was gone, so a restart afterward would no longer auto-resume autopilot — defeating v2.9 auto-resume at the exact boundary it was built for.
  • Fix: record the new epoch, then drop epoch-scoped keys via clear_epoch_state(), which deliberately preserves cross-epoch keys like autopilot_wanted.

Test plan

  • test_reset_verifier_baselines_then_trips_and_rolls_epoch now asserts high_water drops but autopilot_wanted survives the epoch roll
  • test_fleet_surface_start_arms_the_tripwires isolates _state_path (no longer reads live machine state)
  • full suite: 326 passed; ruff clean

🤖 Generated with Claude Code

…e (v2.9.1)

The reset_detected verifier rolled the epoch with save_state({"reset_date": epoch}),
which REPLACED the whole state dict — silently wiping autopilot_wanted, the v2.9
operator resume intent. Found live at the 2026-07-05 universe wipe: the running
engine survived (its window hit 4113 → _recover re-registered), but the intent was
gone, so a restart afterward would no longer auto-resume autopilot — exactly the
gap v2.9 auto-resume was built to close, defeated at the one boundary it matters.

Fix: record the new epoch, then drop epoch-scoped keys via clear_epoch_state(),
which deliberately preserves cross-epoch keys like autopilot_wanted. Tests assert
high_water drops but autopilot_wanted survives the epoch roll; the surface-start
arming test now isolates _state_path so it no longer reads the live machine state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jul 5, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@mabry1985
mabry1985 merged commit d078499 into main Jul 5, 2026
1 check passed

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #51 | fix(recovery): reset_detected preserves autopilot_wanted across a wipe (v2.9.1)

VERDICT: PASS (comment — CI settling)


CI Status

  • test: in_progress

Diff Review

  • _verify_reset_detected no longer replaces the entire state dict with save_state({"reset_date": epoch}) — correctly mutates in-place, saves, then calls clear_epoch_state() to drop only epoch-scoped keys while preserving cross-epoch keys like autopilot_wanted.
  • test_reset_verifier_baselines_then_trips_and_rolls_epoch now asserts high_water is cleared (epoch-scoped) and autopilot_wanted survives (cross-epoch) — validates the exact regression.
  • test_fleet_surface_start_arms_the_tripwires isolates _state_path to tmp_path — prevents the test from reading live machine state, closing a flakiness vector.
  • Version bump 2.9.0 → 2.9.1.

Observations

  • No blocking findings. Fix is correct, well-scoped, and tests validate the exact behavior change.
  • CI (test) is still settling. Per the approve-on-green policy, this review will be automatically promoted to a formal APPROVED once every check passes terminal-green — no further manual re-review is needed.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 5, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #51.

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.

1 participant