fix(code-reviewer) council decision gate#4617
Merged
Merged
Conversation
Wire the code-owned council decision into the merge gate and the PR summary. The council LLM never reports a gate result, so the status callback derives it from the computed decision: advisory never gates; a block under Unanimous or Majority fails the check run. The authoritative Council Review section (decision, governance mode, per-specialist table) is rendered by code and injected into the summary comment, idempotently and provider-mode only, so the model can no longer author a table or verdict that contradicts the result. Manual runs report the decision but state they do not block merge.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commit fixes the previously flagged CodeQL incomplete-escaping issue in Files Reviewed (2 files)
Previous Review Summary (commit 5ab3588)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 5ab3588)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed the council decision-gate wiring (code-owned merge gate + injected PR summary verdict section) across all 7 changed files; no high-confidence correctness, security, or logic issues found in the changed lines. Files Reviewed (7 files)
Reviewed by claude-sonnet-5 · Input: 20 · Output: 2.5K · Cached: 359.5K Review guidance: REVIEW.md from base branch |
jeanduplessis
approved these changes
Jul 17, 2026
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.
Summary
The Code Reviewer Council computes its governance decision in code (the model
reports findings only), but the PR previously showed per-specialist votes with
no decision, and the decision was not wired into the merge gate. This change
makes the council decision drive both the posted PR summary and the merge-gate
check, with the presentation code-owned so a model-authored table or verdict
cannot contradict the computed result.
Changes
buildCouncilReviewSectionincode-review-council.ts): a title-cased## Council Reviewheading, thedecision, a per-specialist table (specialist, model, highest severity,
finding count), and a governance-mode line. The coordinator prompt no longer
writes its own table or verdict.
delimiters (
upsertCouncilVerdictInBody), replacing the block in place onre-runs. Folded into the existing summary footer/history update, so each
completed council review does one comment fetch and one update instead of two.
single
councilGatesflag (a completed council review that is not a manualrun) drives both the gate result and the section wording, so enforcement and
the comment stay consistent across GitHub and GitLab. Advisory never gates; a
blockunder Unanimous or Majority fails the check. Manual runs report thedecision but do not block merge.
finalizeCouncilResultForReviewnow returns the persistedCodeReviewCouncilResultso the callback can read the decision for the gateand the comment.
Verification
Manually verified in local provider mode against test pull requests with
intentional issues:
## Council Reviewsection (decision,governance, per-specialist table) to the PR, matching the stored result.
a blocking finding shows a block decision.
Not exercised as a live block: council is manual-only today and manual runs
never create a gate check, so the blocking path is covered by automated tests
rather than a real merge block.
Visual Changes
N/A (no application UI). The change affects the Markdown of the posted PR/MR
review comment.
Reviewer Notes
councilGatesis always false and no current review hard-blocks. The wiringactivates for automated council reviews (which get a check run) if those exist
later. This matches the intended "post the decision, do not hard-block yet"
behavior.
councilGatesderivation and its use for botheffectiveGateResultand the section wording (route.ts), and the idempotentcomment injection folded into the footer/history update on both the GitHub and
GitLab paths.