Skip to content

Drop five unused direct dependencies - #100

Merged
aterga merged 1 commit into
mainfrom
claude/drop-dead-deps
Jul 29, 2026
Merged

Drop five unused direct dependencies#100
aterga merged 1 commit into
mainfrom
claude/drop-dead-deps

Conversation

@aterga

@aterga aterga commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes five direct dependency declarations from Cargo.toml that are never referenced anywhere in the codebase. Verified by grep across src/ and tests/, and by a clean --locked build + full test run without them.

This is the dependency-stripping item from the PR #77 scoping doc (§3), landed as an independent cleanup that stands on its own regardless of the local-binary work.

Related issues

Prompted by the dependency audit in #77 (§3). No issue closed.

Changes

  • Drop from [dependencies]:
    • ed25519-dalek — Ed25519 keygen/signing goes through ic-agent's BasicIdentity::from_raw_key, never this crate.
    • p256, ic-signature-verification — the server never verifies delegation signatures itself; the replica verifies every hop at redeem.
    • ic-representation-independent-hash — unreferenced.
    • schemars = "0.8" — vestigial: every JsonSchema derive resolves through use rmcp::schemars (rmcp's re-exported 1.x). rmcp's own schemars re-export is untouched.
  • Cargo.lock: removals only, no version bumps. ic-signature-verification, ic-representation-independent-hash, and their unique transitive deps (ic-canister-sig-creation, ic0) leave the build closure.

Note on the tree: ed25519-dalek and p256 remain transitively via ic-agent, and schemars 0.8 remains via the optional pocket-ic (e2e feature) dep. So for those three, dropping the declaration is direct-dependency hygiene (our code never binds them directly) rather than closure reduction; the default build has zero schemars 0.8 nodes.

Testing

  • cargo build --locked --all-targets
  • cargo test --locked --all-targets (151 + 8 tests pass, 0 failed)
  • cargo fmt --all / cargo clippy --all-targets (tree is warning-free)
  • npm test --prefix monitoring/mcp-status (if the dashboard changed)

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change. (No user-visible change; nothing to document.)
  • No secrets, credentials, or internal-only information are included.

🤖 Generated with Claude Code


Generated by Claude Code

None of these crates are referenced anywhere in the codebase (verified by
grep across src/ and tests/); the default build and the full test suite
pass without them:

- ed25519-dalek: Ed25519 keygen/signing goes through ic-agent's
  BasicIdentity::from_raw_key, never this crate.
- p256, ic-signature-verification: the server never verifies delegation
  signatures itself; the replica verifies every hop at redeem.
- ic-representation-independent-hash: unreferenced.
- schemars 0.8: vestigial. Every JsonSchema derive resolves through
  `use rmcp::schemars` (rmcp's re-exported 1.x); the top-level 0.8 dep is
  never bound. rmcp's own schemars re-export is untouched.

Removing the declarations drops ic-signature-verification and
ic-representation-independent-hash (plus their unique transitive deps
ic-canister-sig-creation and ic0) from the default build closure.
ed25519-dalek and p256 remain in the tree transitively via ic-agent, and
schemars 0.8 remains via the optional pocket-ic (e2e feature) dep, so
removing those three declarations is direct-dependency hygiene rather
than closure reduction.

Cargo.lock updated minimally (removals only, no version bumps).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014T9N8USDfNK5yzznPGg7Ym
@aterga
aterga requested a review from Copilot July 29, 2026 15:39
@aterga
aterga marked this pull request as ready for review July 29, 2026 15:39
@aterga
aterga requested review from a team and sea-snake July 29, 2026 15:39

Copilot AI 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.

Pull request overview

This PR removes five unused direct Rust dependencies from Cargo.toml and updates Cargo.lock accordingly, reducing direct-dependency surface area while keeping the build graph correct via existing transitive/optional dependencies (e.g., via ic-agent and optional pocket-ic).

Changes:

  • Removed unused direct deps from [dependencies]: ed25519-dalek, p256, ic-signature-verification, ic-representation-independent-hash, schemars = "0.8".
  • Pruned now-unreachable crates from Cargo.lock (including ic0 and ic-canister-sig-creation) and removed the dropped crates from this workspace package’s dependency list in the lockfile.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
Cargo.toml Drops unused direct dependency declarations while leaving transitive/optional sources intact.
Cargo.lock Removes lock entries that are no longer reachable after dependency cleanup; no version bumps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aterga
aterga merged commit 0e52fe9 into main Jul 29, 2026
2 checks passed
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.

4 participants