github: move Go's temporary build dir off /tmp #11499
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 341 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #11499"
general
weight: 0.35
Roasbeef
Problem
On the new GitHub
ubuntu-26.04runner image,/tmpis a RAM backed tmpfs capped at about 7.7G. Go puts its temporary build directory ($WORK) there by default. TheCheck commitsjob runsscripts/check-each-commit.sh, which runsmake unit pkg=... case=_NONE_for every commit and so builds and links every unit test binary. It failed with 81 lines like:while the root disk still had 45G free.
Evidence: job 126847355585 in run 41907823000. The log shows
Image: ubuntu-26.04, anddf -hshows:Other large Go builds (unit-race, itests, lint) face the same risk as more runners move to 26.04.
Fix
Add a step to the shared
.github/actions/setup-gocomposite action that creates$RUNNER_TEMP/go-tmpand exportsGOTMPDIRto it through$GITHUB_ENV.RUNNER_TEMPis on the runner's disk, exists on Linux, macOS and Windows runners, and is cleaned up after every job. Every Go job inmain.ymlandgovulncheck.ymlgoes through this action, includingwindows-integration-testandmacos-integration-test.On Windows,
RUNNER_TEMPreaches bash as a native path (e.g.D:\a\_temp), so the exported value isD:\a\_temp/go-tmp. Git Bash'smkdiraccepts that form, and Go on Windows accepts mixed separators. The existingset GOPATHstep already writes a native Windows path to$GITHUB_ENVfrom bash in the same way.Nothing else in the repo sets
GOTMPDIRorTMPDIR.Go builds not covered (unchanged)
release.yamlusesactions/setup-godirectly and runsmake releasenatively. It runs only on tags and cross-compiles one binary set per target, so it is much lighter than the unit test builds.backwards-compatibility-test(make backwards-compat-test) anddocker.ymlbuild inside Docker, so the runner's/tmpdoes not apply.Verification
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/main.yml: clean (actionlint also checks the local composite action).gopkg.in/yaml.v3; the new step isshell: bash.git diff --check: clean.RUNNER_TEMPandGITHUB_ENVpointed at scratch paths. The directory was created,GITHUB_ENVgotGOTMPDIR=<runner-temp>/go-tmp,go env GOTMPDIRreported it, andgo build -work ./lnwire/...printedWORK=<runner-temp>/go-tmp/go-build....