AGENTS.md tells contributors to lint the crate they changed. For Casework that command does not currently work, on clean main, before any change:
cargo clippy -p registry-casework --all-targets -- -D warnings
It fails inside registry-breg, not in Casework:
unused import: action::erase_expired_action_evidence
function erase_expired_action_evidence is never used
Why it happens
Cargo feature unification. Selecting only registry-casework resolves a narrower feature set for the transitively built registry-breg than a workspace build does, and under that narrower set nothing calls erase_expired_action_evidence, so it becomes dead code and -D warnings fails the build.
Why CI is green
The workspace-wide lint is clean:
cargo clippy --locked --workspace --all-targets -- -D warnings # passes
because another crate in the workspace turns the relevant feature on. Root CI runs the workspace form, so nothing is broken today. This is latent rather than breaking, which is exactly why it has gone unnoticed.
Why it is still worth fixing
The per-package command is the one AGENTS.md documents, and it is what a contributor touching a single crate will reach for. Hitting a failure in a crate they did not touch costs them time working out whether they caused it. I lost that time today and confirmed it was pre-existing by stashing my changes and re-running against pristine main.
Reproduce
From a clean checkout of main, with no local modifications:
cargo clippy -p registry-casework --all-targets -- -D warnings
Confirmed on 2026-09-15.
Possible fixes
Not a recommendation, just the shape of the options:
- Gate the import and the function behind the same feature that gates its caller, so the narrow selection compiles neither.
- Give
registry-breg a feature that the Casework dependency edge enables, so the caller is always present when the function is.
- Decide the per-package command in
AGENTS.md is not supported for crates with this dependency shape, and say so there instead.
Worth noting that the underlying pattern is not unique to this pair, so whichever fix is chosen, it is worth checking whether other per-package lint invocations in AGENTS.md have the same problem.
AGENTS.mdtells contributors to lint the crate they changed. For Casework that command does not currently work, on cleanmain, before any change:It fails inside
registry-breg, not in Casework:unused import: action::erase_expired_action_evidencefunction erase_expired_action_evidence is never usedWhy it happens
Cargo feature unification. Selecting only
registry-caseworkresolves a narrower feature set for the transitively builtregistry-bregthan a workspace build does, and under that narrower set nothing callserase_expired_action_evidence, so it becomes dead code and-D warningsfails the build.Why CI is green
The workspace-wide lint is clean:
because another crate in the workspace turns the relevant feature on. Root CI runs the workspace form, so nothing is broken today. This is latent rather than breaking, which is exactly why it has gone unnoticed.
Why it is still worth fixing
The per-package command is the one
AGENTS.mddocuments, and it is what a contributor touching a single crate will reach for. Hitting a failure in a crate they did not touch costs them time working out whether they caused it. I lost that time today and confirmed it was pre-existing by stashing my changes and re-running against pristinemain.Reproduce
From a clean checkout of
main, with no local modifications:Confirmed on 2026-09-15.
Possible fixes
Not a recommendation, just the shape of the options:
registry-brega feature that the Casework dependency edge enables, so the caller is always present when the function is.AGENTS.mdis not supported for crates with this dependency shape, and say so there instead.Worth noting that the underlying pattern is not unique to this pair, so whichever fix is chosen, it is worth checking whether other per-package lint invocations in
AGENTS.mdhave the same problem.