Repository navigation
feat(review): local reviews read a draft PR description; release 1.9.0 - #23
Merged
Merged
Conversation
A local review run before the PR exists told the judge the PR had no description and no test files, so it missed findings the PR review caught. review_start with path now takes title and description, or descriptionFile (an absolute path to a markdown file). The draft is the PR description for the judge and the JIRA lookup; an open PR's own description still wins. review_get reports descriptionSource (pr, draft or none). The branch's test files are passed to the judge, and the last 5 local results per branch are kept under history/ beside the latest.
A PR whose body is an empty string won over the caller's draft, and an empty descriptionFile was reported as descriptionSource draft.
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.
Why
A local review (
review_startwithpath) that runs before the PR exists has no PR description: the judge is toldPR description: (no description), and the PR's test list is[]. On foxcorp/fox-player-roku#1199 the pre-PR local review of 9a3fff38 reported only the ticket-scope finding. The PR review of the same commit, which had the description, also found a log-ordering bug in the new runner script and stale comments inrce-lease.js, and raised a needs-device item. Each of those traced back to a claim in the PR description.What changed
review_startpath mode takestitleanddescription, ordescriptionFile(an absolute path to a markdown file). The draft is used as the PR description and searched for the JIRA key. An open PR's own description still wins. A relative path, an unreadable file, or bothdescriptionanddescriptionFileare rejected before the review starts.review_getreportsdescriptionSource(pr,draftornone), also stored in the result'scontext.TEST_FILE) to the judge instead of an empty list.local/<project>/history/<repo>__<branch>/. The latest-result file is written exactly as before. A failed history write logs a warning and does not fail the review.How to test
npm run typecheck,npm test,npm run ci:app-check.verify-review-mcphas new cases forreadDraft,reviewDescriptionandolderLocalResults.review_start({ path, base, descriptionFile })on a branch with no PR, then check thatreview_getshowsdescriptionSource: "draft"and that a JIRA key in the draft is picked up.Not verified
executeLocaland the bridge wiring are covered only by typecheck; no harness runs them.TEST_FILEmatches BrightScript specs only, so on a TypeScript repo the test list stays empty.