• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 37616348623
93%

Build:
DEFAULT BRANCH: main
Ran 07 Oct 2026 11:51AM UTC
Jobs 11
Files 1783
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Oct 2026 11:46AM UTC coverage: 92.923% (+0.002%) from 92.921%
37616348623

push

github

web-flow
go: keep the module download cache owner-writable so sandboxes are not leaked (#23636)

Disclaimer: Like my previous Go PR, I'm still not primarily a golang
developer. However, the fact that Golang doesn't work properly in Pants
has been the bane of my existence for like 2 years now. The moment that
Mythos/Fable dropped I immediately had it dig deeply into whether the
whole road to proper-golang-in-pants could be opened up. So this is all
by Claude Code with Fable 5 (xhigh), with review consults to GPT 5.6
(Sol). I've had it check and recheck, I ran many different roles over
it, and I had it explain and re-explain it to me, and then I checked
myself.

So, as much as I dislike AI slop and am worried about AI PR overload,
I've done my very best to avoid exactly that while still using AI. I
hope we can get this road unblocked.

The rest is Fable talking:

---


Go module download processes extract each module into GOMODCACHE with
read-only permissions, which makes Pants' sandbox cleanup fail to remove
them, so every download silently leaks its whole sandbox. This adds
`-modcacherw` to the download-enabled Go processes so the extracted
cache stays owner-writable and the sandbox can be torn down.

## The leak

A `go mod download` extracts the module archive into GOMODCACHE, which
sits under the sandbox GOPATH. Go strips the write bits from the
extracted module tree, so it is not owner-writable. When Pants cleans up
the sandbox afterwards, `remove_dir_all` cannot delete those directories
and the error is swallowed, so the extracted trees stay on disk after
the sandbox should be gone. The leak repeats on every cold download and
never gets reclaimed.

jgranstrom measured this directly while reviewing a separate change:
about 700 leaked sandboxes and 2.1 GB per cold run, indefinitely. The
observation is his; this PR is the isolated fix for it.

## The fix

`-modcacherw` tells Go to leave newly written module cache directories
writable, so sandbox cleanup can r... (continued)

23 of 23 new or added lines in 2 files covered. (100.0%)

96019 of 103332 relevant lines covered (92.92%)

3.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_x86_64_4/10 - 37616348623.1 07 Oct 2026 11:57AM UTC 1245
59.05
GitHub Action Run
2 test_python_linux_x86_64_8/10 - 37616348623.2 07 Oct 2026 11:56AM UTC 1214
52.74
GitHub Action Run
3 test_python_linux_x86_64_5/10 - 37616348623.3 07 Oct 2026 11:54AM UTC 1230
60.36
GitHub Action Run
4 test_python_linux_x86_64_1/10 - 37616348623.4 07 Oct 2026 11:54AM UTC 1215
48.88
GitHub Action Run
5 test_python_linux_x86_64_7/10 - 37616348623.5 07 Oct 2026 11:54AM UTC 1219
50.87
GitHub Action Run
6 test_python_linux_arm64 - 37616348623.6 07 Oct 2026 11:52AM UTC 1196
52.67
GitHub Action Run
7 test_python_linux_x86_64_6/10 - 37616348623.7 07 Oct 2026 11:51AM UTC 1212
50.04
GitHub Action Run
8 test_python_linux_x86_64_3/10 - 37616348623.8 07 Oct 2026 11:53AM UTC 1214
52.37
GitHub Action Run
9 test_python_linux_x86_64_2/10 - 37616348623.9 07 Oct 2026 11:53AM UTC 1215
58.6
GitHub Action Run
10 test_python_linux_x86_64_0/10 - 37616348623.10 07 Oct 2026 11:52AM UTC 1236
57.46
GitHub Action Run
11 test_python_linux_x86_64_9/10 - 37616348623.11 07 Oct 2026 11:53AM UTC 1225
54.01
GitHub Action Run
Source Files on build 37616348623
  • Tree
  • List 1783
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37616348623
  • 3b6b4f3a on github
  • Prev Build on main (#37394615658)
  • Next Build on main (#37697250320)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc