Skip to content

v1.20.2 — the override that could not reach the plane the state was on - #21

Merged
sshlg merged 1 commit into
mainfrom
fix-hk-10-operator-reap-git
Sep 14, 2026
Merged

sshlg merged 1 commit into
mainfrom
fix-hk-10-operator-reap-git

Conversation

@sshlg

@sshlg sshlg commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

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.

  • residue listed all 161 correctly.
  • reap left them alone, correctly: a ref in a dead run's name is foreign.
  • 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_decision reads 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.
  • 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, now 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" — that answer reads as there is nothing to clear over state that may well be there.
  • AS-11 filed 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 test EXIT=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

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>
@sshlg
sshlg merged commit d1b7b4a into main Sep 14, 2026
2 checks passed
@sshlg
sshlg deleted the fix-hk-10-operator-reap-git branch September 14, 2026 01:37
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