seam flake: TestConfigRepo_SlowApplyDoesNotEatTheGitBudget reds ci under runner load — the 100 ms git budget cannot cover four git spawns on a busy 8-core box #1878
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1878
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?
The
ciseam reds intermittently on main in the Go stage —Go: go.work resolves both modules; build, vet, test, lint each— with:Seen on run https://git.matou.nz/Matou/idss/actions/runs/32679 (head
907a3006,2026-09-25 12:01 UTC). Filed by the swarm healer; classified product, so the
healer made no code change.
Why it is the test's margin, not the behaviour
The #1760 fix is in place and correct:
internal/clan/configrepo.go:127starts thecommit sequence's budget with
context.WithTimeout(base, configRepoMutationTimeout)after
applyreturns, so a cold-store download can no longer eat it.The test (
internal/clan/configrepo_coldstore_test.go:35) shrinksconfigRepoMutationTimeoutto 100 ms and sleeps3 * timeoutinside apply. That100 ms then has to cover four git subprocess spawns plus a working-tree walk:
firstConflictMarker()—filepath.WalkDirover the tree (configrepo.go:135)git add -A(configrepo.go:149)git status --porcelainviaisClean(configrepo.go:306)git commit -q -m …(configrepo.go:160)git rev-parse HEADviaHead(configrepo.go:166)Idle, that sequence is single-digit ms and the test passes with room. But the seam
runs
go test ./..., which runs up toNumCPUpackage binaries concurrently on theshared 8-core runner — process spawn + fs latency degrade far worse than CPU-bound
work under that contention. The failing run took 0.50 s where a healthy run takes
~0.33 s (0.30 s of which is the deliberate sleep), i.e. the git tail took ~200 ms
against a 100 ms budget. The same run's
internal/clanpackage took 35.9 s vs 27.0 son the idle host — the whole package was ~33 % slower.
Reproduction attempts (healer, matou-workstation, same sha
907a3006)go test ./internal/clan -run TestConfigRepo_SlowApplyDoesNotEatTheGitBudget -count=15— pass-test.count=12each (96 runs) — passgo test ./...(the seam's Go stage) — pass, 53 s,internal/clan27.0 sSo it is not reproducible on an idle host and main is not persistently red; it is a
load-sensitive flake that will keep reding the seam on a busy runner.
What "done" looks like
The test's claim (a slow apply must not consume the git budget) is worth keeping —
only its wall-clock margin is unsafe. A fix should make the proof insensitive to
runner load rather than just nudging the number, e.g. keep the apply sleep tied to
the budget but give the budget enough headroom that a loaded 8-core box cannot blow
it, or assert the decoupling structurally (observe when the commit budget's clock
starts, rather than racing it).
internal/clan/configrepo_deadline_test.go(whichsets the budget to
time.Nanosecond) is deterministic by construction and does nothave this problem — a useful shape to borrow.
Please also check the rest of the Go suite for the same pattern: any test that pins a
production timeout to a short wall-clock value and then races real subprocesses under
it is the same flake waiting to happen.
Evidence
ci.yml, jobseam)6e2243f659e0— first occurrence in the healer ledgeran empty ready queue and signalled COMPLETE); the fault is the seam's Go stage alone
swarm-claim host=matou-dev-server-01 run=32705
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1878 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope