Drop the unused assert_cmd dev-dependency - #342
Conversation
Nothing in the tree imports assert_cmd; it was added alongside portable-pty for a dl pty harness that was never built, and the map decided (#317) to drop it rather than build the harness. portable-pty stays — it is live in aid's interactive tests. Removes the workspace entry, dl's dev-dependency, and the five crates it alone pulled into Cargo.lock (assert_cmd, predicates, predicates-core, predicates-tree, termtree, wait-timeout). Closes #341
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves the unused File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
blooop
left a comment
There was a problem hiding this comment.
This was generated by AI during review.
Two-axis review of #342 against merge-base a1c6fe8, one commit (8bf981b), 3 files, 0 insertions / 66 deletions. Axes were run in independent fresh contexts and are reported unmerged.
Standards
No findings. The removal is complete, minimal and internally consistent.
- No surviving references.
git grep -i "assert_cmd\|assert-cmd"over the whole tree at the PR head returns zero hits — no.rs, no docs, no.github/workflows/, no prek/pixi/packaging manifests, no Python side. At the merge-base the only hits were the two manifest lines and the two lockfile entries this PR deletes. The crate was declared in theM0: parity harness … cargo scaffoldcommit and never once imported, so the ticket's "unused" premise holds — textbook Speculative Generality, correctly deleted rather than kept "in case". - The lock prune is exactly the reachable closure and nothing more.
assert_cmdpulledanstyle, bstr, libc, predicates, predicates-core, predicates-tree, wait-timeout;predicates → difflib;predicates-tree → termtree;wait-timeout → libc. Each of the seven removed entries was cross-checked against every remainingdependencieslist inrust/Cargo.lockon the branch and has zero surviving referents.anstyle(viaanstream/clap_builder/env_filter),bstr(viaglobset/skim/shell-quote) andlibcare correctly retained. Deletions only — no version churn rode along. portable-ptycorrectly retained:rust/Cargo.toml:47,rust/aid/Cargo.toml:36, used atrust/aid/tests/interactive.rs:21,95,100.- Workspace-dependency convention followed. Both halves — the
[workspace.dependencies]entry and the member's{ workspace = true }— go together, leaving no dangling workspace entry. That is the one failure mode cargo would not catch, since an unused[workspace.dependencies]line is silently legal. - Lockfile freshness is machine-guarded, not trusted: CI builds and tests with
--lockedthroughout (.github/workflows/ci.yml), which fails on a stale lock. Green here. - No docs to update — nothing in
README.md,CLAUDE.mdordocs/mentions the dependency, and CLAUDE.md's README rule covers CLI commands/flags only.
Fowler baseline is otherwise not applicable: the diff contains no code, types or control flow.
Verdict: pass.
Spec
Spec is ticket #341, which restates the decision settled on #317 and recorded on map #299. Every criterion met, quoted and evidenced:
- "drop it from
rust/dl/Cargo.toml:58and the workspace list (rust/Cargo.toml:47)" — both hit, and only those. At merge-base those two lines are literallyassert_cmd = { workspace = true }andassert_cmd = "2"; the diff deletes precisely them. The spec's line numbers are exact matches, not approximations. - "
portable-ptystays (live inrust/aid/tests/interactive.rs)" — untouched and still live; it moves up one line inrust/Cargo.tomlpurely as a consequence of the deletion above it, and keeps its lockfile entry. - "No behavior, so no red test" — the claim is true, not merely asserted: zero
.rsfiles touched, and nothing under anysrc/ortests/ever imported the crate, so no test could have gone red. The exemption applies as stated. - "the proof is the pruned
Cargo.lockand a cleancargo test --workspace" — the pruned lock is present as the named artifact, and CI is green on this SHA. - #317's scope, "drop the unused
assert_cmdonly, no dl pty harness" — both halves obeyed: norust/dl/tests/file added or changed, no pty machinery anywhere in the diff. No over-delivery, nothing left undone.
Verdict: pass.
Independent verification
Run by the review context itself on the PR head, not taken from the PR body:
cargo metadata --locked --offlineexits 0 — the hand-pruned lockfile is complete and not stale.cargo check --locked --all-targetscompiles every crate including test targets, which is what would have failed had anything still referencedassert_cmd.- All 13 required checks green (
ci,rust,rust-coverage,e2e,public-api,packaging,prek,gate, codecov, GitGuardian).
Non-blocking notes
- The PR description miscounts the prune. It says "the five crates it alone pulled into
Cargo.lock(predicates, predicates-core, predicates-tree, termtree, wait-timeout)" — the lock actually sheds six transitives;difflib, pulled in bypredicates, is missing from that list. The lockfile itself is correct; only the prose is off. Worth a one-word fix if the description is edited anyway. - Nothing in CI would catch the next unused dependency — no
cargo-udeps/cargo-machete, and.github/dependabot.ymldeclares nocargoecosystem. That is how this one survived. A standing guard belongs on sibling map #300 ("Drift-proofing rapid development"), not on this ticket. - Pre-existing, adjacent, out of scope:
rust/Cargo.toml:23declaresdl = { path = "dl" }in[workspace.dependencies]with zero consumers —rust/aid/Cargo.toml:16deliberately uses a direct{ path = "../dl" }instead. Same unused-workspace-declaration class this PR is sweeping. Fine to leave.
Verdict
Approve — both axes pass, no blocking findings.
The three notes above are all non-blocking: note 1 is prose in the PR description, notes 2 and 3 are pre-existing and belong to other tickets. Merging stays with the human.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Removes the
assert_cmddev-dependency that nothing in the tree imports: the workspace entry inrust/Cargo.toml, dl's[dev-dependencies]line, and the five crates it alone pulled intoCargo.lock(predicates, predicates-core, predicates-tree, termtree, wait-timeout).portable-ptystays — it is live in aid's interactive tests.Decided in #317 (drop assert_cmd only, no dl pty harness). No behavior changes, so no red test per the ticket's stated exemption; proof is the pruned lockfile plus a green
cargo test --workspace(1500+ tests),cargo clippy --locked --all-targets -- -D warnings, andcargo fmt --check, all clean locally.Closes #341
🤖 Generated with Claude Code
Summary by Sourcery
Remove the unused
assert_cmddevelopment dependency and its transitive lockfile entries.Enhancements:
assert_cmddevelopment dependency from the workspace anddlcrate.Build:
assert_cmdand its transitive dependencies from the Rust lockfile.