From c9c8d7c498a9d3f8b4e4a101bd006103105b0426 Mon Sep 17 00:00:00 2001 From: Scott McCarty Date: Tue, 3 Nov 2026 23:10:01 -0500 Subject: [PATCH] docs: gourmand's image tag is a packaging version, not a version mismatch I reported `crunchtools/gourmand:1.0.0` shipping a binary that calls itself 0.16.5 as drift between a tag and its build, and wrote that into the README, the CHANGELOG, the `sdlc versions` trailer and the contract test's exemption note. It is not drift. `crunchtools/gourmand` is a WRAPPER repo with its own SemVer: 1.0.0 is its first tagged release (2026-09-19, RT #1484), and its Containerfile builds upstream `mattdm/gourmand` at `--tag v0.16.5`. Both numbers are correct and they answer different questions. So `sdlc versions` keeps printing both columns, for the reason it should have given in the first place rather than the one I gave: the tag is what CI must pin, and the self-reported version is which upstream is actually running -- which a tag alone does not tell you, and which matters here because Gourmand's parser is what crunchtools/gourmand#29 is about. The contract test still exempts gourmand from the pinned-equals-reported assertion, now because asserting they match would be asserting something untrue rather than because of someone else's defect. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01R7Y1jfy8tZHovMEJUNjjD2 --- CHANGELOG.md | 6 +++++- README.md | 10 ++++++---- sdlc | 21 +++++++++++++-------- tests/contract.sh | 11 ++++++----- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52f70b9..a564175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,11 @@ versions. only git, podman, pre-commit, gh and POSIX utilities, plus a recording podman shim. Earns the host-contract exemption rather than relying on the constitution validator not inspecting `language: script` hooks. -- `sdlc versions`, reporting what is installed beside what was pinned. +- `sdlc versions`, reporting what is installed beside what was pinned. The two + columns answer different questions and need not match: a wrapper image carries + its own version (`crunchtools/gourmand:1.0.0` is that packaging repo's first + release) around an upstream build (`mattdm/gourmand` v0.16.5). The tag is what + CI pins; the self-reported version is which upstream actually runs. ### Verified against trentina diff --git a/README.md b/README.md index af17c31..f8f11b1 100644 --- a/README.md +++ b/README.md @@ -146,10 +146,12 @@ The constitution validator is cloned rather than baked for a different reason: the fleet spans `Inherits:` v1.0.0 to v1.29.0, so a baked copy would judge most repos by rules they have not adopted. -`sdlc versions` prints what is installed next to what was pinned. Where the two -disagree — the Gourmand image tagged `1.0.0` ships a binary reporting `0.16.5` — -that is shown rather than hidden, because a version nobody can see is a version -nobody can pin. +`sdlc versions` prints what is installed next to what was pinned, because the +two answer different questions. They need not match: `crunchtools/gourmand:1.0.0` +is that packaging repo's own first release and the binary inside it is upstream +`mattdm/gourmand` v0.16.5. Both are correct. The tag is what CI pins; the +self-reported version is which upstream you are actually running, and a tag +alone does not tell you that. ## Trivy is not here diff --git a/sdlc b/sdlc index 457d0f8..77a4a01 100755 --- a/sdlc +++ b/sdlc @@ -69,10 +69,15 @@ VERSION_PROBE = { def self_reported(name: str) -> str: """What the installed binary calls itself. - Worth printing next to the pinned tag because the two can disagree: the - gourmand image tagged 1.0.0 ships a binary that reports 0.16.5. A consuming - repo pins the image tag, so a silent gap between tag and build is exactly - the thing that makes a 'pinned' tool not pinned. + Printed beside the pinned tag because they answer different questions and a + consuming repo needs both. The pin is what CI must name; the self-reported + version is what the tool actually is. + + They legitimately differ for a wrapper image: `crunchtools/gourmand:1.0.0` + is that packaging repo's own first release, and the binary inside it is + upstream mattdm/gourmand v0.16.5. Neither number is wrong -- but knowing + only the tag tells you nothing about which upstream you are running, and + knowing only the binary version tells you nothing you can pin. """ probe = VERSION_PROBE.get(name) if probe is None: @@ -693,10 +698,10 @@ def main() -> int: print(f"{name:12} {pinned:24} {self_reported(name)}") print( "\nPin the 'pinned' column in CI so a local finding is the CI finding.\n" - "Where the two columns disagree, the image tag and the binary " - "disagree -- that is the upstream's to fix, and it is shown here " - "rather than hidden because a version nobody can see is a version " - "nobody can pin." + "The two columns answer different questions and need not match: a\n" + "wrapper image carries its own version (gourmand 1.0.0 is the\n" + "packaging release) around an upstream build (0.16.5). Both are\n" + "shown because the tag is what you pin and the binary is what runs." ) return 0 diff --git a/tests/contract.sh b/tests/contract.sh index 53e067e..376647e 100755 --- a/tests/contract.sh +++ b/tests/contract.sh @@ -86,11 +86,12 @@ _bundle=$(inside sh -c 'printf %s "$SDLC_CODEQL_BUNDLE"') check_version codeql "${_bundle#codeql-bundle-v}" \ "$(inside sh -c 'codeql version --format=terse' 2>&1)" -# Gourmand is EXEMPT from this check on purpose: its image tag and its binary -# disagree upstream (tag 1.0.0 ships a binary reporting 0.16.5). `sdlc versions` -# shows both columns so the gap is visible; asserting they match here would fail -# the build for someone else's version mismatch. -note "gourmand tag/binary mismatch is reported by 'sdlc versions', not asserted here" +# Gourmand is EXEMPT from this check, and not because of a defect: its image is +# a WRAPPER. `crunchtools/gourmand:1.0.0` is that packaging repo's own first +# release and the binary inside is upstream mattdm/gourmand v0.16.5, so the two +# numbers are both correct and asserting they match would be asserting something +# untrue. `sdlc versions` prints both columns instead. +note "gourmand's image tag is a packaging version, not the binary's -- both shown by 'sdlc versions'" # ------------------------------------------------------- the script's own shape