From 8bf0d441f889468572e5fec1abd91345ccdf9781 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Mon, 24 Aug 2026 03:37:50 +0000 Subject: [PATCH 1/2] refactor(hooks): inline the test-only route-metadata wrapper 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) --- crates/tracedecay-agent-hosts/src/hooks/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/tracedecay-agent-hosts/src/hooks/mod.rs b/crates/tracedecay-agent-hosts/src/hooks/mod.rs index b0f88835f..8523a034c 100644 --- a/crates/tracedecay-agent-hosts/src/hooks/mod.rs +++ b/crates/tracedecay-agent-hosts/src/hooks/mod.rs @@ -853,7 +853,6 @@ fn take_test_daemon_hook_action( ) } -// Only the hook tests assert on the derived route metadata. pub(crate) fn hook_route_metadata_from_parsed( parsed: &Value, project_root: &Path, From ffca36228f8126775a232da0ab5f98c2ee9741ce Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Mon, 24 Aug 2026 03:40:23 +0000 Subject: [PATCH 2/2] chore(deps): clear new cargo-shear findings 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) --- Cargo.lock | 6 ------ Cargo.toml | 5 ----- crates/tracedecay-cli/Cargo.toml | 11 ++++++++--- crates/tracedecay-search-eval/Cargo.toml | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 611717ea8..32d51264e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5892,7 +5892,6 @@ dependencies = [ "libc", "memmap2", "notify", - "open", "rayon", "regex", "rmcp 3.1.1", @@ -5927,7 +5926,6 @@ dependencies = [ "tracedecay-global-db", "tracedecay-graph-db", "tracedecay-hooks", - "tracedecay-host-integration", "tracedecay-jsonrpc", "tracedecay-lsp", "tracedecay-policy", @@ -5950,7 +5948,6 @@ dependencies = [ "url", "walkdir", "windows 0.62.2", - "xattr", "zeroize", "zip", ] @@ -6066,16 +6063,13 @@ dependencies = [ "axum", "clap", "dirs", - "filetime", "fs2", "futures-util", "hex", "hotpath", - "jsonschema", "logo-art", "open", "rayon", - "regex", "rusqlite", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 74dd5becd..15e31b9d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -388,7 +388,6 @@ tracedecay-code-extraction = { path = "crates/tracedecay-code-extraction", versi tracedecay-code-index = { path = "crates/tracedecay-code-index", version = "0.1.0", default-features = false } tracedecay-dashboard-api = { path = "crates/tracedecay-dashboard-api", version = "0.1.0" } tracedecay-domain = { path = "crates/tracedecay-domain", version = "0.1.0" } -tracedecay-host-integration = { path = "crates/tracedecay-host-integration", version = "0.1.0" } tracedecay-hooks = { path = "crates/tracedecay-hooks", version = "0.1.0" } tracedecay-jsonrpc = { path = "crates/tracedecay-jsonrpc", version = "0.1.0" } tracedecay-lsp = { path = "crates/tracedecay-lsp", version = "0.1.0" } @@ -436,7 +435,6 @@ crossterm = "0.28" fs2 = "0.4" same-file = "1" sysinfo = { version = "0.32", default-features = false, features = ["system"] } -open = "5.3" # Raw filesystem watcher for the daemon git-metadata watcher (src/daemon/git_watch.rs). # We deliberately use the raw watcher (not notify-debouncer-full) and debounce # ourselves so a monorepo's git-ref churn coalesces into a single sync. @@ -457,9 +455,6 @@ tokio-rustls = { version = "0.26", default-features = false, features = ["ring", flate2 = "1" tar = "0.4" -[target.'cfg(target_os = "linux")'.dev-dependencies] -xattr = "1" - # `statfs(2)` for daemon store-locality detection (src/daemon/store_runtime/ # resolver.rs). Linux reads `/proc/self/mountinfo` instead; macOS has no such # file, and `MNT_LOCAL` is the kernel's direct answer to "is this volume local". diff --git a/crates/tracedecay-cli/Cargo.toml b/crates/tracedecay-cli/Cargo.toml index 3fa79e231..a187dc26e 100644 --- a/crates/tracedecay-cli/Cargo.toml +++ b/crates/tracedecay-cli/Cargo.toml @@ -116,10 +116,7 @@ url = "2" [dev-dependencies] axum = "0.8" dirs = "6" -filetime = "0.2" fs2 = "0.4" -jsonschema = { version = "0.46.8", default-features = false } -regex = "1.12.3" tempfile = "3" tokio = { version = "1", features = ["full", "test-util"] } toml = "1" @@ -134,5 +131,13 @@ xattr = "1" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tracedecay_observation_fault_harness)"] } +# `fs2` is consumed only by `tests/common/fixture.rs` (shared at the repo +# root and pulled into this crate's integration test binaries via a +# relative `#[path]`, not by any file under this crate's own directory +# tree), so cargo-shear's per-crate scan cannot see the use and reports a +# false positive. +[package.metadata.cargo-shear] +ignored = ["fs2"] + [build-dependencies] logo-art = "0.2" diff --git a/crates/tracedecay-search-eval/Cargo.toml b/crates/tracedecay-search-eval/Cargo.toml index c03d93d34..e7ebb77f2 100644 --- a/crates/tracedecay-search-eval/Cargo.toml +++ b/crates/tracedecay-search-eval/Cargo.toml @@ -50,5 +50,4 @@ tracedecay-search-eval = { path = ".", features = ["evaluator-corpus-languages"] # The self dev-dependency enables corpus language tiers for this crate's own # tests; assets/ holds checked-in eval fixture corpora, not crate sources. [package.metadata.cargo-shear] -ignored = ["tracedecay-search-eval"] ignored-paths = ["assets/**"]