fix(config): reject merge_group on extra_triggers, pointing at merge_queue.enabled - #539
Merged
Merged
Conversation
…queue.enabled extra_triggers has exactly one sink: it attaches to the orchestrate workflow, which cuts release tags, publishes releases, runs deploys, and writes state. So extra_triggers.merge_group would run that side-effecting lane on a merge-queue speculative branch, and finalize could publish a real release from a candidate commit that never lands, writing state to a gh-readonly-queue ref. Validation now rejects merge_group under extra_triggers (top-level and per-component) with an error pointing at merge_queue.enabled, the read-only lane that exists to gate pull requests inside a merge queue. Behavior change: a manifest that set extra_triggers.merge_group was accepted before and is now rejected at validate. Migrate by setting merge_queue.enabled. The other extra_triggers (schedule, repository_dispatch, workflow_run) are unchanged. The three schema copies and the docs document the change and the migration. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
extra_triggershas exactly one sink: it attaches to the orchestrate workflow, which cuts release tags, publishes releases, runs deploys, and writes state. Soextra_triggers.merge_groupwould run that side-effecting lane on a merge-queue speculativegh-readonly-queuebranch, and finalize could publish a real release from a candidate commit that never lands. cascade already ships the correct read-only merge-queue lane viamerge_queue.enabled.Fix
Validation now rejects
merge_groupunderextra_triggers(top-level and per-component) with an error pointing atmerge_queue.enabled. The reject is precisely scoped:extra_triggershas no non-side-effecting sink, so nothing legitimate is broken.Behavior change (documented)
A manifest that set
extra_triggers.merge_groupwas accepted before and is now rejected at validate. Migration: setmerge_queue.enabled. The other extra_triggers (schedule,repository_dispatch,workflow_run) are unchanged. Updated: the three byte-identical schema copies' field description, and docs (manifest reference, how-it-works, companions) with the migration.Verification
New tests (red-before/green-after): top-level and per-component
extra_triggers.merge_groupare rejected with themerge_queue.enabledpointer; accept cases (merge_queue.enabled, other extra_triggers, nil) pass; a CLI-layer test asserts the pointer on stderr. Scenario 34 rewritten to the validate-error case, keeping the legitimate extra_triggers. Fullgo test ./...(2677 pass, incl. schema-validates-scenarios + on-disk-schema-copies + byte-identical),-race,golangci-lintall clean; docs site builds.