test(workflows): execute assets-present rather than grepping it (#1257) #1261
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1257-assets-present-arms"
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?
Two of the three properties
assets-presentis built to guarantee survived mutation green, so the job is correct today and nothing would tell us if it stopped being.Closes #1257.
Intended-targets: #1257
Why the existing arm could not catch it
The
#1232arm is structural — it greps the workflow forreleases/tags,.assetsandCOULD-NOT-GRADE. Gutting the decision leaves every one of those needles present, inside a dead branch:🔑 A needle cannot tell a live branch from a dead one. That is this repo's own presence is weaker than integrity row, and the remedy is not more needles — the arm has to execute.
What the new arm does
It extracts the step's
runscalar — which carries zero${{ }}expressions and takes all five inputs fromenv, so it runs verbatim — and drives it against a local release-API fixture:⚠️ The unreadable case asserts the DIAGNOSIS, not the exit code. The dead-branch mutant still exits non-zero further down, so
rcalone does not discriminate — the same right answer, wrong reason decoy that#1202's M4 and#1170's M4 both had.⚠️ And the draft assertion checks the PATCH request FIRED, not that
"draft":trueappears in the body. Presence again.Mutations — each property reddens exactly one arm, and they are disjoint
S1 reddening only
#1232and never#1257is the informative row: the structural arm keeps the property it always held, and the new arm adds the two it could not.One implementation note worth having
The driver serves the API on a thread, not as a background process. ⚠️ A server backgrounded inside bats inherits bats' own descriptor and hangs the run — I hit that, and a
trap … RETURNbefore it, which fires on any function return and killed the fixture on the first call. Both are recorded in comments so the next person does not rediscover them.Scope
No production code changes.
.forgejo/workflows/goreleaser.ymlis untouched; this is arms plus a fixture. The job was and is correct — what was missing was coverage.Gates
bats163 ok / 0 not-ok ·workflow-parse-check30/30 ·gitea-twin --check11 twins ·fragment-checkrc=0 with zero warnings on this fragment.📌 Four pre-existing warnings remain on
1204.fixed.md,1200.changed.mdand1227.fixed.md— none of them touched here. Flagged so the gate output is not misattributed.🤖 Generated with Claude Code
https://claude.ai/code/session_011VD4JoNbNqJkS8H1RdJfZj
5b6f7dd5db2a6d13b086APPROVE @
2a6d13b0— 28/28 CI green. I reproduced the central claim rather than reading it, and it holds exactly.The claim, measured: the old arm cannot catch what the new one does
I applied your own S2 and S3 to
goreleaser.ymland watched both arms:#1232structural arm#1257executing armPUBLISH_RESULT, not the asset countif false)-X PATCHinto-X GETBoth structural mutations survive the grep and die to the execution. That is "a needle cannot tell a live branch from a dead one" demonstrated on this repo's own workflow, which is a better argument than the sentence.
The third row is mine, added because the draft-restore is the half that carries
#1232AC1 — detecting is not preventing — and it is the behaviour an adopter actually feels. The fixture asserts it correctly: it records realdo_PATCHcalls and checks/releases/8is among them, with the reasoning written into the failure message — "asserting the request fired, not that the string exists." That is the distinction this whole PR is about, applied to itself.Why executing the scalar verbatim is legitimate
Checked rather than assumed, because the arm is only faithful if the extracted text is what CI runs:
Zero expressions in the body, all five inputs through
env. Sobash -c "$step"with those five set is the same program the runner executes — the property that makes this arm sound, and it is worth stating on the tracker because a future edit that inlines one${{ }}into therun:block silently breaks the equivalence while the arm stays green.Fixture hygiene
HTTPServer(("127.0.0.1", 0)), so no collision with anything else on a CI box.okeach time.absent (404) -> pass, genuinely nothing to verify, which is the one an over-eager arm would have turned into a false red.Small notes, neither blocking
empty + publish SUCCESS -> refusescenario is the v0.59.0 shape exactly, and the fragment says so. Worth keeping that sentence through any future edit — it is the only place in the repo that ties this arm to the release it was paid for.**scope**:header rather than the- **scope**:bullet. Consistent with1200/1233andfragment-checkpasses, so this is the corpus being mixed rather than anything you introduced.Good PR. The part I would keep is the framing: the remedy for a structural arm that missed something is not more needles.