Repository navigation
feat(kix): flag a missing review in the inbox before the merge click - #436
Merged
Merged
Conversation
Quest-Claim: 4e9c19adbb9d3e07
Each project read now takes every open PR's body, author association, writers' latest reviews, and the head commit's parents and the App's `quest review` check in the one batched GraphQL request that already classified drafts. It keeps only the land gate's reason, which the inbox shows beside Merge this PR. The click's live check stays the authority. The App's own `quest review` check run now asks for a read of the PRs it names, so a runner's review clears the flag without a refresh. Finishes quest/m1/kix/review-flag.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 3, 2026 04:09
|
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 37 minutes. 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. CodeRabbit Verify
|
# Conflicts: # cloudflare/src/github/service.ts
# Conflicts: # cloudflare/src/github/service.ts # cloudflare/src/github/webhook.ts
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.
Implements and finishes quest/m1/kix/review-flag.md, a follow-up from moq-dev/quest#351. It deletes the quest and its link.
Summary
Since moq-dev/quest#351, the inbox's Merge this PR refuses an unreviewed head, but only after the click. Now each PR item whose merge is offered shows, beside the button, the reason the land gate would give. The click's live check (
unreviewed) stays the authority.Where the data comes from. Each project read already sent one batched GraphQL request for open drafts' bodies. It now covers every open PR, and adds:
writersOnly, the same field the gate reads);quest reviewcheck runs on the head.The read keeps only the computed reason (
Pull.unreviewed), never the body. Metadata and history pages still never request bodies.Shared rules (
cloudflare/src/github/review.ts): the gate's approval filter, its## Reviewrecord parser, and its refusal wording move into helpers. The gate and the newobservedGapboth use them, so the inbox's reason is the gate's text.What
observedGapcounts: what the gate counts on the head itself.quest reviewcheck run by the App.OWNER,MEMBER, orCOLLABORATOR) rules out write access, or someone else last edited the body.Staying current (
cloudflare/src/github/webhook.ts): CI'scheck_runevents still cost no read. Acheck_runfrom this App namedquest reviewmarks the PRs its payload lists, on this repository, for a reread by number. So a runner's review (moq-dev/quest#417) clears the flag without a refresh. Reviews and body edits already trigger reads throughpull_request*events.The fake GitHub (
cloudflare/dev/github.ts) models the batch's new fields: the association, the App's check, and the parent count. Its routing for the gate's query, and the two test mocks' routing, now match the gate's query exactly. Before, they matched any query containinglatestOpinionatedReviews(, which the batch now also contains.cloudflare/GITHUB.mddocuments the flag, its limits, and the check-run read.Choices made without asking
Review:meta line still shows GitHub'sreviewDecision.authorAssociation. The gate's REST permission read is per author, so it would cost subrequests.authorAssociationcan only rule write access out. When it leaves write access possible, the inbox doesn't flag, and the click confirms.checkSuites(filterBy:{appId}), thencheckRuns(filterBy:{checkName:"quest review",checkType:LATEST}). On suites,checkNamefilters by the suite's name, not a run's. I checked this against GitHub's real API on this repository, and the real API accepted the whole batch query.pull_requests[].base.repo.id), so a fork's PR listed in the payload is not marked.Limitations
quest reviewchecks or records on commits before a merge head. A merge head's reason says that a review may still carry.unreviewedto every open PR's stored row. Its data changes once, so each open PR item shows unread once, and a skipped one comes back once.Validation
cloudflare/test/review.test.ts:observedGapcases.cloudflare/test/projects.test.ts:quest reviewcheck run, on this repository's PR, triggers a reread. CI, another App'squest review, and another repository's PR don't.cloudflare/test/inbox.test.ts: the reason renders escaped, before Merge this PR, and the click still refuses.just checkandjust testpass locally on a4551a3: 995 CLI tests (2 skipped), and 517 Worker tests.Suggested follow-ups
None worth a quest.
Review
gpt-6.1-sol, medium effort,quest review --base origin/main, session01a1a276.origin/mainat 4c259ba, resolving import conflicts incloudflare/src/github/service.tsandcloudflare/src/github/webhook.tsby keeping both sides: this PR'sOBSERVED/Observed/observedGap/REVIEW_CHECKimports beside main's./setupandadmittedimports): no findings. The PR's added and removed lines are identical to e748416's; only context changed. Main has since gained 66ab4fb and 4c728f1, which merge without conflict.01a1a255, round 1 on head e748416: no findings; session01a19f96, round 1 on head 12f9b2e: no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code