Skip to content

feat(gate): size + guardrail manual-review HOLD in the disposition (advisory-friendly)#1584

Merged
JSONbored merged 1 commit into
mainfrom
feat/gate-size-guardrail-hold
Jun 27, 2026
Merged

feat(gate): size + guardrail manual-review HOLD in the disposition (advisory-friendly)#1584
JSONbored merged 1 commit into
mainfrom
feat/gate-size-guardrail-hold

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

A PR that would otherwise pass but is oversized (≥10 changed files OR ≥500 changed lines) or touches a guardrail path is now HELD for manual review by the gate — a neutral conclusion → "manual" verdict. Neutral never blocks a merge and never auto-closes, so the accurate hold disposition is visible even in advisory/dry-run; a real hard blocker still wins (failure). Moves the guardrail hold from the action layer (which doesn't run in advisory) into evaluateGateCheck. Thresholds are 10/500 constants; gate.size.mode (off|advisory|block) is per-repo config. Fully covered.

…dvisory-friendly)

#gate-size / #gate-guardrail. A PR that would otherwise PASS but is oversized (>=10 changed files OR >=500 changed
added+deleted lines) or touches a hard-guardrail path is now HELD for manual review by the gate itself — a neutral
conclusion → 'manual' verdict in the unified comment. Neutral never blocks a merge and never auto-closes, so this is
visible even in advisory/dry-run; a real hard blocker still wins (failure). The guardrail hold previously lived only in
the action layer (which doesn't run in advisory); moving it into evaluateGateCheck makes the disposition accurate in
advisory. Size thresholds are constants (10/500); gate.size.mode (off|advisory|block) is per-repo config-as-code.

- advisory.ts: buildSizeHoldFinding + buildGuardrailHoldFinding + the neutral-hold branch (after the deterministic
  blockers, so a real violation still fails) + GateCheckPolicy.{sizeGateMode,changedFileCount,changedLineCount,guardrailHit}.
- processors.ts: gateCheckPolicy threads a per-PR sizeContext (live file/line counts + guardrail-hit from the memoized files).
- focus-manifest.ts + types.ts: gate.size.mode parse → sizeGateMode (config-as-code).
@dosubot dosubot Bot added the size:L label Jun 27, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.47%. Comparing base (00cff73) to head (c93a986).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1584   +/-   ##
=======================================
  Coverage   95.46%   95.47%           
=======================================
  Files         202      202           
  Lines       21839    21868   +29     
  Branches     7885     7899   +14     
=======================================
+ Hits        20849    20878   +29     
  Misses        414      414           
  Partials      576      576           
Files with missing lines Coverage Δ
src/queue/processors.ts 88.06% <100.00%> (+0.04%) ⬆️
src/rules/advisory.ts 97.47% <100.00%> (+0.19%) ⬆️
src/signals/focus-manifest.ts 99.15% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored merged commit 7010e48 into main Jun 27, 2026
18 checks passed
@JSONbored
JSONbored deleted the feat/gate-size-guardrail-hold branch June 27, 2026 08:15
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