AGENTS.md's "Dependency edges (a crate depends on those to its right)" list is the repository's
own map of the workspace graph, and CLAUDE.md is a symlink to it, so it is the first thing both
a contributor and a tool read. Nine of its edges no longer match cargo metadata.
Measured with:
cargo metadata --no-deps --format-version 1 \
| jq -r '.packages[] | "\(.name): \([.dependencies[]
| select((.kind//"normal")=="normal" or (.kind//"normal")=="build") | .name] | join(", "))"' \
| sort
| Crate |
AGENTS.md says |
cargo metadata says |
Gap |
gamut-deflate |
← core |
(nothing) |
claims an edge that does not exist. crates/gamut-deflate/src/lib.rs:6 — "with no internal dependencies of its own"; the manifest has no [dependencies] table at all |
gamut-dsp |
← core (shared with the gamut-color / gamut-bitstream line) |
(nothing) |
claims an edge that does not exist. The line is right for gamut-color and gamut-bitstream and wrong for gamut-dsp |
gamut-isobmff |
← core, bitstream |
← core |
claims gamut-bitstream, which it does not use |
gamut-riff |
← core, bitstream |
← core |
same line, same gap |
gamut-jpeg |
← core, color, dsp |
← codec-abi, color, core, dsp |
missing gamut-codec-abi |
gamut-heic |
← isobmff, core, color |
← codec-abi, color, core, isobmff |
missing gamut-codec-abi |
gamut-png |
← core, deflate (+ miniz_oxide) |
← codec-abi, core, deflate, miniz_oxide |
missing gamut-codec-abi |
gamut-webp |
← avif's list + riff (so: av1, isobmff, core, color, codec-abi, riff) |
← codec-abi, color, core, dsp, riff |
claims gamut-av1 and gamut-isobmff, which it does not use; missing gamut-dsp |
gamut-tiff |
← ifd, core, bitstream |
← bitstream, core, deflate, ifd, miniz_oxide |
missing gamut-deflate and miniz_oxide |
gamut-dng |
← ifd, bitstream, color, metadata, core (+ miniz_oxide) |
← bitstream, color, core, deflate, ifd, jxl, metadata, miniz_oxide |
missing gamut-deflate and gamut-jxl |
Three of these matter beyond tidiness:
gamut-codec-abi is missing from three consumers' edges (gamut-jpeg, gamut-heic,
gamut-png) in the same document that describes the codec-abi seam as the one door a backend
enters by. A reader reconstructing the seam's reach from the edge list gets three crates fewer
than there are.
gamut-dng ← gamut-jxl is an undocumented edge between two format crates, and it is not
an obvious one from either crate's description.
- The two "← nothing" crates are not the ones the document names. It says
gamut-codec-abi
is "dependency-free (not even on gamut-core)" — true — while gamut-deflate and gamut-dsp
are equally dependency-free and are both listed as ← core.
Suggested fix
Re-derive the whole edge list from cargo metadata once, and consider a mise task that
compares the list against the graph, in the shape of check-readme-crates
(tooling/check-readme-crates/run.sh) — the same failure mode (a hand-maintained summary of the
workspace that nothing read) and the same remedy.
Why filed rather than fixed
Found while correcting the README crates table (#425, PR #526) — the gamut-deflate row now
states that the crate has no runtime dependency of its own, which AGENTS.md contradicted. That
one line is corrected in PR #526 because the PR's own diff would otherwise contradict it; the
other eight edges are a separate audit of a different document section, and widening a
documentation PR past its stated boundary is what the PR exists to argue against.
Related
AGENTS.md's "Dependency edges (a crate depends on those to its right)" list is the repository'sown map of the workspace graph, and
CLAUDE.mdis a symlink to it, so it is the first thing botha contributor and a tool read. Nine of its edges no longer match
cargo metadata.Measured with:
AGENTS.mdsayscargo metadatasaysgamut-deflatecrates/gamut-deflate/src/lib.rs:6— "with no internal dependencies of its own"; the manifest has no[dependencies]table at allgamut-dspgamut-color/gamut-bitstreamline)gamut-colorandgamut-bitstreamand wrong forgamut-dspgamut-isobmffgamut-bitstream, which it does not usegamut-riffgamut-jpeggamut-codec-abigamut-heicgamut-codec-abigamut-pngminiz_oxide)gamut-codec-abigamut-webpgamut-av1andgamut-isobmff, which it does not use; missinggamut-dspgamut-tiffgamut-deflateandminiz_oxidegamut-dngminiz_oxide)gamut-deflateandgamut-jxlThree of these matter beyond tidiness:
gamut-codec-abiis missing from three consumers' edges (gamut-jpeg,gamut-heic,gamut-png) in the same document that describes the codec-abi seam as the one door a backendenters by. A reader reconstructing the seam's reach from the edge list gets three crates fewer
than there are.
gamut-dng ← gamut-jxlis an undocumented edge between two format crates, and it is notan obvious one from either crate's description.
gamut-codec-abiis "dependency-free (not even on
gamut-core)" — true — whilegamut-deflateandgamut-dspare equally dependency-free and are both listed as
← core.Suggested fix
Re-derive the whole edge list from
cargo metadataonce, and consider amisetask thatcompares the list against the graph, in the shape of
check-readme-crates(
tooling/check-readme-crates/run.sh) — the same failure mode (a hand-maintained summary of theworkspace that nothing read) and the same remedy.
Why filed rather than fixed
Found while correcting the README crates table (#425, PR #526) — the
gamut-deflaterow nowstates that the crate has no runtime dependency of its own, which
AGENTS.mdcontradicted. Thatone line is corrected in PR #526 because the PR's own diff would otherwise contradict it; the
other eight edges are a separate audit of a different document section, and widening a
documentation PR past its stated boundary is what the PR exists to argue against.
Related
contradicts.