Skip to content

fix(gate): correct max_breaking/max_dangerous threshold semantics#15

Merged
Coding-Dev-Tools merged 1 commit into
mainfrom
Openclaw/api-contract-guardian/fix-gate-max-threshold-logic
May 19, 2026
Merged

fix(gate): correct max_breaking/max_dangerous threshold semantics#15
Coding-Dev-Tools merged 1 commit into
mainfrom
Openclaw/api-contract-guardian/fix-gate-max-threshold-logic

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

The default max_breaking=0 previously meant 'zero allowed' but was
ignored when fail_on_breaking=False due to a conditional that skipped
max_breaking=0 in favor of the flag. This caused breaking changes to
silently pass CI gates when --allow-breaking was set.

Change both max_breaking and max_dangerous defaults to -1 (defer to
flag). Now:

  • -1 = use fail_on_breaking/fail_on_dangerous flag (default)
  • 0 = explicit ceiling: allow zero of that severity
  • 0 = explicit ceiling: allow N of that severity

This makes --max-breaking=0 work correctly with --allow-breaking,
preventing silent CI gate bypasses.

Adds two regression tests for the previously-broken edge cases.

The default max_breaking=0 previously meant 'zero allowed' but was
ignored when fail_on_breaking=False due to a conditional that skipped
max_breaking=0 in favor of the flag. This caused breaking changes to
silently pass CI gates when --allow-breaking was set.

Change both max_breaking and max_dangerous defaults to -1 (defer to
flag). Now:
  - -1 = use fail_on_breaking/fail_on_dangerous flag (default)
  - 0  = explicit ceiling: allow zero of that severity
  - >0 = explicit ceiling: allow N of that severity

This makes --max-breaking=0 work correctly with --allow-breaking,
preventing silent CI gate bypasses.

Adds two regression tests for the previously-broken edge cases.
@Coding-Dev-Tools Coding-Dev-Tools merged commit 3ea987b into main May 19, 2026
4 checks passed
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