Skip to content

refactor: migrate auths-id and auths-core trust from anyhow to thiserror#11

Merged
bordumb merged 8 commits intomainfrom
dev-anyhowToThiserror
Mar 3, 2026
Merged

refactor: migrate auths-id and auths-core trust from anyhow to thiserror#11
bordumb merged 8 commits intomainfrom
dev-anyhowToThiserror

Conversation

@bordumb
Copy link
Copy Markdown
Contributor

@bordumb bordumb commented Mar 3, 2026

Summary

  • Task 1.1: Migrated all 16 files in auths-id from anyhow::Result to domain-specific thiserror enums (FreezeError, StorageError, InitError). Removed anyhow from auths-id dependencies entirely.
  • Task 1.2: Migrated auths-core trust module (pinned.rs, roots_file.rs, continuity.rs, resolve.rs) from anyhow to a new TrustError enum. Updated the KelContinuityChecker trait signature.
  • Updated all downstream consumers: auths-storage adapters, auths-test-utils fakes/mocks, auths-cli verify_attestation
  • Fixed two pre-existing collapsible_if clippy warnings

Test plan

  • All 1358 tests pass (cargo nextest run --workspace)
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo fmt --check --all passes
  • WASM target compiles (cd crates/auths-verifier && cargo check --target wasm32-unknown-unknown --no-default-features --features wasm)

Notes

  • auths-core/src/api/runtime.rs still uses anyhow internally in macOS-gated SSH agent code — it doesn't leak to any public API, left for a follow-up
  • cargo deny failures (banned reqwest via jsonschema) are pre-existing and unrelated to this PR

bordumb added 8 commits March 3, 2026 21:37
…rror

Define FreezeError, StorageError, and InitError enums in new error.rs module.
Migrate all freeze.rs functions from anyhow::Result to FreezeError.
… thiserror

Migrate IdentityStorage, AttestationSource, ReceiptStorage traits and all
Git-backed implementations to use StorageError. Migrate helper functions
in identity/helpers.rs to use IdentityError.
Migrate AttestationSink trait, encoders, load, export, and verify modules
to use StorageError instead of anyhow::Result.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Mar 3, 2026 10:23pm

@bordumb bordumb merged commit 1d03c6c into main Mar 3, 2026
6 checks passed
@bordumb bordumb deleted the dev-anyhowToThiserror branch March 3, 2026 22:24
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