Keep the module cache out of the build stage's chown (closes #43) #77

Merged
clawbot merged 1 commits from issue-43-chown-module-cache into next 2026-10-04 10:01:28 +02:00
1 Commits
Author SHA1 Message Date
sneak 90306ba3a7 Keep the module cache out of the build stage's chown (closes #43)
check / check (push) Waiting to run
The build stage handed /src and the whole Go module cache to the
unprivileged user with chown -R, in a layer that re-ran on every source
change. On this host that step took from about 80 s to over ten minutes,
depending on load.

The module cache now sits at /go/pkg/mod and stays root's: bootstrap
fills it as root. The sources are copied with --chown. A small chown,
cached with bootstrap, hands builder the /src directory itself, the
module cache's cache/download directory (where make build saves its
lookup of this module's own version), and the telemetry files root's go
commands left in its home. Tests and the build still run as builder.

Model: opus-5-5
2026-10-04 07:48:04 +00:00