Skip to content

fix(lefthook): serialize pre-commit to break RCA H4 mise deadlock - #136

Merged
wei18 merged 1 commit into
mainfrom
fix/lefthook-serialize-rca-h4
May 25, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/lefthook-serialize-rca-h4

Conversation

@wei18

@wei18 wei18 commented May 25, 2026

Copy link
Copy Markdown
Owner

Summary

One-line YAML fix for the recurring lefthook pre-commit deadlock documented as RCA H4 in `meetings/2026-05-25_swift-test-hang-rca.md`. Switches `pre-commit.parallel: true` → `false` so `mise exec swiftlint` and `mise exec gitleaks` don't race on mise's process-level cache lock.

Evidence

Hit empirically by:

Symptom: pre-commit hook hangs indefinitely at 0:00.02 CPU, `git commit` freezes, requires `kill -9` from outside subagent sandbox.

Cost

  • Latency: gitleaks ~0.8s + swiftlint ~0.1s + hygiene ~0.01s, sequential instead of parallel — sub-second on this repo
  • Vs minute-long catastrophic deadlock

`--no-verify` note

Commit used `--no-verify` because the lefthook config being fixed blocks itself under `parallel: true`. Validated manually: swiftlint zero new violations (yaml-only diff); gitleaks clean. Documented in commit message.

Test plan

  • Confirm next pre-commit hook completes in seconds (gitleaks then swiftlint sequentially)
  • Re-dispatch any pending subagent that was blocked on this — confirm no commit deadlock

🤖 Generated with Claude Code

Concurrent `mise exec swiftlint` + `mise exec gitleaks` invocations
deadlock on mise's process-level cache lock, observed empirically
across multiple sessions. See RCA H4 in
meetings/2026-05-25_swift-test-hang-rca.md.

Symptom: hook hangs at 0:00.02 CPU, git commit freezes, requires
kill -9. Subagents could not self-recover (sandbox denies kill).

Fix: pre-commit.parallel: true → false. Sub-second latency cost vs
multi-minute deadlock.

Committed --no-verify because lefthook itself blocks this fix from
landing under current (parallel: true) config — meta-deadlock observed
empirically: a prior attempt to commit this file with hooks enabled
hung indefinitely. Validated manually: swiftlint zero new violations
(yaml-only change), gitleaks clean.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit ea88698 into main May 25, 2026
@wei18
wei18 deleted the fix/lefthook-serialize-rca-h4 branch May 25, 2026 09:44
wei18 added a commit that referenced this pull request May 25, 2026
…ps resolution (#142)

Captures the day's outcome (10 PRs merged into main) and the
infrastructure crisis that drove the methodology iteration:

- RCA H1 (swift-test no-filter hang) → Fix B #135
- RCA H4 (lefthook parallel mise deadlock) → #136
- 4 subagent sandbox limits discovered the hard way
- 3 lost-work events (worktree wipe before commit)
- Methodology §派發契約 §9-12 + patterns + anti-patterns codified in #137

Plus end-to-end records of: #67 (error funnel), #64 (wire-or-delete
with REJECT → APPROVE-WITH-NITS round trip), #139 (Settings UX redesign
via UI Designer subagent), AdMob banner wiring still in flight.

Per docs/methodology.md backlog-routing convention (collaboration
patterns → meetings/{date}_{topic}.md).

Co-authored-by: Claude Opus 4.7 <[email protected]>
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