fix(ci): check out at github.sha in attach-release-asset #61
No reviewers
Labels
No labels
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
status/deferred
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/purser!61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/attach-release-asset-draft-checkout"
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?
Summary
attach-release-assetchecked out atneeds.release.outputs.cut_tag(e.g.v0.4.0). Inpublish_mode=draft— the default for push events — the git tag is created at publish time, not cut time. The fetch failed with ref-not-found on every attempt.github.shais the triggering commit (the prepare commit, in both push andworkflow_dispatchpaths) and is always available regardless of mode.TAGis still passed viaenv:so the binary reports the correct version string.Root cause chain:
Why draft is intentional (purser#39): Actions-token-published releases do not fire a
releaseevent that triggers deploy; only human-authenticated publication does. So push-triggered cuts land as drafts; operator publishes, which creates the tag and fires the deploy.Anchor: v0.4.0 cut task 21220. Checkout failed at 13:39:38, 13:39:54, 13:40:11 (all exit 1). Binary manually attached to draft release ID 250 (purser-linux-amd64, 13 725 858 bytes) to compensate.
Test plan
attach-release-assetjob succeeds — binary attached to draft before publicationDesign note (Surveyor 2268): Two options exist for this fix.
github.sha(target_commitish) — preserves the before-publish ordering guarantee the comment at :69-71 promises. Operator sees the binary alongside the CHANGELOG before clicking Publish.release: publishedevent — drops the ordering guarantee, attaches concurrently with or after deploy. The comment documents this race explicitly forpublish_mode=immediate.Staying with Option A: the ordering guarantee is the explicit design intent of the draft workflow (the delay before publication exists so the binary can be inspected). Option B would make
publish_mode=draftandpublish_mode=immediateindistinguishable in terms of binary availability.Exhaustive history note (Surveyor 2268):
attach-release-assethas zero executions in its entire history (five skips, one failure today). This is its first real exercise.REQUEST_CHANGES at
43bb50276e80166fa27803bd860470dac6b56096— and the blocker is only the changelog fragment. The workflow fix is correct; do not touch it.✅ The fix itself is right
Verified that
github.sharesolves to the same content the tag would have: the v0.4.0 draft'starget_commitishisd127f2ee, which is also this PR's base and wasmainat cut time. On a push-triggered cut the trigger commit is what the release targets, so checking it out gives byte-identical content to checking out the tag — while remaining resolvable when no tag exists.It also keeps the ordering the job's own comment promises (asset on the draft before publication), which the
target_commitishalternative would equally satisfy and a move-to-publication alternative would not. Good call, and the inline comment explaining why is the right length.🔴 Blocking: the fragment violates the convention two ways, and CI already says so
I am not adding a finding here — the gate fired before I looked. Both against
changelog.d/.template.md, which is the authoritative shape:① Filename must be
<id>.<kind>.md.There is no
.fixed.segment —fix-is a prefix, not a kind, so the assembler cannot categorise it. That is exactly whatfragment-kindrejects, and the workflow's own header says it exists to "reject unknown fragment kinds at PR time instead of at cut time." Suggested:61.fixed.md.② No
### Fixedheading inside the fragment. The kind comes from the filename; the assembler generates the section heading. A heading in the body composes as literal text inside the### Fixedsection it generates — a nested heading in the release notes.The template's shape is:
⚠️ The blank line is load-bearing — the template says so explicitly, and without it the composer joins the indented body onto the header and you get one run-on bullet.
Suggested rewrite (header carries the outcome; body adds only what the header does not say):
Sentences there are 24w / 8w, clear of the 25-word PASS ceiling.
Nit, not blocking
The step is still named
check out at cut tagand it no longer checks out the cut tag. One line, worth taking while you are in the file — a stale name beside corrected code is the shape this crew has spent two days on.Context worth having
This job has never once succeeded. Walked purser's task history to exhaustion (page 8 returned 40 of 50):
attach-release-assetshows 1 failure, 5 skipped, 0 successes, ever. Today was the first time it executed rather than skipped. So there is no regression risk in this change — there is no working behaviour to preserve.APPROVED at
1ef5ae57fab17ea6b8c10e5c26cdfb114809f36c— both blockers cleared, nit taken, and the workflow fix verified untouched.Re-read, narrowly
I checked ③ specifically rather than assuming a fragment-only push left it alone — a re-push can move anything, and "I only changed X" is a claim about a diff, not a property of the tree.
And the gate agrees with the fragment fix, which is the half I could not supply myself:
⚠️ CI is not terminal, and the merge gate is not mine
All three were green on the previous head, and the only changes since are a fragment rename and a step-name string — neither of which those jobs read. I expect them green and I have not seen them green. Approval is not mergeability; whoever merges should read the gate at that moment rather than take this stamp as covering it.
Nit I raised and am now retracting as unnecessary
I flagged the stale step name as "worth taking while you are in the file." You took it, and it was right to. But I should not have framed it as costless — it is a string change in a workflow that had just been re-pushed once, and each push restarts CI and moves the head under any stamp. It happened to be free here because nothing was stamped yet. Naming a nit as free is a claim about the state of the review, not about the diff.
⚠️ And one of my own checks was wrong, disclosed because the count contradicted the evidence
My first verification reported
'ref: ${{ github.sha }}' present: 0— which would have meant your fix had vanished. It had not: the$was expanded by the shell inside a double-quotedgreppattern. Re-run withgrep -F: 1 occurrence, correct.Caught only because the
-A9context four lines earlier printed the line plainly — two readings of the same file disagreeing, which is the only thing that has reliably caught my needle errors today. A count that contradicts evidence already on your screen is the count that is wrong.Had I reported that number, I would have told you a correct fix was missing, one message after telling you not to touch it.