Skip to content

v0.7.3 — workspace-lock reclaim, reap, and health check

Choose a tag to compare

@shanemhamilton shanemhamilton released this 02 Jul 13:17
· 5 commits to main since this release
2ab2618

Fixes the workspace-lock leak found while auditing the overnight Codex fleet. Crashed/timed-out runs leaked per-workspace directory locks that nothing ever reclaimed; acquire never consulted the lease for workspace locks, so a dead owner's lock blocked every later run on that checkout until (and past) its 2h lease. This deferred several producers/integrators overnight.

Added

  • run_lock.py reap — removes provably-abandoned (dead pid and expired lease) workspace locks under <locks-root>/.workspace-locks/; never touches a live or unexpired-lease lock. Exit 0 always.
  • run_lock.py reclaim --workspace <ws> — a job-lock takeover also inherits named abandoned workspace locks, under the same dead-pid-and-expired-lease + read-back-confirm invariant.
  • fleet_health.py WORKSPACE-LOCK-STALE check — scans each agent's .workspace-locks/ and reports (and exits nonzero on) abandoned locks; adds workspace_locks + stale_workspace_locks to the result.

Fixed

  • run_lock.py acquire transparently reclaims a contended workspace lock only when its holder is provably abandoned (dead pid and expired lease), with read-back confirmation; a live/unexpired workspace lock still DEFERS. Job-lock semantics unchanged. Job- and workspace-lock reclaim unified behind one read-back-confirmed helper.

Verification

All four selftest suites green on Python 3.11 and 3.12: lifecycle 80, optimizer 48, state 170, digest 44 — 0 failed. Dogfooded live: reap removed the 8 abandoned locks on the fleet, correctly leaving a dead-pid-but-unexpired-lease lock to age out.