Skip to content

feat(gate): dry-run disposition — would-be merge/close/manual verdict without enforcing - #1588

Merged
JSONbored merged 1 commit into
mainfrom
feat/gate-dryrun-disposition
Jun 27, 2026
Merged

feat(gate): dry-run disposition — would-be merge/close/manual verdict without enforcing#1588
JSONbored merged 1 commit into
mainfrom
feat/gate-dryrun-disposition

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

With gate.dryRun on, the gate runs a shadow evaluation with every advisory sub-gate promoted to block and exposes it as 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 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, displayConclusion is absent and behaviour is byte-identical. The shadow eval preserves newcomer grace and the size/guardrail manual-review HOLDs. Fully covered.

…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.
@dosubot dosubot Bot added the size:M 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 (7010e48) to head (ff16146).
✅ All tests successful. No failed tests found.

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           
Files with missing lines Coverage Δ
src/queue/processors.ts 88.07% <100.00%> (+<0.01%) ⬆️
src/review/unified-comment-bridge.ts 95.87% <100.00%> (ø)
src/rules/advisory.ts 97.55% <100.00%> (+0.07%) ⬆️
src/signals/focus-manifest.ts 99.16% <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 9e6918d into main Jun 27, 2026
18 checks passed
@JSONbored
JSONbored deleted the feat/gate-dryrun-disposition branch June 27, 2026 08:30
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