Repository navigation
Stop the gate stamping VCS metadata into throwaway binaries - #122
Merged
Merged
Conversation
The loop works in a git worktree under the temp directory, and Go's VCS stamping fails there: error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. It fails before any repo code compiles, so every agent run reports a red gate for a reason that has nothing to do with the change under test. A gate that cannot run where the loop runs is not a gate, and one that fails for unrelated reasons invites someone to weaken it. The gate builds binaries it throws away. Stamping git metadata into them buys nothing and couples the gate to git plumbing it does not need. Nothing user-visible depends on it. buildinfo reads the module version from debug.ReadBuildInfo, not the VCS stamp, and release binaries are built separately in release.yml with the version passed via -ldflags.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Aug 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work item 3 from #119, promoted from "consider" to "the fix" by evidence from two agent runs.
The failure
Every agent run reports a red gate:
It fails at
go build ./...before any repo code compiles, so the gate says red for a reason unrelated to the change under test. On #115 the agent worked around it withTMPDIR=$PWD/.tmp go test ./cmd/simplycubed, which passed — the code was fine, the environment was not.A gate that cannot run where the loop runs is not a gate. One that fails for unrelated reasons is worse, because it invites someone to weaken it to get green.
Why this is the right fix rather than a workaround
The gate builds binaries and throws them away. Stamping git metadata into them buys nothing and couples the gate to git plumbing it has no reason to touch. Go's own error message recommends exactly this flag.
Nothing user-visible depends on it:
internal/buildinforeads the module version fromdebug.ReadBuildInfo, not the VCS stamp.github/workflows/release.ymlwith the version passed via-ldflags -XHonesty about reproduction
I could not reproduce the failure on a developer machine or in a runner probe (30731396430) —
go buildwith stamping on succeeded in a worktree under/tmpon a runner. The agent reproduces it consistently, twice.So this is not "I found the root cause and fixed it." It is "the gate has no reason to do the thing that is failing, and Go's own error names this flag as the remedy." The remaining question of why it differs is still #119.
Verified: gate passes normally, and from a worktree with
TMPDIRinside it.