Repository navigation
Stop naming a release version in commands the reader has to adapt - #334
Merged
Merged
Conversation
Review point: hardcoded versions go stale every release. They do, and in
docs/deployment.md they were worse than stale.
The three commands under "Checking what you pulled" verify the image you
deployed. With a literal tag on the page, somebody running 0.4.1 who
copies `cosign verify ghcr.io/serraniel/sendan:0.3.3` verifies 0.3.3 -
and it *passes*, because 0.3.3 is a genuinely signed image. A green check
for an image you are not running is a verification step that produces a
false negative on the question actually being asked. So the version there
was not merely out of date, it was the wrong value by construction.
The section now reads the tag off the deployment:
IMAGE=$(docker inspect --format '{{ .Config.Image }}' "$(docker compose ps -q sendan)")
IMAGE=$(docker inspect --format '{{ .Config.Image }}' sendan)
Two forms because compose.yaml sets `name: sendan` and the service is
also `sendan`, so the container is sendan-sendan-1 and the single-argument
form fails on the primary documented deployment path. Both were run
against a real container; both return ghcr.io/serraniel/sendan:0.3.3.
Elsewhere, by category:
- README's `docker run` is a local trial, so it takes `:latest`, which
cannot go stale. The sentence after it still says to pin a tested
release for a deployment, so the advice and the snippet no longer
contradict each other.
- SECURITY.md's two reproduce procedures take the release the reader is
checking, as a placeholder rather than a literal. Which release to
reproduce was never ours to choose.
- compose.yaml's comment and README's pinning note keep a version, but
only as an example of the *form* - `:0.3.3` and never `:v0.3.3`. The
number is incidental there and the warning stays true whatever it is.
Sample `sendan verify` output keeps real values in README, because that
block is shown as a transcript against the demo and the text invites the
reader to run it. SECURITY.md's equivalent stays illustrative, with the
fake commit it already carried. Staleness in sample output is cosmetic -
a reader seeing 35 of 35 where the page shows 33 of 33 learns nothing
wrong - which is why it was not worth a mechanism.
Signed-off-by: Serraniel <mail@serraniel.dev>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Serraniel <mail@serraniel.dev>
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.
Follow-up to your review point on #331 — which you merged before this landed, hence a separate PR.
You said hardcoded versions go stale every release. They do. In
docs/deployment.mdthey were also the wrong value by construction, which is the more interesting half.The actual bug
The three commands under Checking what you pulled verify the image you deployed. With a literal tag printed on the page, somebody running
0.4.1who copies:…verifies
0.3.3— and it passes, because0.3.3is a genuinely signed image. They get a green check for an image they are not running.A verification step that answers a different question than the one asked, affirmatively, is worse than one that is merely out of date. The version there was never going to be right, at any point in time, for anyone who hadn't just deployed that exact release.
The fix: read the tag off the deployment
Two forms because
compose.yamlsetsname: sendanand the service is alsosendan, so the container issendan-sendan-1— the single-argument form fails on the primary documented deployment path. I caught that by running it rather than by reading the file, and both forms are verified against a real container:Everywhere else, sorted by what the reference is for
docker run:latestSECURITY.mdreproduce procedures ×2compose.yamlcomment, README pinning note:0.3.3, never:v0.3.3. The number is incidental and the warning holds whatever it issendan verifysample outputThe one place I deliberately did nothing
Sample output. README's block is presented as a transcript against the live demo and the text invites you to run it, so real values belong there.
SECURITY.md's equivalent stays illustrative with the fake commit (1a2b3c4) it already carried.Staleness there is cosmetic: a reader seeing
35 of 35where the page shows33 of 33learns nothing wrong, because the✓line is the verdict and the version is labelled as the instance's claim. Not worth a mechanism.If you do want the remaining numbers kept current automatically, release-please supports
extra-files— but the annotation it needs (<!-- x-release-please-version -->) renders literally inside a fenced code block, so it would pollute every snippet it touched. A smallscripts/check-doc-versions.shin the house style ofcheck-toolchains.shwould fit much better. Say the word and I'll write it; I did not want to add a gate you had not asked for.🤖 Generated with Claude Code