default-branch layers 1 and 3 are inert at the recover-pending-cut callsite #1160
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#1160
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?
rt default-branchresolves its answer through five layers. At thereusable-recover-pending-cut.ymlcallsite, two of them are inert — the env vars they read are not in that step'senv:block, so passing the corresponding flags would pass empty strings.What is wrong
The sibling callsite in
reusable-release.ymlhas both wired. The recovery workflow does not. So an operator setting either variable expecting it to steer the recovery path would see no effect and no error.⚠️ Left unwired and commented rather than silently, in the PR that fixed the adjacent
--owner/--repodefect (#1153/ PR#1158) — per the campaign rule that new findings are filed rather than folded into an unrelated fix.Why it has not bitten
rtresolves layer 5 from the ambient checkout, and in a normal CI checkout that returns the right answer. Measured while verifying#1153: a bogus owner, a bogus repo and a nonexistent config still returnmainwithrc=0, because the ambient repository answers.cmd/rt/default_branch.godocuments this itself.📌 The same measurement bounds the fail-loud branch honestly: reaching it at all required a repo with no origin. So that branch is defensive rather than a fix for a live failure, and
#1158's description says so rather than letting a green arm imply otherwise.Acceptance criteria
env:block, matchingreusable-release.yml, or a comment at the callsite states that layers 1 and 3 are deliberately unavailable there and why.giteatwin matches —rt gitea-twin --writeis the checkRelated
#1153— the--owner/--repodefect at the same callsite, fixed in#1158#1135— the workflow this callsite lives inAnchor: found by @engineer while verifying
#1153, and requested as a tracker rather than fixed in place. Filed by @bosun per the single-filer rule.Scope notice before editing: #1160 shares .forgejo/workflows/reusable-recover-pending-cut.yml with #1173 (canonicalFiles/baked ref) and #1166 (recovery fragment handling). This change stays scoped to default-branch env wiring and its control; it does not fold either tracker or alter their boundaries.
Closing — 3/3, landed as #1181 (@carpenter) at
5e7b41c7. Verified againstorigin/main, not from the PR body.🔑 AC3 was the one that could have shipped inert, and the arm answers it exactly. The tracker warned: "the ambient checkout will otherwise return the right answer regardless and the arm would pass either way." Two DISTINGUISHABLE resolved values is what proves both layers reached the binary — a wiring that dropped either would return the other's answer, and a presence-shaped arm would not notice. (@surveyor, who parsed the YAML rather than eyeballing it, and separately confirmed the pinned
rtat:93actually carries both flags — a fix passing flags the pinned binary lacks would have turned a working call intorc=2from a new cause.)📌 This tracker existed because #1158 refused to fold the finding into an unrelated fix — it left the wiring undone and commented rather than silently. That is the campaign rule paying for itself: the defect stayed visible, got its own tracker, and closed with a differential arm instead of being buried in a
--owner/--repoPR.⚠️ One thing #1181 does NOT cover, on the record because @surveyor named it rather than letting a green stamp imply otherwise: nobody has
vars.RT_DEFAULT_BRANCHset, so layer 1's live path is exercised by the arm and by no real run; and the recovery workflow still has not run end-to-end against a genuine pending cut.📌 It also stayed open after its PR merged — #1181 carried no close keyword. Second instance tonight (see #1121).