Repository navigation
ci: add an advisory AI first review with inline comments - #4640
Merged
Merged
Conversation
Contributor
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dolfim-ibm
force-pushed
the
ci/ai-pr-review
branch
from
October 7, 2026 12:01
3ed8598 to
b01b194
Compare
Extend the AI PR Triage workflow with a first review by Bob Shell in a read-only review mode. The review follows the repository review skill, but it does not run tests or PR code. - prepare-review (read-only token): stores the PR versions of changed source files under names that no tool loads as configuration, the valid comment anchors, and, after an earlier AI review, the diff since that review. - review (no GitHub write access): skips duplicates and large PRs, runs Bob Shell, and validates the answer against the changed files. - publish-review (no LLM): posts one COMMENT review (never approve or request changes), moves findings outside the diff lines into the review body, and sets ai:review-lgtm or ai:review-changes. Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
dolfim-ibm
force-pushed
the
ci/ai-pr-review
branch
from
October 7, 2026 12:06
b01b194 to
254fed8
Compare
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
dolfim-ibm
marked this pull request as ready for review
October 7, 2026 12:23
PeterStaar-IBM
previously approved these changes
Oct 7, 2026
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> # Conflicts: # .github/CI_LABELS.md
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
cau-git
approved these changes
Oct 7, 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.
Stacked on #4639. Review that PR first. After it merges, the base of this PR changes to
main.This PR extends the
AI PR Triageworkflow with a first review by Bob Shell. The trust model of #4639 stays the same: no PR code is checked out or run, the model job has no write token, and a separate job without an LLM validates and posts the result.What it does
prepare-review(read-only token, in thepreparejob):.txtsuffix, so a PR'sAGENTS.mdor.bob/custom_modes.yamlis never loaded as agent configuration.review(contents: read): it skips PRs that the triage rated asduplicate. It runs Bob Shell in the read-onlydocling-pr-reviewmode with the repository review skill. The model reviews the code but does not claim test results. The answer is valid only if every finding names a changed file, a line, and a known severity.publish-review(write token, no LLM): posts oneCOMMENTreview. It never approves and never requests changes. Findings outside the diff lines go into the review body. It setsai:review-lgtm(noblockerormajorfinding) orai:review-changes.Setup
BOB_REVIEW_MAX_COST(default3). A run that reaches the limit stops and posts no review. The check stays green.Checklist:
.github/CI_LABELS.md)Review evidence:
uv run pytest tests/test_ai_pr_review.py tests/test_ai_pr_triage.py tests/test_groundtruth_diff.py: 21 passed.make validate: passed.prepare-reviewlocally against fix(docx): ignore XML comments and processing instructions #4627. It wrote 2 head files, 215 anchors, andincremental_base: null.status: successin 123 s, with 26 tool calls and a cost of 1.56. It wrote no files.extractaccepted the answer.ai:review-changes, with aCOMMENTevent. All 4 findings were on valid diff lines and became inline comments.majorfinding is correct:bytes.replacein the test helper can do nothing, so the test can pass without injecting a comment. Thenitfinding is correct: one guard is redundant. The 2minorfindings are reasonable.main, because it usespull_request_target.