Skip to content

feat: add allow_breaking_changes manifest field to disable the breaking-change gate - #502

Merged
joshua-temple merged 5 commits into
mainfrom
feat/disable-breaking-change-gate
Jul 7, 2026
Merged

joshua-temple merged 5 commits into
mainfrom
feat/disable-breaking-change-gate

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

The breaking-change promote gate (feat!: / BREAKING CHANGE: commits block the prerelease-to-release and release-to-prod boundaries) can only be bypassed per-run today, via the --allow-breaking flag or the allow_breaking_changes workflow input. A team that never wants the gate has no way to turn it off once. Closes #492.

Fix

Add an additive, optional manifest field allow_breaking_changes (bool, default false = gate enabled, so existing behavior is byte-identical). When true, the gate is skipped for the repo without the per-run override; the per-run --allow-breaking flag and workflow input keep working as before.

The gate is enforced in two places, both handled:

  • Go preflight (checkBreakingChangesForMode): short-circuits on the manifest field. The generated promote.yaml delegates to cascade promote preflight, so the CLI honoring the manifest covers the promote path.
  • Generated release shell (release.go): independently gates in bash off ALLOW_BREAKING. The value is now baked from the manifest at generation time (ALLOW_BREAKING: "true" when the field is set), leaving the operator input declared. Default output is byte-identical (no drift in cascade's own workflows).

Verification

  • go build ./..., go test ./... -race, golangci-lint run ./... all clean.
  • JSON schema declares the field across all three byte-identical copies (internal/schema, schema/, docs/public/), guarded by TestSchema_OnDiskCopiesAreByteIdentical.
  • New e2e scenario 49-allow-breaking-changes-manifest drives a feat!: commit through promote with the manifest field set and no per-run override.
  • Docs: manifest reference + capability description + coverage-matrix row updated in the same PR.

Closes #492.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…ges is set

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…breaking_changes is set

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 2cd506a into main Jul 7, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the feat/disable-breaking-change-gate branch July 7, 2026 05:42
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.

Add a manifest option to disable the breaking-change gate (on by default)

1 participant