Repository navigation
Description
Outcome
provenance.test.ts passes every time on an unchanged tree.
Why
On 2026-10-12, "filesystem rechecks reject a candidate workspace redirected to an untouched pinned copy" failed 3 times in about 14 gate runs on the operator Mac, once with no other gate running. Each failure was the same:
EEXIST: file already exists, symlink '<tmp>/pstack-provenance-XXXXXX-untouched' -> '<tmp>/pstack-provenance-XXXXXX'
at .claude/skills/verify-open-pstack/scripts/provenance.test.ts:132
After rename(root, untouched) at line 131, root exists again by line 132, so something recreated it in between. Each failure cost a rerun of the whole static invariants step. core.fsmonitor is not set on this host.
Hypothesis to check first (unverified)
fixture() (lines 13-29) runs git init, git add and git commit in root. A detached git gc --auto or git maintenance started by the commit could still be writing under root/.git after the test renames root, which recreates the path. Disabling those in the fixture (for example -c gc.auto=0 -c maintenance.auto=false on the commit) would rule that in or out.
Acceptance criteria
- The cause is named with evidence, such as a reproduction loop.
- The fix removes it at the cause, with no retry and no sleep.
- The test passes 200 consecutive runs on the operator Mac (
bun test scripts/provenance.test.tsin a loop).
Files: .claude/skills/verify-open-pstack/scripts/provenance.test.ts
Source: batch 153 infrastructure ledger, 2026-10-12.
Current scope (2026-10-15)
Cause, confirmed: the git-ai daemon, not git gc or git maintenance. The global git config on studio2 and pro14 sets trace2.eventtarget to the git-ai daemon's socket. The daemon writes .git/ai/... and refs/notes/ai into each fixture repository after the git command exits.
- The 2026-10-12 failures ran on pro14.
- On pro14, unmodified
main(f1c88d8) failed in 2 of 100 sequential runs. - A diagnostic copy of the test caught
root/.git/ai/working_logs/initial/blobs/*andcheckpoints.jsonlreappearing 19 to 31 ms after the rename. - A fixture whose git calls run with
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1gets no git-ai writes. - The read-only
git rev-parse,diff --quietandls-treethat productionsourceHash()runs get none either.
Fix scope: test files only. Every git call the fixtures run themselves gets { PATH, GIT_CONFIG_GLOBAL: '/dev/null', GIT_CONFIG_NOSYSTEM: '1' }, in these three files:
provenance.test.tsharness.test.ts, lines 128-131verify.test.ts, its publisher diff fixture
pro14's temp folder shows git-ai recreating removed pstack-provenance-* and pstack-publish-test-* directories. pro14's daemon log also shows it working on the harness fixture.
Acceptance loop: 200 consecutive full-file runs on pro14, where the failure reproduces, and on studio2. With the fix applied, the pro14 diagnostic loop shows no recreation.
Activity
Merge pull request #193 from ericlitman/test/172-fixture-git-isolation
test(verify): keep fixture git out of the host's global config (ericl…
[MEDIUM] Update pstack and add formal verification skills (#2)