Skip to content

feat(workflow): one review gate, three checkers — CodeRabbit, Codex, local attestation (PP-w6u1) - #2117

Open
timothyfroehlich wants to merge 4 commits into
mainfrom
claude/beads-linear-migration-r1490l
Open

feat(workflow): one review gate, three checkers — CodeRabbit, Codex, local attestation (PP-w6u1)#2117
timothyfroehlich wants to merge 4 commits into
mainfrom
claude/beads-linear-migration-r1490l

Conversation

@timothyfroehlich

@timothyfroehlich timothyfroehlich commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

Closes PP-w6u1.

Experiment result (commit 1, afd9e4f): CodeRabbit's approval lands as a real GitHub APPROVED review from coderabbitai[bot] pinned to the head SHA, and Tim confirmed it counts toward a required-approvals rule. The plan's budget is one included review per hour, so it is not replacing Codex — it is an extra review for large PRs, requested only when Tim says so.

The review gate, rewritten (commit 4, 44275b5). The first cut bolted CodeRabbit onto a twelve-state precedence machine that three scripts each mirrored in their own language. It is now one function with three independent checkers:

  • _review_summary <PR> in scripts/workflow/_pr-gates.sh fetches the PR's reviews and comments once and asks three questions — does CodeRabbit approve head, does Codex cover head (native approval, exact-head finding review, trusted clean comment, or reaction witness), does a local attestation pin head. Any yes passes Gate 3. Checkers never consult each other, so a CodeRabbit CHANGES_REQUESTED cannot mask a Codex approval and a stale marker cannot hide a current finding review.
  • The label is one of four words: approved / changes requested / stale review / not reviewed. The FAIL block prints one line per checker so you can see what each reviewer's newest evidence names.
  • pr-watch.py and pr-dashboard.py shell out to the bash gate instead of re-implementing it. Their Python state machines and the bot-login / state-vocabulary parity tests are deleted. The dashboard's Review column is the label, or ? when the gate could not answer.
  • merge-handoff.sh and request-codex-review.sh read the same JSON.

Two gate bugs surfaced by the rewrite, both fixed: a failed reviews/comments/threads fetch read as "no evidence" (the gh … | jq pipe hid the exit code; fetches now fail the summary), and a DISMISSED/PENDING Codex review on head reported as stale rather than none.

.coderabbit.yamlauto_review.enabled: false. Manual-only; auto-reviewing every draft promotion would spend the hourly budget on small PRs. Agents never request CodeRabbit on their own; the trigger is gh pr comment <PR> --body "@coderabbitai review" when Tim says so. Docs: AGENTS.md §5, REVIEW.md, scripts/workflow/AGENTS.md (checker table replaces the state table), pinpoint-pr-workflow Phase 3.

Also fixed (commit 2) — check_ci on a head with two CI Gate runs. Draft promotion re-runs the workflow on the same SHA; this PR carried two COMPLETED/SUCCESS entries and the unfiltered jq returned both, so the gate sat in WAIT forever. It now picks the authoritative run (live over cancelled, then newest), shared with merge-pr.sh's poller.

Test Plan

  • pnpm run check green; pnpm run check:python 588 passed.
  • test_pr_gates.py (integration-marked, 69), test_pr_dashboard.py (26, drives the real gate through a fake gh), test_pr_watch.py (85), test_merge_handoff.py, test_request_codex_review.py, test_merge_pr_automerge.py — all green, run together twice.
  • Live on this PR at 44275b5: gate, pr-watch --check-ready, merge-handoff.sh, and pr-dashboard.sh all agree — stale review, CodeRabbit newest evidence names afd9e4f.
  • CI Gate passes on the new head.
  • Fresh review of the new head (/code-review + mark-review.sh; Codex quota is out) — the CodeRabbit approval on afd9e4f is stale by design.

—Claude

🤖 Generated with Claude Code

Trial of CodeRabbit as a replacement for the Codex review gate, which is
weekly-quota-metered and currently blocking merges when exhausted.

Config points at REVIEW.md and docs/NON_NEGOTIABLES.md as canonical rather
than restating them (AGENTS.md §8), with the three rules REVIEW.md flags as
"each of these has shipped a real bug" inlined as a safety net.

request_changes_workflow is the substantive setting: CodeRabbit requests
changes while findings are open and approves once they are resolved and the
latest commit is reviewed. Its approval attests that automated review is
complete; it does not authorize merging, which stays Tim's call (PP-wi85).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FnQa5Wn2UDaDebFTCR4tX3
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pin-point Ready Ready Preview Sep 14, 2026 8:16pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8dab016f-bbc6-40a9-a943-698f1cfaf997

📥 Commits

Reviewing files that changed from the base of the PR and between afd9e4f and 44275b5.

📒 Files selected for processing (18)
  • .agents/skills/pinpoint-pr-workflow/SKILL.md
  • .coderabbit.yaml
  • AGENTS.md
  • REVIEW.md
  • scripts/tests/test_merge_handoff.py
  • scripts/tests/test_merge_pr_automerge.py
  • scripts/tests/test_pr_dashboard.py
  • scripts/tests/test_pr_gates.py
  • scripts/tests/test_pr_watch.py
  • scripts/tests/test_request_codex_review.py
  • scripts/workflow/AGENTS.md
  • scripts/workflow/_pr-gates.sh
  • scripts/workflow/merge-handoff.sh
  • scripts/workflow/merge-pr.sh
  • scripts/workflow/pr-dashboard.py
  • scripts/workflow/pr-watch.py
  • scripts/workflow/pr-watcher-mcp.test.ts
  • scripts/workflow/request-codex-review.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 09d8aace-8dfa-414a-b12c-6d62833baa1c

