Repository navigation
fix(ci): the sweep runs in a workspace it owns, not the runner's (#264) - #266
Merged
github-actions[bot] merged 1 commit intoNov 2, 2026
Merged
Conversation
The required `validate / validate` failed BEFORE reviewing anything, on two independent heads, with `go: ../go.work requires go >= 1.26.8 (running go 1.26.0; GOTOOLCHAIN=local)`. `go run` walks up from `contract/` for a `go.work`, and the directory above it belongs to the runner: `actions/checkout` cleans only the directory it manages, so a sibling job that checked out at the workspace root leaves its own committed `go.work` one level up. A green diff then reads as a finding it never made. The contract pins its own modules, so the sweep now runs `GOWORK=off` — the same guard this file already applies to charly's `tools/*` modules in the lint job. Coverage is discriminating, not tautological: a sixth case builds a workspace whose root carries a foreign `go.work` and requires a PASS, and a fifth negative control removes the guard from a workflow copy and requires the coverage to go red for that exact reason. Agent: containerd-crabbox-program Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Contributor
Review — PASSHead SHA: Security screen: PASS Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
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.
Summary
The required
validate / validatecheck failed before it reviewed anything — on twoindependent heads, at the same step, with the same message:
opencharly/charly#1099— run41354275367, job124990877965, head4afa3547opencharly/charly#1100— run41356369597, job124997169458, heada9fc2bb7opencharly/charly#1102— run41370344019, job125039622862, headd0dd4fc2Mechanism.
go runwalks UP fromcontract/looking for ago.work. The directoryabove it is the runner's workspace root, which
actions/checkoutnever cleans — itcleans only the directory it manages. A sibling job that checked out at that root leaves
its own committed
go.workthere (opencharly/charly's CI uses a plainactions/checkout@v5with nopath:, and that repository tracks ago.work). A later jobthat checks out into
repo/inherits that residue, and the sweep dies on toolchainresolution instead of judging the tree.
Missed control. The arm assumed Go would resolve the contract's own modules; nothing
made the module boundary explicit, so an ambient file the gate does not own could decide
the verdict. Nothing ties "the Go I run" to "the module I pinned".
Blast radius. Every PR in every repository the org ruleset covers, whenever it lands on
a runner that served a root-level checkout before it. The failure is indistinguishable
from a real finding, so authors spend a round chasing a phantom — and it blocked four
otherwise-green PRs this round:
charly#1099,#1100,#1101,#1102, each measured atthis step (
124990877965,124997169458,125021297186,125039622862).Deliberately NOT counted in that blast radius.
layer-krun#2andlayer-criu#2alsoshow a red
validate / validate, but their failure step isEnable auto-merge, whichis the repositories'
allow_auto_merge=falsesetting — an operator-owned repo PATCH, notthis defect. Measured on jobs
120099882198and120093148970before writing this line,because assuming the two were the same would have overstated the fix's reach.
Root fix. The contract ships its own
go.mod, so workspace mode is turned OFF forthe sweep:
GOWORK=off go run ./retired/cmd/retired-sweep …. That is not a suppression —it declares the module boundary the arm already intended, and it is the same guard this
file applies two other places, to charly's
tools/*modules in the lint job. The fixlives in the one org-owned file; there are no per-repo copies to update (R2).
Diff, every item accounted for:
.github/workflows/pr-validator.ymlrun:text gainsGOWORK=off, with the RCA and the #264 citation recorded in the comment beside the other rationale for how this step is pinnedscripts/retired-sweep-arm_test.shgo.workmust still PASS) and negative control 5 (remove the guard from a workflow copy → the coverage must go RED for that exact reason);WSis now a variable so a second workspace can be built, andrun_sweeppinsGOTOOLCHAIN=local, which is whatactions/setup-gosets in the real job, so the case decides what the ARM does and not what a toolchain download didHow tested
The coverage extracts the shipped
run:text and executes that, so the thing undertest and the thing that ships are one artefact.
It fails without the change, and that is asserted, not claimed. Case 6 builds a
workspace root carrying
go 1.999.0(a version no toolchain can satisfy) and requires thesweep to still PASS. Negative control 5 re-runs the whole coverage against a copy of the
workflow with
GOWORK=offremoved, and the run fails — so if the guard were deleted,this coverage would go red instead of silently passing. The control greps for case 6's own
failure text, so it cannot pass for the wrong reason.
Reproduced against the real contract, not only the fixture. Cloning
opencharly/specatthe pinned tag
v0.2026305.1919and placing ago.workone level above it:Same message shape as the runner's
requires go >= 1.26.8 (running go 1.26.0; GOTOOLCHAIN=local); the only change between the two arms is the guard.Sibling owner-script tests that share the same extraction layer, run on the committed tree:
YAML is parsed and the step is re-read from the parsed document (
GOWORK in run text: True).What this PR does NOT claim. The
workflow-checksjob was not run locally — itadditionally checks action runtime pins and executes the pinned Node runtime against
GitHub. It runs on this PR in CI, and I will read its result in full. Nor can this PR
self-certify: by design the required workflow is read from
main, never from the PRunder judgement (T1), so this PR is validated by the unfixed gate. The proof the fix
works is the next
validate / validatethat reaches the sweep on an affected repository.Rulebook compliance
ghworkflow applied.
number and a measured reproduction before any fix, and the root fix is in the product
(the gate's own step) plus its coverage. No finding is absorbed, deferred or labelled
"pre-existing".
pr-validator.yml@main, so there are no per-repo copies to drift. The fix reuses theguard this file already uses rather than inventing a second mechanism.
GOWORK=offstates the module boundary thearm already requires; it does not hide a failure, and the failing path stays loud (it is
what the negative control exercises).
git statusread before any action; no force-push, no bypass, no foreign worktouched.
opencharly/.github#207(another session, DIRTY since 2026-10-15) was read andnot modified; this branch touches neither its files (
candy-validate.yml,scripts/action-runtime-pins.tsv) nor its lines inpr-validator.yml.the shipped workflow; the changed path executed live with output retained.
workflow-checks, which runs on this PR. Its full run is reported in the thread, notclaimed here.
Change classification
Gate / CI configuration. No runtime path, no schema, no image, no pin. The security
surface is the org-wide required check, and this change strengthens it (the gate stops
depending on runner residue) without widening what it reads.
Filed issues
None new — this PR closes
opencharly/.github#264, which carries the RCA, the twomeasured heads and the blast radius.
Closeshas not auto-closed an issue in this org, so#264 will be closed explicitly after the merge and verified on its timeline.
Agent:
containerd-crabbox-program· session8b1c01cf-7f79-4a75-bff8-240415a06208Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)