fastcdc-rs PR review
This skill reviews a pull request against the standards this project's maintainers and
active downstream users expect. The criteria below were derived from real reviewer
feedback (ciehanski on PR #44 and #45) plus the determinism guarantees in CLAUDE.md.
fastcdc is a published crate (currently 4.0.1) with real downstream consumers, so
the bar is "would a careful human depending on this crate be comfortable merging it into
master?" — not "does it compile and pass the existing tests?"
How to run the review
- Determine the scope of changes:
- A specific PR:
gh pr view <N> --json title,body,files,additions,deletions and
gh pr diff <N>.
- The current branch:
git diff master...HEAD (or git diff for uncommitted work).
- Read the changed files in full, not just the diff hunks — context outside the hunk
often determines whether a change is correct (e.g. constructor invariants that make an
edge case reachable or not).
- Walk every criterion below against the change. For each finding, cite
file:line and say why it matters to a downstream user, not just what it is.
- Verify, don't assume: run
cargo test, cargo test --features tokio,
cargo test --features futures, cargo clippy, and cargo doc --features futures.
Report what you actually ran and its result. If a claim in the PR body is testable
(e.g. "every byte is emitted", "no perf regression"), test it or say you couldn't.
- Summarize findings grouped as Blocking, Should-fix, and Consider, then give
an explicit merge recommendation.
Review criteria
1. No silent data loss or silent failures
The chunking code's whole job is to account for every input byte. A break, return,
early-exit, or swallowed error that can drop or skip data is a blocking issue.
- Trace every loop exit and error path: can any input byte fail to be emitted?
- An edge case that is "currently unreachable through the public API" is still a latent
bug. It must
debug_assert! (or otherwise fail loudly) and degrade safely (emit the
leftover) rather than silently dropping data. (This is exactly the silent-break
tail-drop ciehanski flagged on #44.)
- Confirm the chunker produces contiguous, gapless, exact coverage of the input.
2. Per-iteration / per-chunk waste
Hot-path work that could be hoisted out of the loop is a real defect in a perf-critical
crate, not a nitpick.
- Look for conversions, allocations,
try_into, copies, or table rebuilds happening
per chunk or per byte that could be done once (the per-chunk try_into on the GEAR
tables ciehanski flagged on #44).
- The core chunking loop is latency-bound on the gear-hash recurrence; be skeptical of
changes that add work to it, and ask for A/B benchmark evidence (see criterion 6).
3. Public API surface and semver
This is a published crate; API changes ripple to every downstream user.
- For any new
pub item (struct, fn, field, trait, enum variant): is it intended to be
public, or should it be pub(crate) / private? Default to the smallest surface that
works. (ciehanski: "A new public Chunker struct is introduced — should this struct
be public to the consuming user?")
- Does the change alter, remove, or rename any existing public API, or change behavior of
existing public API? If so it's a breaking change requiring a major version bump
per semver. Flag the required version change explicitly against the current
Cargo.toml
version.
- Adding a public item is at least a minor bump; document the expected version change.
- New public items need rustdoc and ideally a doctest/example.
4. Determinism is a contract
Identical cut points across versions are a core guarantee (see CLAUDE.md).
- Any change that alters cut points / hashes / chunk boundaries must be intentional,
called out loudly in the PR, and is itself a breaking change.
- The hardcoded fixture hashes/lengths in tests are the guardrail — they should only
change deliberately. A PR that edits expected fixture values needs strong justification.
- Cross-check
v2016 and v2020 produce the same cut points where the docs claim they do.
5. Test rigor — tests must actually catch regressions
- New behavior needs tests that assert the invariant that matters (e.g. every byte
emitted, in order, no gaps), not just that the happy path returns something.
- A test is only credible if it fails when the code is broken. Prefer changes where the
author demonstrably verified this (deliberately break it, watch it fail). When reviewing,
if a test's failure mode is unclear, mentally (or actually) inject the bug and check the
test would catch it.
- Be honest about coverage gaps: if a branch can't be reached through the public API and
therefore isn't covered by a test, say so plainly rather than implying full coverage.
- Cover edge cases: empty input, sub-minimum-size input, all-identical bytes (worst case
for finding a cut), and the real fixture.
- Run the feature-gated test matrix: default,
tokio, futures (the two async features
are mutually exclusive — check the cfg guards still hold).
6. Performance claims need reproducible evidence
- Any "faster" / "no regression" claim should be backed by an interleaved old-vs-new A/B
measurement that asserts identical output before timing, ideally on more than one
architecture (e.g. ARM + x86_64). Don't accept single-run wall-clock numbers.
- New perf-sensitive changes are a good prompt to ask whether CI should gain a
cross-platform test / perf-regression workflow (ciehanski's suggestion), so future PRs
have data before merge.
7. Human accountability and provenance
This was ciehanski's central concern: PRs and comments written end-to-end by an AI agent
with no evident human review, landing in a depended-on crate.
- The review's job is to be the human-quality gate. Surface issues directly and concretely
so a human can make the merge decision — never imply "looks good, merge it" as a
substitute for maintainer judgment.
- Flag anything that looks auto-generated and unreviewed: plausible-but-wrong assertions,
comments/PR text that overstate what was verified, tests that look like coverage but
don't exercise the claimed invariant.
- Encourage a clear paper trail: PR description states what changed, why, what was tested,
and the semver impact. Do not vouch for code paths you did not actually exercise.
Output format
## Review of <PR # / branch>
### Blocking
- file:line — issue — why it matters downstream — suggested fix
### Should-fix
- ...
### Consider
- ...
### Verification run
- cargo test: <result>
- cargo test --features tokio / futures: <result>
- cargo clippy / cargo doc: <result>
- (any perf or invariant checks performed)
### Semver impact
- <none / patch / minor / major> — reason
### Recommendation
- <merge / merge after fixes / needs work> — one-line rationale for the human maintainer
Source: nlfiedler/fastcdc-rs — distributed by TomeVault.
1---2name: pr-review-113description: Review a pull request (or the current diff) against fastcdc-rs project standards. Use when asked to review a PR, vet changes before merging to master, or check a branch for the kinds of issues that have slipped through before. Distills reviewer feedback (notably ciehanski on PR4---56# fastcdc-rs PR review78This skill reviews a pull request against the standards this project's maintainers and9active downstream users expect. The criteria below were derived from real reviewer10feedback (ciehanski on PR #44 and #45) plus the determinism guarantees in `CLAUDE.md`.1112`fastcdc` is a published crate (currently `4.0.1`) with real downstream consumers, so13the bar is "would a careful human depending on this crate be comfortable merging it into14`master`?" — not "does it compile and pass the existing tests?"1516## How to run the review17181. Determine the scope of changes:19 - A specific PR: `gh pr view <N> --json title,body,files,additions,deletions` and20 `gh pr diff <N>`.21 - The current branch: `git diff master...HEAD` (or `git diff` for uncommitted work).222. Read the changed files in full, not just the diff hunks — context outside the hunk23 often determines whether a change is correct (e.g. constructor invariants that make an24 edge case reachable or not).253. Walk every criterion below against the change. For each finding, cite26 `file:line` and say *why* it matters to a downstream user, not just *what* it is.274. Verify, don't assume: run `cargo test`, `cargo test --features tokio`,28 `cargo test --features futures`, `cargo clippy`, and `cargo doc --features futures`.29 Report what you actually ran and its result. If a claim in the PR body is testable30 (e.g. "every byte is emitted", "no perf regression"), test it or say you couldn't.315. Summarize findings grouped as **Blocking**, **Should-fix**, and **Consider**, then give32 an explicit merge recommendation.3334## Review criteria3536### 1. No silent data loss or silent failures37The chunking code's whole job is to account for every input byte. A `break`, `return`,38early-exit, or swallowed error that can drop or skip data is a blocking issue.39- Trace every loop exit and error path: can any input byte fail to be emitted?40- An edge case that is "currently unreachable through the public API" is still a latent41 bug. It must `debug_assert!` (or otherwise fail loudly) and degrade safely (emit the42 leftover) rather than silently dropping data. (This is exactly the silent-`break`43 tail-drop ciehanski flagged on #44.)44- Confirm the chunker produces **contiguous, gapless, exact** coverage of the input.4546### 2. Per-iteration / per-chunk waste47Hot-path work that could be hoisted out of the loop is a real defect in a perf-critical48crate, not a nitpick.49- Look for conversions, allocations, `try_into`, copies, or table rebuilds happening50 per chunk or per byte that could be done once (the per-chunk `try_into` on the GEAR51 tables ciehanski flagged on #44).52- The core chunking loop is latency-bound on the gear-hash recurrence; be skeptical of53 changes that add work to it, and ask for A/B benchmark evidence (see criterion 6).5455### 3. Public API surface and semver56This is a published crate; API changes ripple to every downstream user.57- For any new `pub` item (struct, fn, field, trait, enum variant): is it *intended* to be58 public, or should it be `pub(crate)` / private? Default to the smallest surface that59 works. (ciehanski: "A new public `Chunker` struct is introduced — *should* this struct60 be public to the consuming user?")61- Does the change alter, remove, or rename any existing public API, or change behavior of62 existing public API? If so it's a **breaking change** requiring a **major version bump**63 per semver. Flag the required version change explicitly against the current `Cargo.toml`64 version.65- Adding a public item is at least a minor bump; document the expected version change.66- New public items need rustdoc and ideally a doctest/example.6768### 4. Determinism is a contract69Identical cut points across versions are a core guarantee (see `CLAUDE.md`).70- Any change that alters cut points / hashes / chunk boundaries must be intentional,71 called out loudly in the PR, and is itself a breaking change.72- The hardcoded fixture hashes/lengths in tests are the guardrail — they should only73 change deliberately. A PR that edits expected fixture values needs strong justification.74- Cross-check `v2016` and `v2020` produce the same cut points where the docs claim they do.7576### 5. Test rigor — tests must actually catch regressions77- New behavior needs tests that assert the *invariant that matters* (e.g. every byte78 emitted, in order, no gaps), not just that the happy path returns something.79- A test is only credible if it fails when the code is broken. Prefer changes where the80 author demonstrably verified this (deliberately break it, watch it fail). When reviewing,81 if a test's failure mode is unclear, mentally (or actually) inject the bug and check the82 test would catch it.83- Be honest about coverage gaps: if a branch can't be reached through the public API and84 therefore isn't covered by a test, say so plainly rather than implying full coverage.85- Cover edge cases: empty input, sub-minimum-size input, all-identical bytes (worst case86 for finding a cut), and the real fixture.87- Run the feature-gated test matrix: default, `tokio`, `futures` (the two async features88 are mutually exclusive — check the `cfg` guards still hold).8990### 6. Performance claims need reproducible evidence91- Any "faster" / "no regression" claim should be backed by an interleaved old-vs-new A/B92 measurement that asserts identical output before timing, ideally on more than one93 architecture (e.g. ARM + x86_64). Don't accept single-run wall-clock numbers.94- New perf-sensitive changes are a good prompt to ask whether CI should gain a95 cross-platform test / perf-regression workflow (ciehanski's suggestion), so future PRs96 have data before merge.9798### 7. Human accountability and provenance99This was ciehanski's central concern: PRs and comments written end-to-end by an AI agent100with no evident human review, landing in a depended-on crate.101- The review's job is to be the human-quality gate. Surface issues directly and concretely102 so a human can make the merge decision — never imply "looks good, merge it" as a103 substitute for maintainer judgment.104- Flag anything that looks auto-generated and unreviewed: plausible-but-wrong assertions,105 comments/PR text that overstate what was verified, tests that look like coverage but106 don't exercise the claimed invariant.107- Encourage a clear paper trail: PR description states what changed, why, what was tested,108 and the semver impact. Do not vouch for code paths you did not actually exercise.109110## Output format111112```113## Review of <PR # / branch>114115### Blocking116- file:line — issue — why it matters downstream — suggested fix117118### Should-fix119- ...120121### Consider122- ...123124### Verification run125- cargo test: <result>126- cargo test --features tokio / futures: <result>127- cargo clippy / cargo doc: <result>128- (any perf or invariant checks performed)129130### Semver impact131- <none / patch / minor / major> — reason132133### Recommendation134- <merge / merge after fixes / needs work> — one-line rationale for the human maintainer135```136137---138> Source: [nlfiedler/fastcdc-rs](https://github.com/nlfiedler/fastcdc-rs) — distributed by [TomeVault](https://tomevault.io).139<!-- tomevault:4.0:skill_md:2026-06-29 -->