Drop never-emitted comment key spellings from review parsing - #806
Open
Wenjie Fan (gggdttt) wants to merge 1 commit into
Open
Drop never-emitted comment key spellings from review parsing#806Wenjie Fan (gggdttt) wants to merge 1 commit into
Wenjie Fan (gggdttt) wants to merge 1 commit into
Conversation
_normalize_comment accepted path/lineEnd/endLine/comment alongside the spellings that producers actually emit. None of the four has a producer: the pr_review agent emits file/line_start/line_end/body, the BCApps review instructions ask for filePath/lineNumber/issue, and BCQuality reports name the line field line. Across 488 findings in recorded agent outputs the four appear zero times, and they were introduced speculatively in the original code-review commit rather than in response to a parse failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 045bef88-d7d4-4553-a681-d7d73cdb2285
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
_normalize_commentinevaluate/review_parsing.pyaccepted four key spellings that no producer emits:pathfile(pr_review agent),filePath(BCApps review instructions)lineEnd,endLineline_end(pr_review agent)commentbody(pr_review agent),issue(BCApps review instructions)parse_review_output's bare-single-object check dropspathfor the same reason.Why
The parser has exactly three known producers, and each was checked:
agent/copilot/pr_review/review_output.py) emitsfile/line_start/line_end/body.agent/shared/instructions/microsoft-BCApps/instructions/*.md) ask forfilePath/lineNumber/issue.line, so that spelling is kept for a flattened report. Itspathkey belongs toreferences[], not to a finding's location, so it is not a file-key producer.Across 488 finding objects in recorded agent outputs on disk,
path,lineEnd,endLineandcommentoccur zero times.git log -Sshows all four arrived in the original "Introducing Code Review category" commit, so they were speculative from the start rather than a fix for an observed parse failure. No test pinned them.Severity aliases were audited in the same pass and deliberately left alone —
blocker/major/minor/infocome from BCQuality's report schema anderror/warning/suggestionare parsed out of real reviewer-bot comment headers incollection/collect_codereview.py.Validation
ruff format/ruff checkclean;ty checkshows only the pre-existingredteam.pydiagnostic.pytest738 passed, 2 skipped.lineand bare-single-object payloads all still parse to one comment each.test_codereview.pycoversfilePath/lineNumber/issue).