Skip to content

feat: validate reviewer repository permissions - #453

Draft
huang47 wants to merge 1 commit into
codex/readiness-approval-incompletefrom
codex/readiness-reviewer-permissions
Draft

huang47 wants to merge 1 commit into
codex/readiness-approval-incompletefrom
codex/readiness-reviewer-permissions

Conversation

@huang47

@huang47 huang47 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

A review only counts as an approval when the person can approve for that repository. The shadow report checks current access for each current human approval and waits when it cannot determine access.

Summary

Read repository base permissions for current human, non-author approvals. Count write, maintain or admin access; exclude lower access. Missing, malformed or unavailable responses leave approval evidence incomplete, while observed change requests still block. Limit lookups and stop after an error.

Verification

64 readiness tests cover real collector and evaluator integration, lower and missing permissions, mismatched identity, stale reviews, bounded reads and preserved blockers. Removing the access check in a disposable copy made the lower-access regression fail. A read-only current PR with a current human approval exercised the real permission endpoint and returned WAITING for other missing evidence. Repository lint checks passed. Current-head CI passed, with CodeRabbit skipped. The shadow workflow run produced a WAITING report for this draft; no human approval was present, so it did not call the permission endpoint.

Limits

This verifies repository base permission, not code-owner requirements or the complete ruleset. It does not prove a tested revision or authorize merging. Reads are non-atomic; the reusable workflow token's access to this endpoint is not yet established with a real approved PR. No pilot or policy change is included.

Stack

Stack order: 8/9. Parent: #452 — fix: keep unverified approvals incomplete. Followed by #454, which keeps User approvals incomplete until human identity is established. Allowed effects: read GitHub permissions and retain the shadow report. Revert this commit to return to the parent behavior.

Provenance

  • Authored by: interactive session.
  • Verified: readiness tests, fault injection, a read-only live lookup and repository lints passed.
  • Deviations: code-owner rules and tested-revision proof remain unverified.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant