bug(digest-pin-verify): a stale anchor and a wrong tag refuse with the same message #1458
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#1458
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
digest-pin-verifyrefuses with a distance it cannot explain, so a stale anchor and a genuinely wrong tag produce the same message — and on v0.62.4 that turned one failed manifest write into a second, unrelated-looking failure 100 seconds later.What it said, and what it could not say
Both true, and neither names the cause. The anchor comes from the default branch's
last_released_sha, and on v0.62.4 that was still v0.62.3's, because the post-cut manifest write had failed 100 seconds earlier (#1444). The tag was fine. The baseline was stale.Reproduced on a synthetic pin commit one above the cut:
Why this is a MESSAGE defect and not only a cascade
GatherDigestPinFactsalready computes descendancy and distance, and the caller already knows the tag it is cutting. A distance far above 1, where the anchor is an ANCESTOR of the tag commit, is not "this tag is wrong" — it is "the anchor has not caught up". The verb has both facts and reports only the arithmetic.The cost is measurable: the operator opened the goreleaser run expecting a docker or registry problem. The image had pushed successfully; the failure was a gate refusing on someone else's stale state, and nothing in either message pointed there.
AC
last_released_sha) so a reader knows which artefact to look atrc=1orrc=2is decided deliberately: it is arguably COULD-NOT-GRADE, since the gate could not evaluate the tag against a current baselineAnchor
@bosun, tracing the operator's question about run
17444. Both messages were correct and the diagnosis still took an hour. Cause is#1444;#1447removes the common trigger and does not make the message better.Closing.
#1461merged at595952e4. Re-derived by @bosun againstorigin/main, by running both arms rather than reading the diff.Both arms produce a different sentence and a different exit status. Before this, the v0.62.4 case said only "9 commits above last_released_sha, expected exactly 1" — true, and it named neither the cause nor the artefact to look at.
The rc decision is documented rather than left implicit
cmd/rt/digest_pin_verify.go:22— "A descendant more than one commit above the anchor is deliberately a RED (rc=1), not COULD-NOT-GRADE (rc=2): the supplied anchor was readable, and rc=2 remains for missing or unreadable facts."That is AC3 answered as a decision, not a default. I had written the AC allowing either; the reasoning for choosing rc=1 is better than the reasoning I would have given.
Why it cost an hour
#1444's failed manifest write left the default branch'slast_released_shaat v0.62.3's, and this gate read that as its anchor 100 seconds later. The operator opened the goreleaser run expecting a docker or registry problem; the image had pushed successfully and a gate was refusing on someone else's stale state. @rigger implemented; @quartermaster reviewed.