You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Review rules: detail (score, short or full) in .kai-review.yaml - #220
This lets a repository set the review detail level from kaicontext/kai-server#527 in .kai-review.yaml:
detail: short # score | short | full
rcParseRules accepts detail. The value is case-insensitive, and anything else is an error naming the three levels. Like any other broken file, an error means the review runs without the rules file.
The finding bundle carries it as "detail", and leaves it out when the file doesn't set one. kai-server reads it in a companion PR and prefers it to the Atlas setting.
The review log line now includes detail <level>.
Rollout: this needs a CLI release and a kai-ci pin before a repo's detail: line takes effect. Until then, current CLIs reject the unknown key and review without the rules file, so repos shouldn't add the line before the release.
Tests:TestParseRulesDetail covers parsing, lowercasing, rejecting bad values, unset values and the log line. The rules and review-commit tests pass, and go vet is clean.
Written by Kai from the change itself. Kai only edits this section; everything above it is the author's.
This adds a detail key to .kai-review.yaml that lets a repository choose how much of the review kai-server posts on the pull request (score, short, or full), carrying the choice in the finding bundle for kai-server to read.
Changes
review_commit_reporules.go: adds the detail field to rcRepoRules, the rcReviewDetails list of valid levels (score, short, full), and rcActiveDetail() returning the active rules' detail or ""; rcParseRules reads detail from the YAML, lowercases and trims it, and rejects anything not in the list with an error naming the three levels; rcDescribeRules appends detail <level> to the review log line when set.
review_commit.go: the finding bundle struct gains a Detail string field with json:"detail,omitempty", populated from rcActiveDetail(); it is omitted from the bundle when no detail is set.
review_commit_reporules_test.go: adds TestParseRulesDetail covering case-insensitive parsing and lowercasing, the log line, rejection of bad values, and unset detail.
Testing
TestParseRulesDetail verifies that detail: Short lowercases to short, the log line contains detail short, an invalid value produces an error naming score, short, full, and a file without detail leaves the field unset.
A repository can set how much of Kai's review kai-server posts on the
pull request in the same versioned file as its other review rules:
detail: short # score | short | full
The value is checked like the rest of the file (an unknown level is an
error naming the three) and rides the finding bundle as "detail";
kai-server prefers it to the repository's Atlas setting. The review log
line names it. Omitted from the bundle when the file sets none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Kai review · Your call, then merge (9/10)
Nothing I'd call a defect, but 1 decision to say yes to.
Next: say yes or no to 1 decision below, then merge when you're happy.
Findings
· correct as written, but someone should say yes
[contract] The finding bundle now emits a new "detail" JSON field that kai-server (a sibling repo) reads in a companion PR and prefers to the repository's Atlas setting; this repo is the producer side of that contract. Affects any repository that sets detail: in .kai-review.yaml — it changes how much of Kai's review is posted on its pull requests. The author notes the rollout gate (CLI release + kai-ci pin) before the field takes effect.
No proposed defect was confirmed by this check within the reviewed scope.
Decisions (need your call)
[contract] The finding bundle now emits a new "detail" JSON field that kai-server (a sibling repo) reads in a companion PR and prefers to the repository's Atlas setting; this repo is the producer side of that contract. Affects any repository that sets detail: in .kai-review.yaml — it changes how much of Kai's review is posted on its pull requests. The author notes the rollout gate (CLI release + kai-ci pin) before the field takes effect.
Size S · Risk M · +58 −1 · 3 files · reaches 62 · the full analysis · Reply to any of my comments and I'll answer, or say @kaicontext anywhere on this PR — a question, or "take another look at the retry logic".
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
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.
This lets a repository set the review detail level from kaicontext/kai-server#527 in
.kai-review.yaml:rcParseRulesacceptsdetail. The value is case-insensitive, and anything else is an error naming the three levels. Like any other broken file, an error means the review runs without the rules file."detail", and leaves it out when the file doesn't set one. kai-server reads it in a companion PR and prefers it to the Atlas setting.detail <level>.Rollout: this needs a CLI release and a kai-ci pin before a repo's
detail:line takes effect. Until then, current CLIs reject the unknown key and review without the rules file, so repos shouldn't add the line before the release.Tests:
TestParseRulesDetailcovers parsing, lowercasing, rejecting bad values, unset values and the log line. The rules and review-commit tests pass, andgo vetis clean.🤖 Generated with Claude Code
Kai context
Written by Kai from the change itself. Kai only edits this section; everything above it is the author's.
This adds a
detailkey to.kai-review.yamlthat lets a repository choose how much of the review kai-server posts on the pull request (score, short, or full), carrying the choice in the finding bundle for kai-server to read.Changes
review_commit_reporules.go: adds thedetailfield torcRepoRules, thercReviewDetailslist of valid levels (score,short,full), andrcActiveDetail()returning the active rules' detail or"";rcParseRulesreadsdetailfrom the YAML, lowercases and trims it, and rejects anything not in the list with an error naming the three levels;rcDescribeRulesappendsdetail <level>to the review log line when set.review_commit.go: the finding bundle struct gains aDetail stringfield withjson:"detail,omitempty", populated fromrcActiveDetail(); it is omitted from the bundle when no detail is set.review_commit_reporules_test.go: addsTestParseRulesDetailcovering case-insensitive parsing and lowercasing, the log line, rejection of bad values, and unset detail.Testing
TestParseRulesDetailverifies thatdetail: Shortlowercases toshort, the log line containsdetail short, an invalid value produces an error namingscore, short, full, and a file withoutdetailleaves the field unset.