Skip to content

chore: clear test leftovers and unused deps - #714

Closed
ScriptedAlchemy wants to merge 3 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
claude/clear-test-leftovers
Closed

chore: clear test leftovers and unused deps#714
ScriptedAlchemy wants to merge 3 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
claude/clear-test-leftovers

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Reopened against codex/tracedecay-total-redesign-plan-reopened. Deleted a test-only hooks wrapper following the two existing house-pattern commits. cargo shear went 7 errors -> 0; fs2 was 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.

ScriptedAlchemy and others added 3 commits August 24, 2026 04:03
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>
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cd36428

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant