Improve bot finding extraction#47
Open
gauravp-cubic wants to merge 2 commits into
Open
Conversation
gauravp-cubic
force-pushed
the
codex/justice-change
branch
from
July 10, 2026 09:25
e8c5936 to
2380182
Compare
gauravp-cubic
marked this pull request as ready for review
July 10, 2026 09:25
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
This PR tightens the bot-comment extraction step so it extracts concrete code-review findings, not only comments phrased as explicit imperative suggestions.
The change is intentionally limited to extraction input/prompting:
REVIEW_BODY,INLINE_REVIEW_COMMENT, orISSUE_COMMENT.<!-- ... -->, collapsed<details>,<sub>metadata, and generated footers).Why
The current extractor is framed around "actionable suggestions." In real review comments, a reviewer may clearly flag a defect or risk without writing it as "change X to Y." Those comments should still count as findings: if the later PR changes address the flagged issue, the benchmark should be able to match that review finding to the fix.
This is a measurement-correctness issue rather than a reviewer-specific rule. It affects comment styles differently: reviewers whose comments already look like explicit suggestions are easier for the current prompt to extract, while issue-first or risk-first comments can be under-extracted.
Each part of this extraction shape supports that same measurement goal:
COMMENT C1,COMMENT C2, ... boundaries make it easier for the model to scan every review round and reduce accidental skipping when a PR has many comments.INLINE_REVIEW_COMMENT,REVIEW_BODY, andISSUE_COMMENTgive neutral structure that reflects GitHub source data. Inline review comments are especially likely to contain code-review findings, while review bodies and issue comments can contain summaries or additional findings.configuration used, rather than broad common words. That keeps known generated footer cleanup while preserving real findings that mention something being configured incorrectly.Local Evidence
The table below lists concrete examples from a local paired run for
2026-06-29 <= bot_reviewed_at < 2026-07-06. In each case, the revised extraction shape included a substantive review finding that the production extraction left out.Together, these examples show the intended measurement improvement: the extractor more reliably reads substantive issue-first comments across inline comments and later review rounds.
What This Does Not Change
Validation
uv run pytest tests/test_analyze_formatting.pyuv run python -m compileall llm/prompts.py llm/schemas.py pipeline/analyze.py tests/test_analyze_formatting.py