feat(cut): reduce path-α cut workflow self-cancel noise — re-order or defer manifest direct-push #139
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#139
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?
The phenomenon
When the cut path runs under path-α (release-bot configured +
RELEASE_TOKEN_OVERRIDEset), the workflow's own manifest direct-push tomainfires a newpush:mainevent. Forgejo Actions then cancels the older in-flight run in favor of the new one. The cut substantively completes (release-create + manifest commit + main update all succeed) BEFORE cancellation interrupts the in-flight run's post-steps.Empirical observations
n=4 path-α cuts, all showed the same self-cancel pattern:
So the cancellation pattern is reproducible + structural to path-α, not a one-off. The idempotency work in #131 handles the failure mode (re-run after cancel → idempotent skip) but doesn't prevent the cancellation itself.
Why path-γ doesn't have this
Path-γ's manifest update goes through a PR (operator merges later), not a direct push. The cut workflow doesn't trigger a new
push:mainevent on itself; no self-cancel.Possible mitigations
(A) Re-order: manifest direct-push as the LAST substantive step
Move the manifest direct-push to the END of the cut step's bash. Post-cancel interruption then only loses trivial work (e.g., the stale-rolling-PR cleanup runs BEFORE the push). The cancellation still happens, but it interrupts nothing load-bearing.
Pro: simplest fix; ~10 lines of step-ordering in
_release.yml.Con: doesn't eliminate the cancellation itself; just minimizes the blast radius.
(B) Forgejo concurrency block on the workflow
concurrency:is a documented banned top-level key in this Forgejo runtime (pertests/workflows.bats"no top-level concurrency / run-name / timeout-minutes" guard — Forgejo silently rejects). So this isn't available unless that constraint has loosened.Pro: would prevent the cancel entirely.
Con: blocked by the substrate (the workflow.bats guard documents the failure mode).
(C)
[skip-ci]marker on the manifest commitIf Forgejo Actions respects
[skip-ci]/[skip ci]in commit messages, the manifest commit could include it and not retrigger the workflow.Pro: clean — the manifest push doesn't fire a new workflow run; no cancel.
Con: needs verification that Forgejo respects the marker. If it doesn't, this mitigation can't fly without an upstream Forgejo change.
(D) Push the manifest with a paths filter that excludes the workflow
The release.yml workflow could use
paths-ignore:orpaths:to exclude commits that ONLY touch.release-toolkit-manifest.json.Pro: only affects manifest-only commits; other pushes (substantive code) still fire the workflow.
Con: relies on Forgejo Actions respecting
paths/paths-ignorecorrectly. Needs verification.(E) Split cut + manifest into two workflows
The cut workflow handles release-create; a separate "manifest-update" workflow handles the manifest commit. Sequencing via
workflow_callchaining.Pro: clean separation of concerns.
Con: significant complexity; would need redesign of the
_release.ymlcut path; possibly not worth it for cosmetic noise.My lean
(A) re-order as the minimum-viable fix, with empirical investigation of (C)
[skip-ci]+ (D)paths-ignore:as potentially-better cleaner alternatives.Try (C) first — single-line addition to the manifest commit message. If Forgejo respects it, that's the cleanest. If not, fall back to (A) or (D).
Severity: cosmetic-noise
The substrate state is correct after every path-α cut (idempotent code path + the cancellation being structurally benign per the post-idempotency v0.10.2 evidence). This tracker reduces noise + makes the workflow-run UI cleaner; doesn't fix a substrate bug.
Implementation surface
_release.ymlcut path (~10 lines of YAML)[skip-ci]to the manifest commit message + observe if Forgejo respects itpaths-ignore: [.release-toolkit-manifest.json]to release.yml's push trigger + observeAll three together: ~50 lines of changes + 1-2 cuts of empirical verification.
Refs
tests/workflows.bats"no top-level concurrency / run-name / timeout-minutes" guard (rules out option B)release.ymlomits the load-bearingpaths-ignoreguard (#139 self-cancel) #198