fix: prevent false major release signoff - #404
Conversation
🦋 Changeset detectedLatest commit: d03268c The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Fix is right, and proven on this PR: changeset-bot commented 1s after the run started and the run survived. The same 1 to 4s gap cancelled runs on #393, #403 and Splitting the concurrency key is better than Three notes:
Forks are still a dead end ( |
e99e7dc to
d03268c
Compare
Summary
issue_commentruns before workflow concurrency can cancel an active PR evaluation<!-- major-signoff-required -->comments after successful non-major evaluationsVerified race
On PR #393, the pull request run computed a non-major preview (
introduced_major=false). While that preview run was active,changeset-bot[bot]updated a comment. Because workflow-level concurrency grouped every event by PR withcancel-in-progress: true, the bot'sissue_commentrun cancelled the valid preview before job-level conditions could skip it.The gate then mapped the cancelled preview result to
is_major=1. Its later comment, status, and failure steps ignored the existing blocked reason and incorrectly claimed that the PR contained a breaking change. The replacement bot-triggered run posted non-major success, but the stale blocking comment remained. PR #396 showed the same cancellation pattern.This change gives bot comment runs unique concurrency keys and skips their jobs, so they cannot cancel human or pull-request evaluations and workflow-authored comment cleanup cannot create an event loop.
Security
The trust boundary is unchanged. The preview job may execute checked-out PR data but has read-only contents permission. The gate has comment and status write permissions, never checks out PR code, and keeps forks or unevaluable previews blocked as unknown impact.
Verification
pnpm test:ci-scripts- 21 passedmajor-release-signoff.ymlbash -n .github/scripts/major-release-signoff.test.sh- passedgit diff --check- passedpnpm lint- package builds passed, then Oxlint crashed internally inoxc_allocatorwith exit 134 before lint completedGreptile Summary
The PR fixes the major-release signoff workflow’s cancellation and classification behavior while addressing both previously reported stale-comment cleanup issues.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD E[Pull request or human comment] --> C[Resolve PR context] B[Bot-authored issue comment] --> S[Isolated run; jobs skipped] C --> P[Compute trusted release preview] P --> D{Decision} D -->|Unknown or invalid| U[Remove stale workflow-owned instructions] U --> F[Publish unknown-impact failure] D -->|Trusted non-major| N[Remove stale workflow-owned instructions] N --> OK[Publish success] D -->|Trusted major| A{Valid collaborator signoff?} A -->|Yes| MS[Publish success] A -->|No| BC[Upsert signoff instructions and fail gate]Reviews (3): Last reviewed commit: "fix: clean stale signoff comments safely" | Re-trigger Greptile