📥 Commits

Reviewing files that changed from the base of the PR and between 26c5c84 and afd9e4f.

📒 Files selected for processing (1)
  • .coderabbit.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds .coderabbit.yaml. It configures CodeRabbit review behavior, enables change requests for open findings, disables draft reviews, and adds path-specific instructions for server, client, permissions, database, and feature specification code.

Changes

CodeRabbit Review Configuration

Layer / File(s) Summary
Review policy and path rules
.coderabbit.yaml
The configuration sets the chill review profile, English output, direct technical tone, review status summaries, and request_changes_workflow. It disables draft reviews, scopes learnings to auto, and maps the CORE-* rules to repository paths.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to afd9e

The configuration retains repository-wide coverage for the cited safety rules, so no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and directly references the CodeRabbit workflow change. It also names related review checkers, although the pull request only adds .coderabbit.yaml and does not modify gates or…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/beads-linear-migration-r1490l

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.

❤️ Share

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

@timothyfroehlich timothyfroehlich added the Claude Pull requests implemented by Claude label Sep 14, 2026 — with Claude

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Triggering manually while this stays a draft — PinPoint promotes a PR out of draft only after current-head CI succeeds, and this PR exists to observe review behaviour, so a manual trigger is the cheaper path than changing the draft convention.


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

@timothyfroehlich Manual review requested for draft PR #2117.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

@timothyfroehlich: I will review pull request #2117.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@timothyfroehlich
timothyfroehlich marked this pull request as ready for review September 14, 2026 00:38
@timothyfroehlich

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@timothyfroehlich

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…te (PP-w6u1)

CodeRabbit is an extra, Tim-initiated review for large PRs. Its native
APPROVED review pinned to the exact head is now a third accepted record in
Gate 3, alongside Codex evidence and the manual attestation. Nothing else
CodeRabbit posts changes the Codex-derived state. pr-watch.py and
pr-dashboard.py apply the same rule so wait and dashboard verdicts match.

.coderabbit.yaml turns auto_review off: the plan's budget is one included
review per hour, so agents request it only when Tim says to
(gh pr comment <PR> --body "@coderabbitai review").

Also fixes check_ci for a head carrying two CI Gate runs (draft promotion
re-runs the workflow on the same SHA): the unfiltered jq returned two
objects, status read as "COMPLETED\nCOMPLETED", and the gate sat in WAIT
forever. It now picks the authoritative run the way merge-pr.sh's poller
and pr-watch.py already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@timothyfroehlich timothyfroehlich changed the title chore(workflow): add CodeRabbit review configuration feat(workflow): accept CodeRabbit exact-head approval in the merge gate (PP-w6u1) Sep 14, 2026
@timothyfroehlich
timothyfroehlich marked this pull request as draft September 14, 2026 01:34
@timothyfroehlich
timothyfroehlich marked this pull request as ready for review September 14, 2026 01:48
Review fixes from /code-review medium on 82d55a6:

- _compute_review_state read the three-field verdict with `read -r`, which
  collapses whitespace runs; a review whose commit_id GitHub returned as null
  has an empty sha field, so the reviewer login shifted into RS_REVIEW_SHA and
  the gate printed "Codex approved chatgpt". The verdict is now TSV and split
  with cut. Regression test with a null commit_id.
- CI Gate authoritative-run jq is one shared CI_GATE_SELECT_JQ used by
  check_ci and merge-pr.sh's re-poll; the comment no longer claims pr-watch.py
  ranks the same way (it does not).
- scripts/workflow/AGENTS.md: three remaining "Codex only" rows updated.
- .coderabbit.yaml header says what the path instructions actually restate.
- Tests for a CodeRabbit non-approval with no Codex record (bash + pr-watch).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…w6u1)

Replace the twelve-state review machine with `_review_summary`: one fetch
of the PR's reviews and comments, run through three independent checkers
(CodeRabbit approval, Codex evidence, local attestation), any of which
covers head. The label is one of approved / changes requested / stale
review / not reviewed.

pr-watch.py and pr-dashboard.py now shell out to the bash gate instead of
mirroring it; their Python state machines and parity tests are gone.
merge-handoff.sh and request-codex-review.sh read the same summary.

Gate fixes surfaced by the rewrite:
- a failed reviews/comments/threads fetch fails the summary instead of
  reading as "no evidence" (`|| return 1`, `pipefail` in the shell-outs)
- a DISMISSED/PENDING Codex review on head is "none", not "stale"

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@timothyfroehlich timothyfroehlich changed the title feat(workflow): accept CodeRabbit exact-head approval in the merge gate (PP-w6u1) feat(workflow): one review gate, three checkers — CodeRabbit, Codex, local attestation (PP-w6u1) Sep 14, 2026
@timothyfroehlich
timothyfroehlich marked this pull request as ready for review September 14, 2026 20:22
@timothyfroehlich

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@timothyfroehlich

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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

Labels

Claude Pull requests implemented by Claude

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants