Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 838e52a

Browse files
committed
ci: add Copilot code review instructions with scope rules
1 parent f9d8841 commit 838e52a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
applyTo: "**/*.rs"
3+
---
4+
5+
# Code Review Instructions for fjall (structured-world fork)
6+
7+
## Scope Rules (CRITICAL)
8+
9+
- **Review ONLY code within the PR's diff.** Do not suggest inline fixes for unchanged lines.
10+
- For issues in code **outside the diff**, suggest creating a **separate issue** instead of proposing code changes. Example: "Consider opening an issue to validate buffer size here — this is outside this PR's scope."
11+
- **Read the PR description carefully.** If the PR body has an "out of scope" section listing items handled by other PRs, do NOT flag those items.
12+
- This fork has **multiple feature branches in parallel**. A fix that seems missing in one PR may already exist in another open PR. Check the "out of scope" section for cross-references.
13+
14+
## Rust Standards
15+
16+
- `unsafe` blocks require `// SAFETY:` comments explaining the invariant
17+
- Prefer `#[expect(lint)]` over `#[allow(lint)]``#[expect]` warns when suppression becomes unnecessary
18+
- Use `TryFrom`/`TryInto` for fallible conversions; `as` casts need `#[expect(clippy::cast_possible_truncation)]` with reason
19+
- No `unwrap()` / `expect()` on I/O paths — use `Result` propagation
20+
- `expect()` is acceptable for programmer invariants (lock poisoning) with `#[expect(clippy::expect_used, reason = "...")]`
21+
- Code must pass `cargo clippy --all-features -- -D warnings`
22+
23+
## Testing
24+
25+
- No mocks for storage — use real on-disk files via `tempfile::tempdir()`
26+
- Test naming: `fn <what>_<condition>_<expected>()`

0 commit comments

Comments
 (0)