Skip to content

chore(tooling): port QuestDB's latest review-pr rules to this repo - #223

Open
mtopolnik wants to merge 1 commit into
mainfrom
mt_agents-update
Open

mtopolnik wants to merge 1 commit into
mainfrom
mt_agents-update

Conversation

@mtopolnik

@mtopolnik mtopolnik commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Brings the review-pr, approve-pr and reject-pr skills (Claude, Codex and pi) in line with questdb/questdb#7917, adapted to a client library, and corrects what the skills say about this repository.

What changes for reviews

  • Coverage is measured with cargo llvm-cov in a scratch worktree instead of guessed from searches; code that never ran is graded by what it could break.
  • Findings from earlier reviews (PR comments, inline review comments, --prior files) are re-run at the reviewed revision and the merge base.
  • A PR number plus --range reviews a PR's local, possibly unpushed commits; --body checks a draft body.
  • Crashes and hangs that only hostile input triggers (a forged server response, a crafted store-and-forward file) become issue drafts instead of blocking findings. Drafts marked Private: yes are filed only in questdb/questdb-enterprise, and approve-pr/reject-pr leave them out of the posted review.
  • Stated slowdowns are re-measured, and Step 2 checks titles and bodies for what users see.
  • Base comparisons run at the merge base ($MERGE_BASE), not the tip of main.

Safety of the review process

  • approve-pr/reject-pr refuse a review whose base does not cover the whole PR, such as a range starting at the last reviewed commit.
  • Agents never change the shared head and base worktrees; probe tests and reverts run in per-step probe worktrees, each with its own Cargo target directory.
  • New .pi/agents/review-prober.md lets pi agents run the probes the evidence rules require.

Repository facts corrected

  • CI: which jobs run against a live server (all build QuestDB master, not the pinned submodule), the non-blocking Enterprise e2e, and pipelines that never run on PRs.
  • No tokio: the background threads are the QWP/WebSocket I/O thread, orphan drainers, event dispatchers and the pool reaper.
  • New checklists: QWP server-rejection policy and poison-frame escalation, and QuestDb pool startup modes.
  • corrosion/ is vendored, not a submodule; py-questdb-client's Cython declarations are searched as a downstream user of the C API.

Known gaps, left for a follow-up

  • questdb-rs/Cargo.lock is not committed, so head, base and probe worktrees may resolve different dependency versions.
  • In working-tree mode, $REV is not recorded, so a later probe worktree can capture a different snapshot.
  • The pi timeoutMs parameter is taken from #7917 and not verified against the pi subagent extension in use.

No Rust crates changed, so cargo fmt and cargo clippy do not apply. git diff --check is clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Review Workflow
    • Approval and rejection checks now verify that the review covers the PR’s full change range before posting. If the reviewed range does not match the current PR, or cannot be verified, the review is stopped.
    • Drafts marked private are omitted from posted review bodies; the remaining report is preserved.
  • New Features
    • Added a read-only review-probing agent that reports evidence from authorized checks and marks unchecked items as unknown.

Port the review-pr changes from questdb/questdb#7917 to the Claude,
Codex and pi skills. Reviews now measure Rust coverage with cargo
llvm-cov, re-test findings from earlier reviews, and send crashes that
only hostile input triggers to private issue drafts, which approve-pr
and reject-pr leave out of the posted review. Builds and probes run in
scratch worktrees with separate Cargo target directories, so parallel
agents cannot disturb each other. approve-pr and reject-pr refuse a
review whose range covers only part of the PR. A new pi agent,
review-prober, can run the probes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7b381363-3771-499d-aab0-6856fb6600b0
📥 Commits

Reviewing files that changed from the base of the PR and between 14fba05 and 8c82945.

📒 Files selected for processing: 10
  • .claude/skills/approve-pr/SKILL.md
  • .claude/skills/reject-pr/SKILL.md
  • .claude/skills/review-pr/SKILL.md
  • .codex/skills/approve-pr/SKILL.md
  • .codex/skills/reject-pr/SKILL.md
  • .codex/skills/review-pr/SKILL.md
  • .pi/agents/review-prober.md
  • .pi/skills/approve-pr/SKILL.md
  • .pi/skills/reject-pr/SKILL.md
  • .pi/skills/review-pr/SKILL.md

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

📝 Walkthrough

Approval and rejection instructions now omit private adjacent drafts, validate the report’s base OID, and check whole-PR coverage before posting. A read-only review-prober agent configuration is also added.

Changes: Review posting safeguards

Layer / File(s) Summary
Report identity and draft filtering
.claude/skills/*/SKILL.md, .codex/skills/*/SKILL.md, .pi/skills/*/SKILL.md
Approval and rejection instructions exclude drafts marked Private: yes. They extract and validate the report’s full base OID.
Whole-PR coverage gate
.claude/skills/*/SKILL.md, .codex/skills/*/SKILL.md, .pi/skills/*/SKILL.md
The instructions compare the merge bases for the PR base and the report base against the reviewed head. They stop if the lookups fail or the merge bases differ, and add the coverage check to the pre-post checklist.
Saved review body
.claude/skills/*/SKILL.md, .codex/skills/*/SKILL.md, .pi/skills/*/SKILL.md
The saved review body excludes the private drafts omitted earlier.

Review-prober agent

Layer / File(s) Summary
Agent configuration and operating instructions
.pi/agents/review-prober.md
The new agent configuration sets its tools and context. Its instructions require read-only repository handling, quoted probe output for claims, unknown for unchecked items, and the task’s requested response format.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: bluestreak01

Merge Risk: ⚪ Minimal · up to 8c829

No actionable merge-blocking issue was established. The posting workflows check whole-PR coverage and instruct removal of private drafts before saving the public review.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: porting QuestDB's review-pr rules to the repository's tooling skills.
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.
Full details: Docstring Coverage

Explanation

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 files. (7 skipped: 7 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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