Repository navigation
fix(deploy): the consumer clears a deploy tree's stale index.lock with a receipt, and names a live one without spending an attempt (card 677437fa) - #4477
Merged
Conversation
…h a receipt, and names a live one without spending an attempt (card 677437fa)
A git that died mid-write left .git/index.lock in the M5's deploy tree, and
every consumer tick's checkout failed on it: 41 refusals over ~3.4 h, then again
17:27-19:3xZ on 2026-09-27, each time cleared by hand. Each failure also counted
against the tip's CONSUME_MAX_ATTEMPTS, so a stale lock could strand a tip.
Before the deploy attempt, the consumer now judges the lock (found with
`git rev-parse --git-path index.lock`, so worktrees resolve too):
- none: deploy;
- older than STALE_INDEX_LOCK (10 min, far past any git write) with no git
process whose cwd is inside the tree (sysinfo): remove it, with the receipt
deploy.tree.stale_lock_cleared {path, age}, and deploy;
- younger, or a git process stands in the tree: name it (path and age) in the
deploy log and try next tick, without spending one of the tip's attempts.
index_lock_verdict is pure and pinned by a test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…m elsewhere, holds the lock (Codex on #4477) git_running_in ruled out any git whose cwd sat outside the tree, including `git -C <repo>` (its cwd stays elsewhere while it owns the tree's index) and a process whose cwd could not be read. Now only a git positively seen working elsewhere is ruled out: an unreadable cwd, a cwd in the tree, or a command line naming the tree (as given or canonical) all keep the lock Held. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ot git -C (which chdirs into the tree) (Codex on #4477) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…cker, so CI's lib-test job runs its test (Codex on #4478/#4477) Tests in bin/continuum.rs are compiled by CI's windows `--tests` check but never run: the only test job is `cargo test -p continuum-core --lib`. The pure verdict (STALE_INDEX_LOCK, IndexLock, index_lock_verdict) moves beside the tracker's other deploy verdicts, with its test in that file's existing tests mod. The consumer keeps the effectful half (git rev-parse, the sysinfo git check, the removal and its receipt). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Contributor
Author
|
Fable: APPROVED at abb9f01, 8/8 green. A lock is cleared only when it is 10 min old and no git process has its cwd in the tree; a git whose cwd cannot be read keeps it Held; a lock that may be live is named and waited on without spending the tip's attempts. The pure verdict and its test now run in the lib job. |
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.
A git that died mid-write left .git/index.lock in the M5's deploy tree, and
every consumer tick's checkout failed on it: 41 refusals over ~3.4 h, then again
17:27-19:3xZ on 2026-09-27, each time cleared by hand. Each failure also counted
against the tip's CONSUME_MAX_ATTEMPTS, so a stale lock could strand a tip.
Before the deploy attempt, the consumer now judges the lock (found with
git rev-parse --git-path index.lock, so worktrees resolve too):process whose cwd is inside the tree (sysinfo): remove it, with the receipt
deploy.tree.stale_lock_cleared {path, age}, and deploy;
deploy log and try next tick, without spending one of the tip's attempts.
index_lock_verdict is pure and pinned by a test.
Co-Authored-By: Claude Opus 5.5 [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE