chore: clear test leftovers and unused deps - #714
Conversation
hook_route_metadata_from_event was a #[cfg(test)] wrapper chaining serde_json::from_str into hook_route_metadata_from_parsed; both of its call sites lived in the hooks test module, so they now parse and call the production function directly, matching the house pattern from refactor(daemon): inline the single-use test patch extractor and refactor(retention): drop the test-only newest-mtime wrapper earlier in this branch's history. src/hooks was recently extracted into crates/tracedecay-agent-hosts/src/hooks/, so this follows it there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Removes seven genuinely-unused dependencies introduced since the tracedecay-cli extraction and the last dismissed shear baseline: open, tracedecay-host-integration, and the linux-only xattr dev-dependency from the root Cargo.toml (and its now-empty target section), plus filetime, jsonschema, and regex from tracedecay-cli. Restores fs2 in tracedecay-cli and adds a documented cargo-shear ignore for it: it is consumed only by tests/common/fixture.rs, a repo-root fixture pulled into this crate's integration test binaries via a relative #[path] outside the crate's own directory tree, which the per-crate static scan cannot see removing it broke `cargo check -p tracedecay-cli --all-targets`. Also drops the redundant tracedecay-search-eval self-dependency ignore entry, which cargo-shear now reports the dependency as used without. The four pre-existing warnings (three unused-feature-only dependencies, one unlinked fixture-file group) are left as previously dismissed; tests/fixtures/semantic_index/src/*.rs is independently confirmed genuinely used by semantic_index_fixture_check_test.rs, matching the same false-positive category as the fixture globs already in ignored-paths, but is left off that list per the same previously-made call rather than grown here. cargo shear: was 7 errors / 5 warnings, now 0 errors / 4 warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…plan-reopened' into HEAD
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd364285e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fs2 = "0.4" | ||
| jsonschema = { version = "0.46.8", default-features = false } | ||
| regex = "1.12.3" | ||
| tempfile = "3" |
There was a problem hiding this comment.
Restore regex for default CLI test builds
When CLI unit tests run with the default production feature rather than --all-features, cfg(test) compiles hotpath_focus_is_valid, which calls regex::Regex::new, but the remaining normal regex dependency is optional and activated only by hotpath. Removing this dev-dependency therefore makes cargo test -p tracedecay-cli fail with an unresolved regex crate; retain the test dependency or ensure the test build activates it.
AGENTS.md reference: AGENTS.md:L33-L34
Useful? React with 👍 / 👎.
|
Closing after review. This removes regex required by default tracedecay-cli test builds, and the earlier dependency-removal reconciliation was stale against live CLI and integration callers. |
Reopened against
codex/tracedecay-total-redesign-plan-reopened. Deleted a test-only hooks wrapper following the two existing house-pattern commits.cargo shearwent 7 errors -> 0;fs2was restored after finding it is used via a cross-crate#[path]include, with a documented ignore rather than blanket suppression. Two premises were stale: the knowingly-broken privacy test had already been rewritten, and the mcp_suite dead-code report was test-layout drift.