Skip to content

chore: remove dead code + unused dependencies#249

Merged
jrosskopf merged 1 commit into
mainfrom
chore/dead-code-cleanup
Jul 7, 2026
Merged

chore: remove dead code + unused dependencies#249
jrosskopf merged 1 commit into
mainfrom
chore/dead-code-cleanup

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Part 3 of the spec-alignment sweep — a workspace-wide dead-code cleanup (the audit's "clean up dead/redundant code" track). A grep-verified hunt, cross-checked by a full build + clippy + test run, found unreferenced functions and unused dependencies.

Dead functions (zero references anywhere, including tests):

  • RunLedger::count_by_status (escurel-runner-core) — the /debug/ledger surface uses the tenant-agnostic count_all_by_status.
  • QuotaError::from_bucket (escurel-quota) — never invoked.
  • ServerConfig::test_defaults (escurel-server) — a never-adopted test constructor.
  • (+ the QuotaExhausted / AlwaysReady imports they left dangling.)

Unused dependencies (12 crates, 15 deps — cargo build --workspace --all-targets confirms none were needed): async-trait, futures, tokio-stream, anyhow (×2), serde (×4), tracing (×2), tracing-core, serde_json, escurel-types, secrecy. Cargo.lock pruned to match.

Deliberately left (not dead — future hooks / public wire API):

  • the sql_view with_unsigned_extensions admin opt-in scaffolding (planned security hook);
  • the escurel-types Admin*Request DTOs (public wire types, may have external consumers);
  • escurel-storage's aws-config (feature-gated under s3 — verifying it needs a per-feature build; deferred to keep this PR default-features-safe).

Test plan

No behavioural change. Full local gate green: fmt --check, clippy --workspace --all-targets -D warnings, test --workspace --all-targets, build --workspace --release.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

A workspace-wide dead-code hunt (grep-verified, cross-checked by a full
build) found unreferenced functions and unused Cargo dependencies. All
removals are confirmed by `cargo build --workspace --all-targets` +
clippy + the full test suite staying green.

Dead functions (zero references anywhere, incl. tests):
- `RunLedger::count_by_status` (escurel-runner-core) — the `/debug/ledger`
  surface uses the tenant-agnostic `count_all_by_status` instead.
- `QuotaError::from_bucket` (escurel-quota) — never invoked.
- `ServerConfig::test_defaults` (escurel-server) — a test constructor that
  was never adopted.
(+ the now-unused `QuotaExhausted` / `AlwaysReady` imports they left behind.)

Unused dependencies (verified no use in the crate; `cargo build` confirms):
escurel-auth (async-trait), escurel-cli (futures, tokio-stream),
escurel-eval (anyhow), escurel-explore-bff (serde), escurel-loader (tracing),
escurel-obs (tracing-core, serde), escurel-runner (serde),
escurel-runner-core (anyhow, serde), escurel-runner-harness (tracing),
escurel-tui (serde_json), escurel-test-support (escurel-types, secrecy).

Deliberately LEFT (not dead — future hooks / public API): the sql_view
`with_unsigned_extensions` admin opt-in scaffolding; the escurel-types
`Admin*Request` DTOs (public wire types); `escurel-storage`'s `aws-config`
(feature-gated under `s3`, needs a per-feature build to verify — deferred).

Test plan: full fmt/clippy/test/build gate green; no behavioural change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jrosskopf jrosskopf merged commit 36e11b4 into main Jul 7, 2026
1 check passed
@jrosskopf jrosskopf deleted the chore/dead-code-cleanup branch July 7, 2026 18:15
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