Skip to content

go.sum carries two superseded sdk lines, so go mod tidy is not a no-op on a clean tree #26

Closed

Description

@aitrawog

go mod tidy -diff is not empty on a clean tree

Surfaced while working #23 (the --build-cache category), which adds no module and therefore did not cause it. Pre-existing.

Measured

Run inside the module (candy/plugin-clean/), on a tree with no local changes:

$ GOWORK=off go mod tidy -diff
diff current/go.sum tidy/go.sum
--- current/go.sum
+++ tidy/go.sum
@@ -64,8 +64,6 @@
 github.com/opencharly/plugin-egress/candy/plugin-egress v0.2026237.1419/go.mod h1:5Uz4H7GYjW9WS8yPJGlr+dRv/jrR985d+PbaxJeAJZ8=
 github.com/opencharly/plugin-init/candy/plugin-init v0.2026237.1424 h1:Bldh1DoESB1OhP9itppLcViak/z/INZRIFv+Nm28KNg=
 github.com/opencharly/plugin-init/candy/plugin-init v0.2026237.1424/go.mod h1:tzB4pMZllnxK6Jpyeq5jxg4EQe1p544rQkhNdmPn788=
-github.com/opencharly/sdk v0.2026287.2213 h1:blTuUEAaN2blAajdFKYh1gnYNwbLgvmUgOSlSK9zOqw=
-github.com/opencharly/sdk v0.2026287.2213/go.mod h1:lf3rmumA7gpiHYs7IBzHpoLiic16CeuO7TjuZZvAQ2Y=
 github.com/opencharly/sdk v0.2026288.2236 h1:4ooOOJR7u7THPB3Oeprl9l+49R13eEmT7SjPZI+fT+U=
 github.com/opencharly/sdk v0.2026288.2236/go.mod h1:lf3rmumA7gpiHYs7IBzHpoLiic16CeuO7TjuZZvAQ2Y=
 github.com/opencharly/spec v0.2026287.1848 h1:fPs6PSxwP3NHRXZvfXj/w1nKtW5p0zoZO3kODnV+ugg=

Two go.sum lines for github.com/opencharly/sdk v0.2026287.2213 remain after a bump to v0.2026288.2236; the h1: hashes differ, so they are not a duplicate of the newer pair.

Mechanism and missed control

A sdk bump was made without go mod tidy: go get/go mod edit updates the require and adds the new hashes, but does not prune the superseded version's h1: line (the /go.mod line is shared across versions and is correctly retained). Nothing in this repo's gate runs go mod tidy -diff, so the drift is invisible until someone runs tidy — which is why it survived a release cycle.

Why this matters beyond tidiness

A repo whose go mod tidy is not a no-op makes every future change's tidy run produce unrelated churn, and turns "is my diff clean?" into a judgement call. It is small, but it is the kind of small that accumulates.

Root fix

Delete the two stale lines (go mod tidy in candy/plugin-clean/), and consider a go mod tidy -diff emptiness check in the repo's gate so a sdk bump cannot leave it behind again. The gate half is the durable fix; the deletion alone will regress at the next bump.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions