docs: strengthen PET Rust review guidance (Fixes #496) - #497
Conversation
Capture recurring path identity, Unicode parsing, hot-path I/O, side-effect, and behavior-test checks from recent PR reviews. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux) ➖
Legend
|
Performance Report (macOS)
Legend
|
Test Coverage Report (Linux)
Coverage unchanged. |
Performance Report (Windows) ✅
Legend
|
Test Coverage Report (Windows)
Coverage increased! Great work! |
There was a problem hiding this comment.
Pull request overview
This PR strengthens PET’s Rust review guidance by adding a new PET-wide Rust coding skill and updating the Reviewer agent checklist so Rust reviews consistently cover recent recurring issues (cache key/path identity, Unicode-safe parsing, hot-path I/O/allocation, and “tests must prove invariants”).
Changes:
- Add a new
.github/skills/rust-coding-skill/SKILL.mdwith PET-wide Rust correctness/performance guidance and test-invariant expectations. - Update
.github/agents/Reviewer.agent.mdto apply the new Rust coding skill for any Rust-changing PRs and to expand the Rust review checklist accordingly.
Show a summary per file
| File | Description |
|---|---|
| .github/skills/rust-coding-skill/SKILL.md | Introduces PET-wide Rust guidance (caches/path identity, parsing safety, hot paths, locks, and test invariants). |
| .github/agents/Reviewer.agent.md | Expands reviewer checklist and ensures Rust reviews load/apply the new Rust coding skill. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 4
- Review effort level: Lite
Use supported frontmatter, standard-library parsing examples, atomic counters, and the existing pre-commit skill as the single source of truth. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add raw-literal and downstream config-consumption checks from the latest glob diagnostics review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Review details
Suppressed comments (2)
.github/agents/Reviewer.agent.md:173
- This line references the coding guidance by file path, but the skills are invoked by name. Referring to the skill name keeps the instruction stable if the file is moved/renamed and aligns with the surrounding skill documentation.
Apply `.github/skills/rust-coding-skill/SKILL.md` to every Rust review, not only locator changes.
.github/agents/Reviewer.agent.md:51
- The reviewer checklist references skills by file path, which is more brittle and less actionable than using the skill names (the agent invokes skills by name). Using consistent skill-name references also matches how other skill docs refer to each other.
This issue also appears on line 173 of the same file.
- If any changed file is Rust, load and apply both `.github/skills/rust-coding-skill/SKILL.md` and `.github/skills/rust-locator-patterns/SKILL.md`.
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Keep reviewer instructions stable and directly actionable through skill invocation names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Review details
Suppressed comments (2)
.github/agents/Reviewer.agent.md:52
- The new guidance says to load both
rust-coding-skillandrust-locator-patternswhenever any changed file is Rust, but later this doc only mandates applyingrust-coding-skillfor all Rust reviews. To keep instructions consistent (and avoid over-applying locator-order rules to non-locator Rust changes), consider always loadingrust-coding-skill, and loadingrust-locator-patternsonly when locator/discovery/identification code is in scope.
Before reading code:
- If any changed file is Rust, load and apply both the `rust-coding-skill` and `rust-locator-patterns` skills.
.github/agents/Reviewer.agent.md:174
- Minor wording issue: "Apply the
rust-coding-skillskill" is redundant. Dropping the second "skill" reads more cleanly and avoids repeating the term in this heading text.
### General Rust Correctness and Performance
Apply the `rust-coding-skill` skill to every Rust review, not only locator changes.
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Always apply the general Rust skill and load locator-specific guidance only when locator behavior is in scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Review retrospective
Recent feedback clustered around:
Fixes #496