Summary
TestMergerTextconvDoesNotFire (internal/adapter/forker/forker_test.go) intermittently fails under -race with:
Fork: forker: copy base tree: open /tmp/.../.git/objects/maintenance.lock: no such file or directory
Root cause
A TOCTOU race between the fork's .git tree-copy routine listing .git/objects/ and git's own background maintenance process deleting its transient maintenance.lock file before the copy gets around to opening it. Nothing to do with the test's actual subject (textconv/security); it's purely a live-.git-directory-copy race that only surfaces under real filesystem/scheduling contention (-race slows execution enough to expose it; observed on GitHub's shared CI runners, not reliably reproducible on a fast local machine).
Where it was seen
Suggested fix
Snapshot/copy .git/objects/ in a way that tolerates a concurrently-vanishing transient file (e.g., treat ENOENT on a file matching maintenance.lock-style transient git-maintenance artifacts as "skip, not present" rather than a hard copy error), or explicitly exclude known-transient git-maintenance files from the copy set.
Confidence
High — root-caused from the actual CI failure message and the forker's copy-tree code path, not inferred from a pattern match. Not related to any change in the mecak8s Helm-convergence PR stack (#659/#661/#662/#663); pre-existing.
Summary
TestMergerTextconvDoesNotFire(internal/adapter/forker/forker_test.go) intermittently fails under-racewith:Root cause
A TOCTOU race between the fork's
.gittree-copy routine listing.git/objects/and git's own background maintenance process deleting its transientmaintenance.lockfile before the copy gets around to opening it. Nothing to do with the test's actual subject (textconv/security); it's purely a live-.git-directory-copy race that only surfaces under real filesystem/scheduling contention (-raceslows execution enough to expose it; observed on GitHub's shared CI runners, not reliably reproducible on a fast local machine).Where it was seen
Test (race)job: https://github.com/stacklok/mecatl/actions/runs/32353522818/job/96377769838mainitself (a different flaky test, same job/step, same class of issue): https://github.com/stacklok/mecatl/actions/runs/32318912147/job/96276932942Suggested fix
Snapshot/copy
.git/objects/in a way that tolerates a concurrently-vanishing transient file (e.g., treatENOENTon a file matchingmaintenance.lock-style transient git-maintenance artifacts as "skip, not present" rather than a hard copy error), or explicitly exclude known-transient git-maintenance files from the copy set.Confidence
High — root-caused from the actual CI failure message and the forker's copy-tree code path, not inferred from a pattern match. Not related to any change in the mecak8s Helm-convergence PR stack (#659/#661/#662/#663); pre-existing.