Repository navigation
fix(review): record on a contributor's fork PR from a maintainer's checkout - #784
Conversation
Quest-Claim: 3fd337f7fe52354d
…eckout quest review now takes the open PR from the reviewed branch into the base from any head repository, preferring the push repository's, and skips naming every candidate when several forks match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
ℹ️ No critical issues — one trust edge in the fallback worth a look.
Approach: sound. It fixes the cause, the lookup filtering on the push repository's owner, in the one function (openPull) that both pullModels and recordRounds share. Size reading and record writing therefore stay consistent.
Reviewed changes: the whole PR.
openPullfallback: prefers the push repository's PR, else uses the only open PR from the branch into the base from any repository, else skips and lists the candidates.- Skip messages:
no open PR from <branch> into <base>drops the owner, and a newseveral open PRs …message lists the competing URLs. - Docs:
quest review --helpand the README describe the new lookup. - Tests: a new stub-forge test covers three cases: a lone fork PR, ambiguous forks, and the push repository's own PR winning.
FakePullgains an optionalhead.
claude-opus-5-5 | 𝕏
… head A lone fork PR from a branch of the same name no longer sets the round's size or receives its record unless the checkout holds that PR's pushed head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found. The new commit resolves the earlier stranger-PR concern.
Reviewed changes: this review covers c4139dc, which narrows the fork-PR fallback.
- Ancestry filter in
openPull: another repository's PR is used only when the checkout'sHEADcontains its pushed head (contains→git merge-base --is-ancestor). A head that is missing locally counts as no match. Exactly one such PR must exist. The push repository's own PR still wins. - Head SHA on
OpenPull:OpenPullhas an optionalsha, which is validated withmaybe(sha)and filled fromhead.shainopenPullRequests. If a server omits it, fork PRs are skipped as before. - Skip messages: a new
no open PR … from <owner> or with a head this checkout holdsmessage covers unheld candidates. Theseveral open PRsmessage now lists only the held candidates. - Docs and test: the README and
--helpdescribe the held-head rule. The test now checks that a stranger's same-named PR is skipped, that its size is never read, and that its body stays untouched.
claude-opus-5-5 | 𝕏
…record # Conflicts: # src/cli/review-record.ts
There was a problem hiding this comment.
✅ No new issues found. The new push only merges
main, and the earlier stranger-PR concern stays fixed.
Reviewed changes: this review covers 1d6962d, which merges origin/main into the branch.
- Conflict resolution in
openPull: the candidate lookup now callsawait (await hosting.live()).pulls(repository). This matches #777's asynclive(). The fork-PR selection and the ancestry filter are unchanged.
claude-opus-5-5 | 𝕏

Finishes quest/m0/fork-review-record.md (deleted here).
quest reviewin a maintainer's checkout of a contributor's fork PR now finds that PR, reads its## Modelssize, and rewrites its## Reviewrecord, so nobody writes one by hand.Changes
openPull(src/cli/review-record.ts) takes the open PRs from the reviewed branch into the base from any head repository. The push repository's PR wins, so contributors reviewing in their own fork's clone (and same-repo PRs) behave as before. Otherwise it uses another repository's PR only when the checkout'sHEADcontains that PR's pushed head (git merge-base --is-ancestor; a head missing locally counts as no match), and only when exactly one such PR exists. A stranger's PR from a branch of the same name is skipped:record skipped: no open PR from <branch> into <base> from <owner> or with a head this checkout holds: <urls>. Several matching forks skip withrecord skipped: several open PRs from <branch> into <base> with heads this checkout holds, none from <owner>: <urls>.OpenPull(src/core/forge.ts) gains an optionalsha, the PR's head commit, which GitHub's open-PR listing fills in (src/github/claims.ts).record skipped: no open PR from <branch> into <base>.quest review --helpand the README describe the lookup.Choices made without asking
shais optional on the wire rather than required, so a Kixel Quest server that doesn't send it yet still parses. Without it, another repository's PR never matches and the round skips the record, as before this PR.Decisions
HEADcontains its pushed head, missing locally counting as no match (rejected: trust any lone fork PR; skip every fork PR). Why: a real checkout of a contributor's PR always descends from its last pushed head, while a stranger's same-named branch does not, so the stranger can neither set the round's size nor receive the record. The coordinator recommended this; the user has not been asked.Public API
record skipped:text changes as described above. No wire or flag changes.Validation
a maintainer's checkout records on a contributor's fork PR and reads its size(test/review.test.ts): a stranger's lone fork PR whose head the checkout lacks is skipped, itsSize: XSunread and its body untouched. Adding a contributor's PR whose head isHEAD~1writes the record there and reviews at size S (the shadow runs at low effort). A second fork's PR with a head the checkout holds makes it skip and name both. The push repository's own PR then wins.size XS.openPull: it fails withsize M defaultand no record, the same thing both iterates on moq-dev/quest#761 hit.just checkandjust testpass (1566 tests) on 1d6962d, after merging main (feat(github)!: read on an installation token from Kixel Quest #777's installation-token reads; the one conflict inopenPullkept this PR's fork-PR selection and took feat(github)!: read on an installation token from Kixel Quest #777's awaitedhosting.live()). Review round 3 on that head: 10/10, no findings./quest-reviewexercises the same-repository path live.Caused by
head=<push owner>:<branch>, which in a maintainer's checkout names the upstream, not the contributor's fork (found by person).Follow-ups
None.
Models
Review
Rewritten by
quest reviewafter each round.Head: 1d6962d
Base: origin/main at fd0a7fd
Risk: high,
The change alters exported PR data and how review records and model sizes are associated with fork PRs, potentially causing maintainers and downstream tools to trust or overwrite the wrong PR’s record; reverting cannot undo records already written or agent actions taken from them.Classified: high by Codex, gpt-6.1-sol, low effort, session
01a1f5aa-4958-7381-af48-7d8070e32fd6Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f2c6-8b72-7e13-9858-3903fbdf36ee, round 3Score: 10/10,
The incremental changes correctly await the updated live-forge API, with no new actionable defects found by inspection; builds and tests were not run as instructed.Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1f2c6-8b72-7511-8463-3f0264607c66Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0