GeezerVison is showing github.com — CI caching: cache Go build cache by go.sum hash and reuse artifacts between legs · Issue #288 · developing-today/code
CI caching: cache Go build cache by go.sum hash and reuse artifacts between legs #288Labels area/ciCI/CD pipelines, workflows, and build automation (area)design/ci-programDesign: ci-program - all issues of this effort carry iteffort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a human DescriptionCaching in the mcpx workflows is thinner than it should be:
- setup-go caches module downloads, but nothing caches the Go build cache (~/.cache/go-build), so the test leg recompiles packages from cold on most runs.
- The nix build leg (while it exists) starts from an empty store every run — no cachix and no magic-nix-cache anywhere in the repo.
- Artifacts produced by one leg are never reused by another; each workflow re-does setup (checkout + four toolchain installs) from scratch.
Proposal: add actions/cache for the Go build cache and module cache keyed on go.sum hashes (with restore-keys fallbacks), and share build artifacts between legs via actions/upload-artifact + download-artifact where a second leg currently recomputes them. Cache keys must be content hashes (go.sum / bun.lock), never branch names. If the nix-in-GHA replacement lands first, scope this to whatever legs remain.
Acceptance: cache hit rate visible in run logs; mcpx workflow wall time down measurably on repeat runs with unchanged go.sum.
Acceptance criteria
- The mcpx workflows cache the Go build cache and module cache with keys derived from content hashes (go.sum / bun.lock) and restore-keys fallbacks — never branch names.
- Run logs show cache hits on repeat runs with unchanged go.sum, and mcpx workflow wall time is measurably lower on those runs than on cold runs.
- Where a second leg currently recomputes a first leg's output, the artifact is shared via upload/download-artifact instead.
- If the nix-in-GHA replacement has landed by the time this is worked, the caching is scoped to the legs that remain.
Activityadded kind/ciCI/CD pipelines, workflows, and build automation effort/mMedium: expected under 1 day of work area/ciCI/CD pipelines, workflows, and build automation (area) meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added on Oct 26, 2026dezren39 commented on Oct 26, 2026 Intake review
🤖 Agent note · filed
- Agent: fleet monitor
- Session / ID: repo-fleet-monitor run 2026-10-26 18:19 CDT
- Found via: monitor reconciliation
- Task: Intake enrichment (§5) for this issue
- Expectation: m — done = labels normalized, acceptance criteria appended, still-live check recorded
Still live (verified this run): a code search for actions/cache across this repo returns nothing — no workflow caches the Go build cache today, and no artifact sharing between legs exists. Nothing in the proposal has landed.
Related: #287 (Jules workflow consolidation — same workflows directory, different concern), the mcpx workflows (mcpx.yml, mcpx-nixbuild.yml, mcpx-conformance.yml) named in the body.
Notes / risks: cache-key hygiene is the main risk: keys must stay content hashes (go.sum / bun.lock) as the body demands — a branch-named key would silently serve stale build caches. Measure wall time before/after on the same workflow to satisfy the acceptance check; a single anecdotal fast run is not evidence.
Suggested approach: start with actions/cache for ~/.cache/go-build + the module cache in mcpx.yml keyed on go.sum with restore-keys, land it, and read hit rates from a few days of run logs before attempting artifact sharing between legs. dezren39 commented on Nov 1, 2026 🤖 Agent note · picked up (triage)
dezren39 commented on Nov 1, 2026 🤖 Agent note · triage verdict — SUPERSEDED by landed work (task 2065)
- Agent: repo-worker-code (lane B)
- Session / ID: repo-queue-worker-shift-b 2026-10-31 · task 2065
- Verdict: All three claims in this issue have been overtaken by work that landed after it was filed. Fresh read of the current workflow set (2026-11-01):
- Go build cache — done.
mcpx.yml runs actions/setup-go@v7 with cache: true in all three Go legs (lines 134/387/462), and setup-go's built-in cache covers the module cache and the build cache, keyed on go.sum. The monorepo gotcha that silently broke it is also fixed: cache-dependency-path: pkgs/mcpx/go.sum with the comment at lines 138-142 recording the earlier "Dependencies file is not found" failure. Other Go workflows (go-modules-build, goreleaser, mcpx-conformance, identity-build, mcpx-release, mod-tidy) use setup-go with its cache on by default; none disables it.
- Nix store cache — done.
mcpx-nixbuild.yml (line 51) and both jobs of id-check.yml (lines 138/194) use DeterminateSystems/magic-nix-cache-action with use-gha-cache: true — id-check's header states it outright: "The nix store is cached between runs (magic-nix-cache) so unchanged derivations are not rebuilt from cold."
- Cross-leg artifact reuse — premise dissolved. No workflow uses upload/download-artifact, but the shape that made legs recompute each other's work is gone: mcpx.yml's header records that the duplicate Nix build leg was removed (CI: replace nix in GitHub Actions with direct toolchains #286) leaving a single direct-Go gate, and the package build moved to the path-filtered mcpx-nixbuild (ci(mcpx): PR #295 removes the only CI build of the mcpx Nix package — stale vendorHash on human PRs merges green #297). The remaining legs are parallel test partitions sharing the caches above, not sequential recomputation.
Residual observation, recorded rather than filed (no timing evidence of harm): nix-ci.yml has no store cache, but its PR jobs are evaluation-only (drvPath, no builds) and the full flake check is a nightly backstop on main — if that nightly's duration ever becomes a problem, a magic-nix-cache step there is the whole fix.
Closing as superseded. This triage task completes as superseded.
MetadataMetadataarea/ciCI/CD pipelines, workflows, and build automation (area)design/ci-programDesign: ci-program - all issues of this effort carry iteffort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a human DevelopmentNo branches or pull requestsIssue actions
|