TLDR
The serial-tests CI job has repeatedly failed in test/brain-durability-hook.serial.test.ts because a temp git repo contains .git/index.lock when the test tries to run git add orphan.md. This is a CI/test isolation flake, not a product failure.
Evidence
fatal: Unable to create '/tmp/bdh-.../work-.../.git/index.lock': File exists.
(fail) post-commit hook (D9 local, D7 self-contained) > logs a clear LOCAL-ONLY line when origin is unreachable
Observed on both PR #186 and PR #188 serial runs.
Expected behavior
The serial test should create/use a temp Git repo in a way that cannot inherit or race on stale index locks. If a lock exists during setup, the test should clean it before its own deterministic git add step, or isolate the hook setup so no overlapping git process remains.
Acceptance criteria
- Serial test no longer flakes on
.git/index.lock in temp repo setup.
- Product code behavior remains unchanged.
- PR CI serial-tests pass without manual reruns.
TLDR
The
serial-testsCI job has repeatedly failed intest/brain-durability-hook.serial.test.tsbecause a temp git repo contains.git/index.lockwhen the test tries to rungit add orphan.md. This is a CI/test isolation flake, not a product failure.Evidence
Observed on both PR #186 and PR #188 serial runs.
Expected behavior
The serial test should create/use a temp Git repo in a way that cannot inherit or race on stale index locks. If a lock exists during setup, the test should clean it before its own deterministic
git addstep, or isolate the hook setup so no overlapping git process remains.Acceptance criteria
.git/index.lockin temp repo setup.