stale index.lock from an interrupted commit blocks every later madtea write with a raw git error #319
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#319
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hit this live today: an madt_commit was killed mid-staging (the serve process lost its session - #4 territory), leaving
.git/worktrees/<name>/index.lockbehind. The next madt_commit on that worktree failed with git's verbatim message ("Unable to create ... index.lock: File exists. Another git process seems to be running..."), and so would every commit/finish after it, forever, until I removed the lock by hand.Two problems:
What I want, in order of preference:
Acceptance:
Bonus context for the "provably stale" heuristic: the lock in today's incident was zero bytes with an mtime matching the serve process's death, and pgrep showed no git processes - exactly the evidence a human uses.
Proved the impact live, since we literally promise "re-run finish and it picks up where it left off":
What holds: the resume contract itself is real for post-commit failures -
TestCommitStepResumesAfterCommitAlreadyLandedis green (re-running finish after the commit landed skips the commit leg and continues the ledger).What breaks: a stale index.lock defeats the promise at step zero, in a loop. Reproduced on a probe branch:
finish files=[...]against a planted zero-byte lock fails withstaging failed: git add: fatal: Unable to create ... index.lock: File exists- git's raw text, and notably NO ledger and NO partial-progress line, because the failure happens in staging before the step machinery engages. An identical re-run produced a byte-identical error: zero progress, no self-heal, nothing pointing at the lock path as the fix. The re-run promise only starts working once a human removes the lock out-of-band.So the acceptance list above is exactly right, plus one addition: the staging/commit leg of finish should fail through the same detect-or-teach path, and the failure should still produce the ledger shape (step 0 failed, nothing else ran) rather than a bare error - otherwise the documented resume contract has a hole precisely at its first step.
madtea servestays alive (2nd recurrence) #410