roadmap PARTIAL

1043. A moved crate is fuzzed in its own repository

Raised by lane/crate-move-gaps on 2026-11-05 (UTC), closing a gap the crate move runbook's BUGS named. The title and slug are drafts.

Reuse: the shared template's weekly / fuzz job, which already runs cargo-fuzz when a caller passes fuzz: true; cargo-fuzz's own layout; and script/crate-move (milestone 1034 (a runbook for moving a crate out of nife)), which stages the crate repository. It writes no new job.

Background

nife fuzzes its parsers with cargo-fuzz. Every target lives in this tree's fuzz/, with its seeds in fuzz/seeds/<target>, and script/fuzz lists them. The fuzz shards of ci.yml run each target for 60 seconds from the committed seeds on every merge group, and the aggregate is a required check (notes/fuzzing.md).

A crate that moves out (the runbook) leaves its fuzz targets behind, and nothing says where they go. file_allocation_table, the next crate to move, has two: file_allocation_table_boot_sector and file_allocation_table_writer. Left as they are, after the move they fuzz the crate at the commit nife pins, inside nife's merge queue.

The premise needed one correction. The continuous fuzz host does not run these targets. It runs the in-guest system call drivers against the kernel, and its filer files private advisories on nifeos/nife alone (notes/fuzzing/continuous-host.md). A cargo-fuzz crash, in nife or in a crate repository, is a red hosted job with a public log. The template also has a fuzz job already, weekly / fuzz, which has run five minutes per target since the template's first release; no crate turns it on, since the pilot jh7110_entropy parses no bytes.

What was measured

Prior art

The options

A. Keep the targets in nife during the soak. fuzz/Cargo.toml depends on the git pin, and the queue keeps fuzzing the crate, nearly 90 times as long each week as option C. It loses for three reasons. A crash turns a required check red for every nife pull request, yet nife cannot fix the code: the fix takes a crate pull request, a tag and a pin bump, in two repositories. nife fuzzes the pinned commit while the crate's main moves ahead unfuzzed. And nife leaves this repository bottom-up (milestone 857 (crates released on their own) rules it), so the targets would move a second time. The extra fuzz time found nothing in the measured window.

B. A short fuzz job on every pull request in the template's check. It would match nife's shard per change, at a cost every crate pays on every pull request whether it parses bytes or not. It is an addition to C, not an alternative, and nothing measured asks for it yet.

C. The targets move with the crate, in the move itself. They live in the crate repository's fuzz/, in cargo-fuzz's layout, and the weekly caller passes fuzz: true. A crash is red where the fix lands. The weekly run already counts toward the soak (condition 2), so fuzzing is part of the evidence the soak ends on, with no new condition. A long run by hand stays the way to search deeper, as in nife.

Provisional ruling

Option C, decided by the maintainer, provisional. Moving the targets back is one pull request in each repository, and nothing outside the two repositories acts on where they live. The recommendation is not about effort: option A is less work at the move and loses on where a finding lands.

What it builds, with file_allocation_table as the example

  1. script/crate-move stages the crate's targets. For file_allocation_table the staged tree gains:
    • fuzz/Cargo.toml, depending on file_allocation_table = { path = ".." } and on libfuzzer-sys at nife's requirement, "0.4";
    • fuzz/fuzz_targets/file_allocation_table_boot_sector.rs and fuzz/fuzz_targets/file_allocation_table_writer.rs, with their names unchanged;
    • fuzz/corpus/file_allocation_table_boot_sector/, holding small-tree.img and the dosfstools-made boot sectors from tests/fixtures, which nife's script/fuzz passes as a second seed directory and the template's job does not;
    • fuzz/corpus/file_allocation_table_writer/, holding its two seeds;
    • fuzz/make-fat12-tree.py, the script that writes small-tree.img;
    • fuzz/README.md, holding the two targets' sections from notes/fuzzing/targets.md, since text about one crate goes into that crate (ยง310 (read a note against its code)). The boot sector target's doc comment points there instead of at this tree's note.
    • .github/workflows/weekly.yml with fuzz: true.
  2. The dry run builds the targets with cargo +nightly fuzz build and runs each over its corpus once (-runs=0), so a target that no longer compiles outside nife fails before anyone creates the repository.
  3. The nife-side pull request (the runbook's step 14) deletes the two targets from fuzz/Cargo.toml with the crate's dependency line, and their names and the fixtures case from script/fuzz. It also deletes fuzz/seeds/file_allocation_table_*, fuzz/seeds/make-fat12-tree.py with its paragraph in fuzz/seeds/README.md, and both sections of notes/fuzzing/targets.md. The dry run's follow-up list names each.
  4. The runbook's step 14 says the targets moved, and its BUGS entry on the fuzz targets goes.

Exit

script/crate-move --dry-run --into <scratch> file_allocation_table stages fuzz/ as above and runs both targets over their corpus. After the move, the crate repository's first weekly run shows weekly / fuzz succeeded, and script/fuzz --list in nife names neither target.

BUGS

Follow-on

Index row

A crate that moves out leaves its fuzz targets behind and nothing fuzzes it in its new repository. Proposed: the moved crate is fuzzed where it lives, with the runbook stating how.