#2967·gstack

redact-prepush-scan-range fails under parallel load on v1.89.0.0 (fixture git push rejected); passes alone and on v1.87.4.0

Author: Jmeg8rCreated Sep 24, 2026Updated Sep 24, 2026

Summary

On v1.89.0.0, test/redact-prepush-scan-range.test.ts fails under parallel load and passes in isolation. On v1.87.4.0 the same file passes under the same load. The failures happen in fixture setup: a git push -q origin main to the test's temporary local remote is rejected, before any assertion about the scanner runs. I could not find the root cause, and because this file guards the pre-push secret scan (#2573), I'm reporting it rather than assuming it's harmless flakiness.

Environment

  • macOS (Apple Silicon), bun 1.3.14
  • bun run test (scripts/test-free-shards.ts, 6 local shards)
  • Global core.hooksPath is set, but the pre-push there is a lefthook wrapper with no lefthook config anywhere, so it is a no-op

Observed

Run (v1.89.0.0 unless noted) scan-range result
File alone, 3 runs 9/9 pass each run
Paired with each of 11 other test files (one pair at a time), plus paired with cso-cli.test.ts 5 times 9/9 pass every run
12-file batch in one bun test process 8/9 fail on one run, 9/9 pass on another
Full bun run test, 2 runs fails both times (7-8 tests)
v1.87.4.0: full bun run test and the same 12-file batch 9/9 pass

Failing tests include:

  • narrowing the range does not narrow coverage > a secret in a new commit is still scanned
  • narrowing the range does not narrow coverage > a secret introduced while RESOLVING a merge is still scanned
  • a catch-up merge does not re-scan already-published content > ... (both tests)
  • S1: exclusion scoped to the push-target remote > ... (3 tests)

Every failure has the same shape:

error: git push -q origin main
error: failed to push some refs to '<tmpdir>/gstack-prepush-remote-XXXXXX'
(fail) narrowing the range does not narrow coverage > a secret in a new commit is still scanned [1985.48ms]

test/redact-prepush-rebase-force-push.test.ts fails the same way in the same runs (<tmpdir>/prepush-rebase-remote-XXXXXX).

Git's rejection reason is not in the output, because the helper keeps only the last lines of stderr.

Also seen on the same runs (possibly related)

  • In the full suite on v1.89.0.0, shard 5 of 6 hit the 845s wall-clock deadline on both runs, and shard 3 also hit it on the second run. v1.87.4.0 finished every shard.

Questions

  1. Does a rejected fixture push under load mean the pre-push hook under test is taking too long or exiting non-zero? If that can happen outside tests, it would block or bypass a real push.
  2. Could the helper keep git's full stderr on failure, so the rejection reason shows up in the test output?

Separately, not a bug: test/cso-cli.test.ts needs bin/gstack-cso-launcher, which only setup / bun run build:cso produces. In a fresh checkout, 6 of its tests fail with status: undefined until you build it. A beforeAll build or a skip-with-message would make that clearer.