Skip to content

fix(config): reject merge_group on extra_triggers, pointing at merge_queue.enabled - #539

Merged
joshua-temple merged 1 commit into
mainfrom
fix/reject-mergegroup-on-sideeffecting
Jul 9, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/reject-mergegroup-on-sideeffecting

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

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 gh-readonly-queue branch, and finalize could publish a real release from a candidate commit that never lands. cascade already ships the correct read-only merge-queue lane via merge_queue.enabled.

Fix

Validation now rejects merge_group under extra_triggers (top-level and per-component) with an error pointing at merge_queue.enabled. The reject is precisely scoped: extra_triggers has no non-side-effecting sink, so nothing legitimate is broken.

Behavior change (documented)

A manifest that set extra_triggers.merge_group was accepted before and is now rejected at validate. Migration: set merge_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_group are rejected with the merge_queue.enabled pointer; 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. Full go test ./... (2677 pass, incl. schema-validates-scenarios + on-disk-schema-copies + byte-identical), -race, golangci-lint all clean; docs site builds.

…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>
@joshua-temple
joshua-temple merged commit 6b1448d into main Jul 9, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the fix/reject-mergegroup-on-sideeffecting branch July 9, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant