Repository navigation
ci: report why Bob Shell stopped, keep valid findings, and fix triage text - #4799
Merged
Merged
Conversation
… text An audit of 44 AI triage runs and 26 AI reviews after #4730 found these problems: - 7 of 26 reviews were lost. When Bob Shell reaches its turn or cost limit, it writes an error event before the result. extract parsed the output as one JSON document and failed with "Extra data". One finding with a path outside the PR also discarded the whole review. - The triage escaped the backticks of code spans, so every code name in a triage comment showed as literal backticks. - ai:review-* labels of an older commit stayed after a manual run or /ai triage, because only a push resets the labels. - The triage rated a closed PR and a 2-line overlap as duplicates, raised CI concerns from guesses, and wrote internal names ("risk.forced") into the comment. The review rated small defects as blockers, split one root cause into three blockers, asked the human to verify points the code already settles, and wrote relative links that break on GitHub. Changes: - read_bob_output reads the event lines and reports why Bob Shell stopped. extract_answer takes the last top-level object with the answer keys, so a draft object or text after the answer does not break the parse, and a nested object of a broken answer is not read as an empty answer. - A finding with a bad path, line, or severity is dropped with a warning. The other findings stay. - The triage renders model text with markdown_inline, which keeps code spans and escapes the rest. A pipe in a code span in a table cell is escaped, so the cell does not split. - The triage publish step removes ai:review-* labels when the last AI review is not of the head commit. - The prompts define duplicate and blocker more strictly, ask for evidence instead of hand-offs to the reviewer, give the review a turn budget, and ask for file references as code. Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Contributor
|
✅ DCO Check Passed Thanks @dolfim-ibm, all your commits are properly signed off. 🎉 |
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/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cau-git
approved these changes
Oct 13, 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.
An audit of the AI triage and review runs after #4730 (44 runs, 34 triage comments, 26 reviews with 16 inline findings, each checked against the code) found these problems:
extractparsed the output as one JSON document and failed withExtra data: line 2 column 1 (char 129)(fix(pptx): move footer placeholders to the furniture layer #4746, feat(pptx,odf): keep slide video and audio and record their media file #4752 twice, fix(pptx): keep a hyperlink attached to a whole shape #4787, feat: add LightOnOCR-3 presets and grounded output parsing #4789). fix(reading-order): merge section headers that wrap across lines #4751 failed on text after the answer. On fix: flatten transparent pictures onto white before enrichment models #4776, one finding with a path outside the PR discarded the whole review.ai:review-*labels. Only a push resets the labels, so a manual run or/ai triageleft labels of an older commit (fix(odf): keep ODS pictures anchored to the sheet #4678, feat(ocr): detect page orientation for RapidOCR #4709, fix: fix encoding bugs in format detection (UTF-8 -> latin-1 fallback) #4726).blockerfor an off-by-one in a cap (feat(xbrl): support XBRL ZIP and iXBRL input formats #4689) and an intended behavior (feat(ASR): add transformers and MLX presets for the ASR pipelines #4771), split one root cause into three blockers (feat(ocr): add font sanity heuristics and corrupt text OCR routing #4643), asked the reviewer to verify points the code or tests already settle, and wrote relative links that break on GitHub (feat(ocr): add font sanity heuristics and corrupt text OCR routing #4643).Changes:
read_bob_outputreads the event lines and reports why Bob Shell stopped (::warning::Bob Shell stopped early: ...). When a limit stops the task, the last message is usually a tool result, so the review is still lost, but the warning says why instead of "Extra data".extract_answertakes the last top-level object that has the answer keys: a draft object or text after the answer no longer breaks the parse, and a nested object of a broken answer is not read as an empty review.ai_pr_review.pytoai_pr_triage.py. The triage renders model text withmarkdown_inline: code spans stay, the rest is escaped. A pipe in a code span in a table cell is escaped, so the cell does not split.ai:review-*labels when the last AI review is not of the head commit. A review of the head in the same run sets its label again after this.duplicate, concerns based on a diff line, no internal names or input problems in the answer;blocker, one root cause per finding, settle checks instead of handing them to the reviewer, a turn budget, and file references as code..github/CI_LABELS.mddocuments the duplicate rule and the review-label reset.Checklist:
Review evidence:
<code>, the cell stays one cell, and the link, fence, and mention stay literal text.pytest tests/test_ai_pr_event.py tests/test_ai_pr_triage.py tests/test_ai_pr_review.py: 38 passed.ruff,ty check .github/scripts,make validate: passed.