feat(gate): size + guardrail manual-review HOLD in the disposition (advisory-friendly)#1584
Merged
Merged
Conversation
…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).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
This was referenced Jun 27, 2026
Closed
12 tasks
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.
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
neutralconclusion → "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) intoevaluateGateCheck. Thresholds are 10/500 constants;gate.size.mode(off|advisory|block) is per-repo config. Fully covered.