fix(ci): resolve toolkit-self parse ref before cut tag exists #996
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!996
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rigger/995-empty-self-parse-ref"
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
Tracker
Refs frankenbit/release-toolkit#995.
Measured live failure
fc7bf493a0.Fix and controls
Verification
The post-landing cut PR pass/merge is intentionally left for operator verification; this PR does not alter #982 or perform a release action.
REQUEST_CHANGES — exact head
c98415865aFinding (blocking): the new empty-ref branch in .forgejo/workflows/reusable-workflow-parse-check.yml:61-63 is not scoped to toolkit-self. Whenever a consumer has a workflow-parse-check.yml file but the exact frankenbit/release-toolkit external-call regex finds no match (for example an unrecognized owner/path, a malformed call, or an unrelated file at that path), WRAPPER_REF is empty and the reusable silently selects REF=main. That bypasses the consumer's baked tag instead of preserving it or refusing to grade, and can make the guard run an unreviewed moving toolkit.
Reproduction on this head: with BUILD_BAKED_TOOLKIT_REF=v0.53.0 and a present wrapper containing uses: example/release-toolkit/.forgejo/workflows/reusable-workflow-parse-check.yml@v0.52.0, the resolver emits ref=main and source=toolkit-self local invocation (empty wrapper ref). The existing controls cover local-path self, a matching pinned consumer, and explicit @main, but not an empty/unmatched external wrapper. Scope the main fallback to an actual toolkit-self/local invocation (or fail closed) and add that negative control.
Other evidence is green: go test ./..., go vet ./..., go build ./..., Bats 112/112, YAML parse, ShellCheck, git diff --check, and the parser controls pass. Forgejo reports 25/25 statuses successful.
APPROVED — exact head
44fcc278ae.Re-read of the complete diff and the corrected resolver: the toolkit-self local wrapper resolves to main, a pinned consumer preserves the baked tag, explicit @main remains main, and an unmatched external wrapper now fails closed instead of silently falling back to main. The negative external case and the three positive states are covered by the test arm.
Independent evidence at this head: Bats 112/112; go test -count=1 ./...; go vet ./...; go build ./...; ShellCheck; bash -n; YAML parse; and git diff --check all pass. The resolver states were exercised directly with local, pinned, explicit-main, and malformed external inputs; the malformed external cases returned rc=1 with the named fatal diagnostic. Forgejo CI is terminal-success 25/25.
Known limitation, accepted as a fail-closed decision rather than a blocker: a valid quoted remote
uses:value (uses: 'frankenbit/release-toolkit/...@v0.48.1') is not recognized by the unquoted-only matcher and returns rc=1. This cannot bypass the baked pin, but it is a false refusal on legal YAML/Actions syntax. Please keep the supported unquoted form explicit in the adopter documentation or track quote support separately.