v1.20.2 — the override that could not reach the plane the state was on - #21
Merged
Merged
Conversation
161 expired lease refs on one remote, from two runs that ended five days earlier, and no command in this tool could clear any of them. Measured on the operator's machine 2026-09-14: `residue` listed every one, `reap` left them alone (correctly — a ref in a dead run's name is foreign), and `reap --i-own-this`, the one path a person has for exactly this, answered "there is no lock by that name in this checkout". True, and useless: in git mode the authority is refs/agent-sync/leases/* on the REMOTE, and the override walked the local lock directory only. This is AS-01b returning on the other plane. That row closed "expired locks accumulate with no path out for anybody" for the filesystem; the same sentence was true of the git plane the whole time. - the override reads BOTH planes and collects entries per key as a list — a key can be a lock file here AND a ref there, and clearing one while calling the key done is how the ref survived every sweep that ran - a git entry is deleted through git_reap's existing --force-with-lease compare-and-swap and proved gone by a second ls-remote, never by the push's exit code - every refusal the override had it keeps, per plane: a LIVE lease refused and named, an unknown key reported rather than guessed at, the destroyed payload printed with its plane, the journal line carrying it - an unreachable remote says so instead of answering "no such lock", which reads as "there is nothing to clear" over state that may well be there - AS-11 filed: nothing clears a dead run's refs by itself, so the next 161 accumulate exactly as these did — a sweep with an owner is a decision Gate: npm test EXIT=0 — validate PASS v1.20.2, SELF-TEST PASS, claim cell 27 cases (3 new), SessionStart identity 6, installer 11. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The measurement
On the operator's machine, 2026-09-14: 161 expired lease refs on one remote, from two runs that ended on 2026-09-09 and 2026-09-10, every one overdue by more than four days against a 2700-second TTL — and no command in this tool could clear any of them.
residuelisted all 161 correctly.reapleft them alone, correctly: a ref in a dead run's name isforeign.reap --i-own-this, the one path a person has for exactly this state, answered there is no lock by that name in this checkout.That last answer is true and useless. In git mode the authority is
refs/agent-sync/leases/*on the remote; the override walked the local lock directory only. This is AS-01b returning on the other plane — that row closed "expired locks accumulate with no path out for anybody" for the filesystem, and the same sentence was true of the git plane the whole time, in the tool that reports it.Change
_reap_by_operator_decisionreads both planes, collecting entries per key as a list — a key can be a lock file here and a ref there, and clearing one while calling the key done is how the ref survived every sweep that ran.git_reap's existing--force-with-leasecompare-and-swap and proved gone by a secondls-remote, never by the push's exit code.AS-11filed on the board: nothing clears a dead run's refs by itself, so the next 161 accumulate exactly as these did. A sweep with an owner is a decision, not a patch.Verification
npm testEXIT=0 —PASS: agent-sync v1.20.2,SELF-TEST PASS, claim cell 27 cases (3 new), SessionStart identity 6, installer 11.The three new cases run against a real bare remote: the override clears a dead run's ref and proves it gone by re-reading, a live ref is still refused and left standing, and an unreachable remote does not read as a missing key.
🤖 Generated with Claude Code