Skip to content

ci: add Rust code review instructions for Copilot#16

Closed
polaz wants to merge 2 commits intomainfrom
ci/rust-instructions
Closed

ci: add Rust code review instructions for Copilot#16
polaz wants to merge 2 commits intomainfrom
ci/rust-instructions

Conversation

@polaz
Copy link
Member

@polaz polaz commented Mar 17, 2026

Summary

  • Add .github/instructions/rust.instructions.md with tiered review priorities for KV storage engine code
  • Tier 1 focuses on data corruption, transaction isolation, compaction ordering, sequence number monotonicity
  • Tier 2 focuses on crash safety (fsync ordering, WAL consistency, atomic metadata updates)
  • Explicit DO NOT flag list reduces noise on test style, magic numbers with context, partition naming

Adapted from the krb5-rs Rust review instructions template, with all Kerberos-specific items replaced by embedded storage engine equivalents.

Closes fjall-rs#15

Summary by CodeRabbit

  • Chores
    • Added internal development documentation for code review standards.

Note: This update contains no user-facing changes.

Tiered review priorities focused on KV storage correctness:
- Tier 1: data corruption, transaction isolation, compaction ordering
- Tier 2: crash safety, WAL consistency, fsync ordering
- Explicit DO NOT flag list to reduce review noise
Copilot AI review requested due to automatic review settings March 17, 2026 00:05
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Warning

Rate limit exceeded

@polaz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8aae11b8-e4e8-4e2f-a91d-b8ca5fe33753

📥 Commits

Reviewing files that changed from the base of the PR and between b6e9dcd and f112a3a.

📒 Files selected for processing (1)
  • .github/instructions/rust.instructions.md
📝 Walkthrough

Walkthrough

A new file defining Rust code review instructions has been added to guide AI-assisted code review across four priority tiers: logic correctness (Tier 1), safety and crash recovery (Tier 2), API design and robustness (Tier 3), and style (Tier 4), with explicit examples and exclusion rules.

Changes

Cohort / File(s) Summary
Rust Code Review Instructions
.github/instructions/rust.instructions.md
New file establishing tiered review guidelines for Rust code, including logic correctness, safety/crash recovery, API design, and style concerns, with YAML front matter targeting all .rs files. Includes explicit defect examples and DO NOT flag rules.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • Issue #15 — This PR directly implements the objective to add Rust code review instructions with tiered review priorities and explicit guidance for embedded KV storage engine concerns.
  • Add Rust-specific code review instructions for LSM-tree lsm-tree#22 — Parallel effort implementing identical Rust code review instructions in another repository.

Poem

🐰 A rabbit hops through Rust review,
Four tiers of wisdom, shining new,
Logic safe, and crashes caught,
Code review standards, newly taught!
🦀✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: add Rust code review instructions for Copilot' accurately summarizes the main change—adding a new instructions file for Copilot to perform Rust code reviews.
Linked Issues check ✅ Passed The pull request directly addresses all coding requirements from issue #15: creates the rust.instructions.md file with tiered review priorities (Tiers 1-4) covering data corruption, crash safety, API design, style, and includes a DO NOT flag list.
Out of Scope Changes check ✅ Passed All changes are directly scoped to creating the Rust code review instructions file specified in issue #15; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/rust-instructions
📝 Coding Plan
  • Generate coding plan for human review comments

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

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/instructions/rust.instructions.md:
- Line 52: Update the guidance at the referenced rule that currently endorses
`#[allow(clippy::...)]` with a justification so it aligns with the repo-wide
policy: replace the endorsement of `#[allow(...)]` with the preferred
`#[expect(...)]` phrasing and wording, explicitly referencing
`#[expect(clippy::...)]` as the accepted suppression pattern (and remove or
reword the `#[allow(clippy::...)]` example) to match the
`copilot-instructions.md` and `code-review.instructions.md` preference for
`#[expect(...)]`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 213158d8-a208-44b8-a48f-50ef5d68835c

📥 Commits

Reviewing files that changed from the base of the PR and between 2643ab3 and b6e9dcd.

📒 Files selected for processing (1)
  • .github/instructions/rust.instructions.md

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Rust-focused Copilot code review instruction file under .github/instructions/ to guide review prioritization and explicitly list exclusions for low-value feedback.

Changes:

  • Introduces tiered review priorities (logic/correctness → safety → API/robustness → style).
  • Adds an explicit “DO NOT Flag” list to reduce low-signal review comments.
  • Restates scope rules, Rust-specific lint/safety expectations, and test guidance.

You can also share your feedback on Copilot code review. Take the survey.

- Tier 3 #[must_use]: reword for builder-style methods returning Self,
  Option, or custom types — Result already has #[must_use]
- #[allow] vs #[expect]: clarify existing upstream #[allow] is
  acceptable, new fork code should use #[expect]
- Import ordering: narrow exclusion to ordering only — unused imports
  ARE actionable under -D warnings
@polaz polaz closed this Mar 17, 2026
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.

2 participants