Repository navigation
Description
The gap
The merged control TestWorkspaceHasOneMemberAndNoSumFile (charly/internal/pluginsgen/main_test.go:100-125) forbids go.work.sum from existing at all — "the file must not sit beside go.work, tracked or not" — on the premise that "the single member's go.sum carries every hash the build needs".
That premise does not hold for a load of the COMPLETE module graph in workspace mode. The go command records the full graph's go.mod hashes in the WORKSPACE's checksum lock, because the member's go.sum is a PRUNED set and does not carry them. The workspace therefore writes the file the control forbids — and the control then fails the suite, with a message that names the file but never its cause.
Measured in this repo's own tree (the tree of a compiled-in plugin pin bump), the writer is named exactly:
=== PROBE: list-m-all (cd charly && go list -m ... all) ===
rc=0
>>> WROTE go.work.sum (222 lines, 21478 bytes)
--- first 3 lines ---
cel.dev/expr v0.25.2/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4=
cloud.google.com/go/auth v0.18.2/go.mod h1:xD+oY7gcahcu7G2SG2DsBerfFxgPAJz17zz2joOFF3M=
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
=== PROBE: list-m-all-nowork (cd charly && GOWORK=off go list -m ... all) ===
rc=0
>>> no go.work.sum
and it is the ONLY writer among everything a gate runs:
| command | writes go.work.sum? |
|---|---|
go vet ./... |
no |
go test ./charly/... (the CI shape) |
no |
golangci-lint run ./... |
no |
go build (the R9 build) |
no |
scripts/bootstrap-charly.sh (the whole build) |
no |
charly check run <bed> (the live boundary) |
no |
go mod tidy (workspace mode) |
no |
go list -m all (workspace mode) |
YES — 222 lines / 21478 bytes |
The line count and the byte count are the same ones the artifact had when it was found sitting beside go.work in a working tree, 222 /go.mod hash lines and 21478 bytes — the same file, from the same command.
The RCA
Mechanism. go list -m all loads the COMPLETE module graph. In workspace mode the go command records every go.mod hash it read into the workspace's own checksum lock, go.work.sum, because the member's pruned go.sum does not carry them. In the member's own mode (GOWORK=off) the same command loads the same graph and writes nothing.
The missed control. Two, and they are the same gap seen from two sides:
- In the repo: the control asserts a property of the TOOLCHAIN ("the workspace needs no lock of its own") that the toolchain does not hold. The repo's other two surfaces already state the correct, narrower rule —
.gitignore:56-60("It is ignored so it can never be re-committed") andscripts/check-generated-clean.sh("a file this repo does not track is not this guard's business") — and the control is the one surface that draws the line in the other place. So the artifact is un-committable AND forbidden to exist, with nothing in between. - In a gate: a
git status-based tree-clean assertion cannot see this file, because it is gitignored. A gate can therefore manufacture the artifact and then read its own byproduct as a product failure in the next run — which is exactly what happened where this was measured: the gate's full-graph load wrote the file, and the NEXT gate run's test step failed the control, with the failure pointing at the repo rather than at the gate that wrote the file.
Blast radius. Any session that runs a full-graph go load in this repo's member — in workspace mode, which is the DEFAULT for every command run inside the member — in a tree at or after #1069 recreates the file, and the next go test ./charly/... in that tree is red. It is not visible where it is produced (the command succeeds), and it surfaces in a different step, in a different run, pointing at a different owner.
Not this finding: the go.work.sum files that sit in ~26 trees under the umbrella are the OLD FOSSIL — 180 lines, TRACKED in trees whose charly pin predates #1069's deletion (opencharly/opencharly's own charly/ checkout is one of them, at pin 695b463b). They are 17622 bytes, not 21478, and their shape is the fossil's, not this one's. This issue is about the NEW file the toolchain writes in a tree where the fossil was deleted.
The root fix. The workspace must either need no lock of its own — so the full-graph hashes land in the member's go.sum, where go mod tidy writes and prunes them — or the control must distinguish the two cases it currently conflates: a lock the REPO carries (tracked: the fossil, forbidden) from one the go command wrote (untracked: a byproduct of a full-graph load, removable). The control's own rationale rejects the second case ("an untracked one is the same rot with a shorter fuse"), which is a defensible position; what is missing is any way for the toolchain's legitimate output to be reconciled with it.
What done looks like. Any one of:
- The control distinguishes tracked from untracked, matching
.gitignoreand the build guard (the smallest change; it also removes the trap of a message that says "Delete it" without saying what recreates it). - The control's message names its cause — "
go list -m all/go mod tidyin workspace mode writes this; delete it, or run the step withGOWORK=off" — so a reader is not left deleting a file the next command recreates. - The workspace's build mode keeps the full-graph hashes in the member's
go.sum, so the control's premise becomes true (the root fix, if the toolchain allows it).
Options 1 and 2 are independent and small; option 3 is the root.
Relation to the open issues
#927(--dev-plugincannot build) is the same CLASS — a go command writing a workspace lock and a control then refusing the build — but its mechanism is the trackedgo.work.sumstaleness comparison, which#1069removed. This issue is the untracked file on the ORDINARY path, after#1069.#1065/#1069(closed) established the doctrine this control enforces. The doctrine stands; the control's premise about the toolchain does not.
Evidence
- The control:
charly/internal/pluginsgen/main_test.go:100-125. - The ignore rule that already states the tracked/untracked distinction:
.gitignore:56-60. - The build guard that already applies it:
scripts/check-generated-clean.sh. - The sanctioned per-module form the org already uses elsewhere:
charly.yml:3970(GOWORK=off GOFLAGS=-mod=mod go mod tidy).
Filed from the plugin-check pin bump (#904) — the bump whose gate run surfaced this, and whose finding that a full-graph load in workspace mode writes the file the control forbids.
Agent: charly
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
Activity
aitrawog commentedon Oct 25, 2026
CLAIM — the finding is filed, and the measurement that names its writer is on the thread.
Agent: charly
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
What is done. The RCA is complete: the writer is
go list -m allin workspace mode (222 lines / 21478 bytes — the same file, byte for byte, that was found sitting besidego.workin a working tree), and it is the only writer among everything a gate runs.go vet, the CI-shapedgo test ./charly/...,golangci-lint run, the R9 build, the wholescripts/bootstrap-charly.sh,charly check run, andgo mod tidyin BOTH modes all write nothing; the samego list -m allwithGOWORK=offwrites nothing.What is next. The finding is separable from the pin bump that surfaced it, so it is filed rather than fixed in that PR: the control's rule is a deliberate, reasoned decision from
#1065/#1069, and changing it inside a pin-bump PR would trade one scope for another. The three "done" shapes are on the issue body — the smallest of them (the control distinguishing a TRACKED lock from one the go command wrote, which is the rule.gitignoreandscripts/check-generated-clean.shalready apply) is a one-surface change.Why it is not this PR's fix. The file's existence is a property of the toolchain's workspace mode, not of the pin: the same file appears in any tree at or after
#1069where a full-graph load runs, whoever runs it.Next update. when the fix lands, or when the operator picks a shape.
chore(deps): adopt plugin-check v0.2026298.205 (a skipped check is no…