feat(core): wire review rules + settings into live reviewSummary (T-CR-501/502)#63
Merged
Merged
Conversation
…R-501/502) GitHandler.reviewSummary ran the review engine with hard-coded defaults and never loaded the workspace review config — the shipped, tested Phase-5 seams (loadReviewRules, ReviewSettings helpers) had zero live callers. Thread both into the live IDE review path: - Project `.event4u-agent/review-rules.md` now feeds the Stage-1 prompt via pipeline.rules (T-CR-501). - New review/settings-source.ts loadReviewSettings() reads `.agent-settings.yml :: review` (fail-open to schema defaults, no AgentSettingsSchema coupling). Its values drive runReview's vote options (voteOptionsFromSettings) and the severity floor (applySeverityFloor), applied to issues + potentialIssues BEFORE summarizeReview so all counts stay consistent (T-CR-502). Both readers are optional injected GitHandlerDeps (default to the real file readers) so the handler stays pure and unit-testable. The severity floor never hides a security finding (security_always_error exemption), regression-tested. Pure-core, additive: no protocol/DTO/codegen change. Council (gemini + codex, 2026-06-02): Q0/Q2/Q3/Q4 unanimous; Q1 (settings source) synthesised. ADR-051. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Record the decision for threading the dead Phase-5 review config/rules seam into the live reviewSummary path: the Q0/Q2/Q3/Q4-unanimous council answers, the Q1 settings-source synthesis (review-owned fail-open reader injected as a dep, no AgentSettingsSchema extension), and the security-exemption trap both members flagged. Add the index row and update the T-CR-501/502 done-comments to cite the live wiring (no checkbox flip — both were already [x]). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Wires the shipped-but-dead road-to-code-review Phase-5 seams into the live IDE
review path.
GitHandler.reviewSummary(the entry point an IDE "Review changes"action calls) ran the review engine with hard-coded defaults and never read the
workspace review config —
loadReviewRulesand theReviewSettingshelpers(
resolveReviewSettings/voteOptionsFromSettings/applySeverityFloor) werefully tested with zero live callers.
Changes
reviewSummaryloads.event4u-agent/review-rules.mdbest-effort and passes it as
pipeline.rules, so a project's review rulesreach the Stage-1 system prompt.
review/settings-source.ts::loadReviewSettingsreads
.agent-settings.yml :: review(fail-open to schema defaults; doesnot extend
AgentSettingsSchema→ noconfig → reviewcoupling). Itsvalues drive
runReview'svoteoptions and the severity floor, applied toissues+potentialIssuesbeforesummarizeReviewso the counts, topfindings, and potential tally stay consistent.
GitHandlerDeps(default to the real filereaders) — the handler stays pure and unit-testable.
Safety
The severity floor never hides a
securityfinding (security_always_errorexemption) — the trap both council members flagged. A regression test asserts a
low-severity security finding survives a
highfloor while a low-severity bugis dropped. Unconfigured workspaces are unchanged (no rules block; default
settings = groupSize 5, floor
info).AI Council (gemini-cli 0.41.2 + codex-cli 0.134.0, 2026-06-02)
loadReviewRules?/loadReviewSettings?readers into
GitHandlerDeps.codex chose review-owned-no-coupling. Resolution: the default reader lives in
review/settings-source.ts(review-owned, no schema coupling) and isinjected as a dep (handler stays pure). See ADR-051.
Verification
task ciexit 0 — lint, format (incl. markdown), build, typecheck, test(core 1141 pass / 1 skip; +11 new tests).
matrix jobs unaffected.
[x]; this lands the livewiring their cores were built for. Done-comments updated to cite it.
ADR-051.