Detect stale nested-module pins before release - #294
Merged
Conversation
validate-release.sh only checked that a required redisconn/* tag existed, not that the pinned version still matches the current tree. #287 changed redisconn's Config without bumping its tag, so root releases v0.0.44-v0.0.46 shipped referencing a stale, incompatible redisconn v0.0.1 via the module proxy. Also wire test-validate-release.sh into CI; it previously ran only through the local Taskfile. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 task
This reverts commit de2b2a0.
reyortiz3
enabled auto-merge (squash)
September 11, 2026 16:22
samuv
approved these changes
Sep 11, 2026
6 tasks
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
This is the process fix for the bug found while chasing why
toolhive-core@v0.0.46'sredispackage failed to build downstream (redisconn.Config.PoolSize/.MaxActiveConnsunknown field). Root cause: #287 added those fields toredisconn, but the root and providergo.modfiles kept theirredisconn v0.0.1requirement, andscripts/validate-release.shnever noticed — it only checks that the tag referenced by a pin exists, not that the pinned version still matches the current tree. So root releases v0.0.44, v0.0.45, and v0.0.46 all shipped pinning aredisconnversion that no longer matched the code actually in the tree, and every downstream consumer resolvingredisconnfrom the module proxy got stale, incompatible package content.Changes:
scripts/validate-release.sh: after confirming a requiredredisconn(/aws|azure|gcp)tag exists, additionally diffs the current working tree for that submodule directory against the tag's tree. Any drift fails the release preflight with a clear message to cut a new tag and update the pin first.scripts/testdata/release-stale-pin/go.mod+scripts/test-validate-release.sh: regression test using the real, currently-existingredisconn/v0.0.1tag, which now correctly fails validation becauseredisconn/has genuinely diverged from it since feat(redis): add configurable connection pool bounds #287 (i.e., this test documents and locks in a fix for the actual incident)..github/workflows/test.yml:test-validate-release.shwas only ever run through the localtask redisconn-modulescommand, never in CI. Wired it into the "Check standalone Redis modules" step (withfetch-depth: 0on checkout so nested-module tags are available for the tag-existence/drift checks).This PR previously also carried the
redisconn/{aws,azure,gcp}version-pin bump from #292 with their dev-onlyreplacedirectives removed. That's been reverted: Renovate had already bumped the version pins tov0.0.2onmain(#293) while keeping thereplacedirectives, matching the established precedent from the originalv0.0.1release (#276), which also keptreplacein place deliberately — it's a no-op for downstream consumers (Go ignores a dependency's ownreplacedirectives) and preserves local monorepo development convenience. Removing it was a mistake on my part; #292 is closed as fully superseded by Renovate, and this PR is now scoped to just the validation fix.Test plan
./scripts/test-validate-release.shpasses, including the new regression case./scripts/validate-release.sh v1.2.3run againstscripts/testdata/release-stale-pin/go.modnow fails with:go.mod requires github.com/stacklok/toolhive-core/redisconn v0.0.1, but redisconn has changed since redisconn/v0.0.1 was tagged; ..../scripts/validate-release.sh redisconn/v0.0.2(the tag just cut to fix the live incident) still passes cleanlymainforredisconn/{aws,azure,gcp}/go.modandgo.sumRelated
redisconn/v0.0.2tag: cuts the missing release for the code already inredisconn/.go.mod'sredisconn/{aws,azure,gcp}requirements tov0.0.2(once those submodules are tagged) ahead of av0.0.47tag — which this new check will now correctly gate.🤖 Generated with Claude Code