chore(workspace): remove folded internal shim crates#602
Conversation
Removes 29 fully-folded published-internal compatibility shim crates that v0.7.x carried as one-minor-release re-export shells over content already owned by the public crates' `srp::*` modules. This is PR-4 of the v0.8.0 SRP collapse lane and is a BREAKING change for downstream consumers that pinned the shim crate names directly. Scope (29 crates removed) Core internals (11) -> uselesskey_core::srp::*: - uselesskey-core-cache, -factory, -hash, -id, -seed, -sink - uselesskey-core-keypair, -keypair-material - uselesskey-core-negative, -negative-der, -negative-pem JWK internals (5) -> uselesskey_jwk::srp::*: - uselesskey-core-kid, -jwk, -jwk-builder, -jwk-shape, -jwks-order Token internals (4) -> uselesskey_token::srp::*: - uselesskey-core-base62, -token, -token-shape, uselesskey-token-spec X.509 internals (5) -> uselesskey_x509::srp::*: - uselesskey-core-x509, -x509-spec, -x509-derive, -x509-negative, -x509-chain-negative Folded standalones (3): - uselesskey-core-hmac-spec -> uselesskey_hmac::srp::spec (content moved in v0.7.2 via #595; shim removed here) - uselesskey-core-rustls-pki -> uselesskey_rustls::srp::pki (content moved in v0.7.2 via #598; shim removed here) - uselesskey-pgp-native -> uselesskey_pgp::native (feature = "native"; content moved in v0.7.2 via #599; shim removed here) Conditional duplicate (1): - uselesskey-jose-openid was byte-equal to uselesskey_jsonwebtoken::JwtKeyExt; consumers should depend on uselesskey-jsonwebtoken directly. Why The v0.7.x line shipped each fold (#595, #598, #599 and predecessors) with the shim crate retained as a published-internal re-export so v0.7.x downstreams kept compiling for one minor release. v0.8.0 removes the shims per the SRP collapse plan; crate-surface contracts at the module boundary instead of the crate boundary. The published surface goes from 51 to 22 public + 3 workspace-internal. Migration Downstream consumers should: - Replace `uselesskey-core-<x>` imports with `uselesskey_core::srp::<x>` - Replace `uselesskey-core-jwk*` / `-kid` / `-jwks-order` with `uselesskey_jwk` - Replace `uselesskey-token-spec` / `-core-base62` / `-core-token*` with `uselesskey_token` and its `srp::*` modules - Replace `uselesskey-core-x509*` with `uselesskey_x509::srp::*` - Replace `uselesskey-core-hmac-spec` with `uselesskey_hmac::srp::spec` - Replace `uselesskey-core-rustls-pki` with `uselesskey_rustls::srp::pki` - Replace `uselesskey-pgp-native` with `uselesskey-pgp` `features = ["native"]` - Replace `uselesskey-jose-openid::JoseOpenIdKeyExt` with `uselesskey_jsonwebtoken::JwtKeyExt` A full crate-to-module mapping table will land in docs/how-to/migrate-from-v0.7.md (PR-5). What this PR touches - Removes 29 crate directories from `crates/`. - Updates the workspace `Cargo.toml` `[workspace] members` and `[workspace.dependencies]` to drop the removed names. - Updates `xtask` PUBLISH_CRATES, MUTANT_CRATES, dependents() map, `compatibility_shim_owner` callsite, `is_adapter_crate` allowlist, and the public-surface internal-shard guard. - Removes the `is_adapter_crate` jose-openid / pgp-native entries. - Removes obsolete plan.rs tests that pinned per-shim impact propagation. - Migrates internal callers (`uselesskey-rsa/-ecdsa/-ed25519` keypair.rs, `uselesskey-bdd-steps`, all `fuzz/fuzz_targets/*.rs`) to canonical owner-crate `srp::*` paths. - Regenerates `docs/metadata/workspace-docs.json`, the support matrix, and the public-surface survey. - Resets `policy/no-panic-baseline.toml` to reflect the new module topology (deleted crate paths drop out; their canonical owner-crate paths are now the only home of the same panic-family findings). - Notes the cleanup in `CHANGELOG.md` `[Unreleased] Removed`, `AGENTS.md`, `CLAUDE.md`, and `docs/explanation/architecture.md`. Cross-refs: #595 (HmacSpec fold), #598 (rustls-pki fold), #599 (pgp-native fold) shipped the content moves; this PR removes the now-empty shim crates. Validation - `cargo check --workspace --all-targets --all-features` clean. - `cargo test --workspace --all-features --exclude uselesskey-bdd --no-run` clean. - `cargo fmt --check` clean. - `cargo clippy --workspace --all-targets --all-features -- -D warnings` clean (only `aws-lc-rs` build-script `NASM found` informational note). - `cargo xtask public-surface` clean: 35 workspace crates (17 public + 7 adapter + 11 workspace-only; 0 published-internals remaining). - `cargo xtask docs-sync --check` clean. - `cargo xtask check-file-policy` clean (844 files matched, 0 unmatched). - `cargo xtask no-blob` clean. - `cargo xtask typos` clean. - `cargo xtask publish-preflight` clean through every step except the expected uncommitted-tree check. - `cargo test -p xtask -- --test-threads=1` all 245 tests pass; one pre-existing parallel-mode CWD test-isolation flake is unrelated to this PR.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Important Review skippedToo many files! This PR contains 197 files, which is 47 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (103)
📒 Files selected for processing (197)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0dd0b10b3
ℹ️ 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".
| uselesskey-core = { path = "../crates/uselesskey-core" } | ||
| uselesskey-jwk = { path = "../crates/uselesskey-jwk" } | ||
| uselesskey-core-jwks-order = { path = "../crates/uselesskey-core-jwks-order" } | ||
| uselesskey-core-keypair-material = { path = "../crates/uselesskey-core-keypair-material" } | ||
| uselesskey-core-factory = { path = "../crates/uselesskey-core-factory" } | ||
| uselesskey-core-hash = { path = "../crates/uselesskey-core-hash" } | ||
| uselesskey-core-id = { path = "../crates/uselesskey-core-id" } | ||
| uselesskey-core-kid = { path = "../crates/uselesskey-core-kid" } | ||
| uselesskey-token = { path = "../crates/uselesskey-token" } |
There was a problem hiding this comment.
Update fuzz targets to use owner-crate modules
When the fuzz workflow runs, it enumerates every .rs under fuzz/fuzz_targets, but targets such as core_x509_negative.rs, jwk_shape.rs, and core_hash.rs still import the removed shim crates (uselesskey_core_x509_negative, uselesskey_core_jwk_shape, etc.). Because this manifest now only adds the owner crates here, cargo check --manifest-path fuzz/Cargo.toml --bins fails with unresolved imports, so cargo xtask fuzz/CI fuzz cannot run until those target imports are migrated.
Useful? React with 👍 / 👎.
PR #602 removed 29 shim crates but missed updating the xtask pr step's per-crate test target list. CI hit `error: cannot specify features for packages outside of workspace` for `uselesskey-core-base62`. Update the test-targets list to match the post-deletion workspace. The impacted-crates set is derived from the path components of changed files (`crates/<name>/...`); paths to deleted crates still appear in the diff and leaked into the test target list. Filter the list to crates whose `crates/<name>/Cargo.toml` still exists in the worktree, naturally dropping any crate the PR deletes. Add unit tests covering the deleted-shim and stale-dir cases.
The shim deletion PR caught 24 of the fuzz targets but left 24 others
still importing the removed crate names (core_factory_cache,
core_x509_negative, fuzz_factory_concurrent, etc.), which broke
`cargo fuzz build`.
Re-point every remaining fuzz target at canonical owner-crate paths:
- uselesskey-core-factory -> uselesskey_core::Factory
- uselesskey-core-id -> uselesskey_core::{ArtifactId, DerivationVersion, Seed}
+ uselesskey_core::srp::identity::derive_seed
- uselesskey-core-hash -> uselesskey_core::srp::hash::*
- uselesskey-core-keypair-material
-> uselesskey_core::srp::keypair_material::*
- uselesskey-core-negative-pem
-> uselesskey_core::negative::*
- uselesskey-core-token-shape
-> uselesskey_token::srp::shape::*
- uselesskey-core-kid -> uselesskey_jwk::srp::kid::*
- uselesskey-core-jwk-shape
-> uselesskey_jwk::{AnyJwk, Jwks, ...}
- uselesskey-core-jwks-order
-> uselesskey_jwk::srp::ordering::*
- uselesskey-core-x509-spec / x509-negative
-> uselesskey_x509::{X509Spec, ChainSpec,
X509Negative, ChainNegative, KeyUsage,
NotBeforeOffset}
The test invoked `cargo metadata` without --manifest-path. When run in parallel with other xtask tests that change CWD, cargo metadata could not locate the working directory. Pass --manifest-path derived from CARGO_MANIFEST_DIR so the test is deterministic under --test-threads > 1.
The prior --manifest-path fix wasn't sufficient because cargo's working-directory lookup happens before it reads --manifest-path. When a parallel test deletes its tempdir, the process CWD becomes invalid and cargo aborts with "Could not locate working directory" before even seeing the --manifest-path arg. Explicitly set Command::current_dir to the workspace root so cargo does not depend on the process CWD at all.
Why
Completes the v0.8.0 SRP collapse. v0.7.x shipped each fold (#595, #598, #599 and the earlier core/jwk/token/x509 lane folds) with the published-internal shim crate retained as a re-export shell so v0.7.x downstreams kept compiling for one minor release. v0.8.0 removes the now-empty shim shells per the SRP collapse plan: crate-surface contracts at the module boundary instead of the crate boundary. The published surface goes from 51 to 22 public + 3 workspace-internal.
This is a breaking change for downstream consumers that pinned the shim crate names directly. The CHANGELOG
[Unreleased] Removedsection enumerates each removed crate alongside its canonical owner-cratesrp::*module; a full crate-to-module migration guide lands separately in PR-5 atdocs/how-to/migrate-from-v0.7.md.What
29 published-internal compatibility shim crates removed:
Core internals (11) — canonical home:
uselesskey_core::srp::*uselesskey-core-cache,-factory,-hash,-id,-seed,-sinkuselesskey-core-keypair,-keypair-materialuselesskey-core-negative,-negative-der,-negative-pemJWK internals (5) — canonical home:
uselesskey_jwk::srp::*uselesskey-core-kid->uselesskey_jwk::srp::kiduselesskey-core-jwk->uselesskey_jwkuselesskey-core-jwk-builder->uselesskey_jwk::JwksBuilderuselesskey-core-jwk-shape->uselesskey_jwk::srp::shapeuselesskey-core-jwks-order->uselesskey_jwk::srp::orderingToken internals (4) — canonical home:
uselesskey_token::srp::*uselesskey-core-base62->uselesskey_token::srp::base62uselesskey-core-token,-token-shape->uselesskey_token::srp::shapeuselesskey-token-spec->uselesskey_token::srp::specX.509 internals (5) — canonical home:
uselesskey_x509::srp::*uselesskey-core-x509->uselesskey_x509::srp::policyuselesskey-core-x509-spec->uselesskey_x509::srp::specuselesskey-core-x509-derive->uselesskey_x509::srp::deriveuselesskey-core-x509-negative->uselesskey_x509::srp::negativeuselesskey-core-x509-chain-negative->uselesskey_x509::srp::chain_negativeFolded standalones (3) — content moved in v0.7.2; shim shells removed here
uselesskey-core-hmac-spec->uselesskey_hmac::srp::spec(refactor(hmac): fold core-hmac-spec content into uselesskey-hmac::srp::spec #595)uselesskey-core-rustls-pki->uselesskey_rustls::srp::pki(refactor(rustls): fold core-rustls-pki content into uselesskey-rustls::srp::pki #598)uselesskey-pgp-native->uselesskey_pgp::native(feature ="native") (refactor(pgp): fold uselesskey-pgp-native content into uselesskey-pgp::native #599)Conditional duplicate (1)
uselesskey-jose-openid(byte-equal touselesskey_jsonwebtoken::JwtKeyExt) ->uselesskey-jsonwebtokendirect dependencyInternal migrations performed in this PR
uselesskey-rsa,uselesskey-ecdsa,uselesskey-ed25519keypair.rs->uselesskey_core::srp::keypair_material::Pkcs8SpkiKeyMaterial.uselesskey-bdd-stepsstep files -> canonical owner-cratesrp::*paths;Cargo.tomlfeatures collapsed to depend on owner crates.fuzz/Cargo.tomland allfuzz/fuzz_targets/*.rs-> canonical owner-crate paths.xtask/src/main.rs:PUBLISH_CRATES/MUTANT_CRATEStrimmed;compatibility_shim_ownerremoved;is_adapter_cratedrops jose-openid / pgp-native.xtask/src/plan.rs:dependents()map and per-shim impact-propagation tests purged.xtask/src/public_surface.rs:LEGACY_INTERNAL_SHARDSreduced to an empty marker guard so any future re-introduction is rejected.xtask/src/policy.rs: fixed athen_someeager-evalusizeunderflow that surfaced once the baseline had to be regenerated.Out of scope
docs/how-to/migrate-from-v0.7.md).Validation
cargo check --workspace --all-targets --all-featuresclean.cargo test --workspace --all-features --exclude uselesskey-bdd --no-runclean.cargo fmt --checkclean.cargo clippy --workspace --all-targets --all-features -- -D warningsclean (only the existingaws-lc-rsbuild-scriptNASM foundinformational note).cargo xtask public-surfaceclean: 35 workspace crates (17 public promises, 7 adapter promises, 0 published-internals, 11 workspace-only).cargo xtask docs-sync --checkclean.cargo xtask check-file-policyclean (844 files matched, 0 unmatched).cargo xtask no-blobclean.cargo xtask typosclean.cargo xtask publish-preflightclean through every step except the expected uncommitted-tree check.cargo test -p xtask -- --test-threads=1all 245 tests pass; one pre-existing parallel-mode CWD test-isolation flake is unrelated to this PR.Cross-refs
HmacSpeccontent moved touselesskey_hmac::srp::spec.core-rustls-pkicontent moved touselesskey_rustls::srp::pki.pgp-nativecontent moved touselesskey_pgp::native.This PR removes the now-empty shim shells those PRs left in place.
Test plan
-D warnings, tests, public-surface, docs-sync, file-policy, no-blob, typos, publish-preflight).cargo doc --workspace --no-depsbuilds (post-merge release-evidence step).