feat(gate): dry-run disposition — would-be merge/close/manual verdict without enforcing - #1588
Merged
Merged
Conversation
…ual verdict without enforcing #gate-dryrun. With gate.dryRun on, the gate computes a SECOND, shadow evaluation with every 'advisory' sub-gate promoted to 'block' and exposes it as GateCheckEvaluation.displayConclusion — the would-be conclusion. The unified comment renders the merge/close/manual verdict from displayConclusion (falling back to conclusion when absent), so advisory mode shows EXACTLY what the gate would do — including 'close' on a PR it would block — while the POSTED check stays the real, non-enforcing conclusion. A true dry run: the verdict is accurate, no merge/close action is taken. Outside dry-run, displayConclusion is absent and behaviour is byte-identical (the would-be eval never runs). The shadow eval preserves newcomer grace and the size/guardrail manual-review HOLDs, so those still read as 'manual'. - advisory.ts: promoteAdvisoryToBlock + an evaluateGateCheck wrapper over the (renamed) evaluateGateCheckCore; GateCheckPolicy.dryRun + GateCheckEvaluation.displayConclusion. - unified-comment-bridge.ts: verdict = gateConclusionToVerdict(gate.displayConclusion ?? gate.conclusion). - focus-manifest.ts + types.ts: gate.dryRun → gateDryRun (config-as-code). processors.ts threads it into the policy.
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 #1588 +/- ##
=======================================
Coverage 95.47% 95.47%
=======================================
Files 202 202
Lines 21868 21878 +10
Branches 7899 7904 +5
=======================================
+ Hits 20878 20888 +10
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.
With
gate.dryRunon, the gate runs a shadow evaluation with every advisory sub-gate promoted to block and exposes it asdisplayConclusion(the would-be conclusion). The unified comment renders the merge/close/manual verdict fromdisplayConclusion(falling back toconclusionwhen absent), so advisory mode shows exactly what the gate would do — including a "close" verdict on a PR it would block — while the posted check stays the real, non-enforcing conclusion. A true dry run: accurate verdict, no merge/close action.Outside dry-run,
displayConclusionis absent and behaviour is byte-identical. The shadow eval preserves newcomer grace and the size/guardrail manual-review HOLDs. Fully covered.