Skip to content

refactor(#96)!: K0 — convert to workspace + keri-rs sibling crate#126

Merged
joeldsouzax merged 13 commits into
mainfrom
feat-96-workspace-conversion-keri
Jul 5, 2026
Merged

refactor(#96)!: K0 — convert to workspace + keri-rs sibling crate#126
joeldsouzax merged 13 commits into
mainfrom
feat-96-workspace-conversion-keri

Conversation

@joeldsouzax

Copy link
Copy Markdown
Contributor

Closes #96 (K0 · KERI sans-io core). Converts the single-crate repo into a two-crate Cargo workspace so the KERI sans-io core (K1–K9) can develop in a sibling crate that versions independently — protecting cesr-rs's frozen surface (STABILITY.md #86) from KERI-state churn.

BREAKING (repo layout only): the cesr source moved from repo root into cesr/. The published cesr-rs crate surface is byte-for-byte unchanged (verified: spec review hashed every moved file).

What changed

  • cesr/ — the entire crate, moved via git mv (100% renames, history preserved). Now inherits [workspace.package]/[workspace.lints]; only manifest metadata changed.
  • keri/ — new keri-rs (lib name keri), an empty K0 skeleton: no_std, std optional (alloc is a floor), public-API-only dep on cesr, and a link-test proving it binds cesr's public surface. No KERI logic (that's K1+).
  • Root Cargo.toml — pure virtual [workspace] (members = ["cesr","keri"], resolver = "3"), with nexus-style [workspace.package]/[workspace.dependencies]/[workspace.lints]/[workspace.metadata.crane]. Top-level layout (not nexus's crates/), no workspace-hack.
  • flake.nix — whole-workspace clippy; wasm/nostd build both crates by package; new cesr-keri-boundary check.
  • release-plzkeri-rs package added (independent versioning).
  • Scheduled/release workflows — repointed to cesr/ (see below).

The API boundary is (mostly) free

Rust's per-crate visibility already forbids keri from reaching cesr's non-pub items — it won't compile. The only back-door is enabling cesr's internals/test-utils features, so cesr-keri-boundary is a one-line grep. Bug-probe verified it fails when internals is injected and passes after revert.

Modeled on nexus

Adopted [workspace.dependencies]/[workspace.package]/[workspace.lints]/[workspace.metadata.crane] and whole-workspace clippy+nextest. Diverged deliberately: top-level layout, no workspace-hack.

Prerequisite already done

keri-rs@0.0.1 is reserved + owned on crates.io (via #97's reserve-crate workflow).

Test plan

  • nix flake check GREEN — all checks across BOTH crates (clippy --workspace, nextest 1777 tests, wasm, no_std, doctest, fuzz-replay, and cesr-keri-boundary).
  • cargo publish --dry-run clean for both cesr-rs and keri-rs (independent releases).
  • Source integrity: every moved file byte-identical (blob-hash verified); lint tables verbatim (no relaxation).
  • Boundary gate bug-probe: fails on internals, passes on revert.
  • Stale-path sweep of scheduled/release workflows (the local gate can't see these):
    • release-plz.yml paths:cesr/** + keri/** (was src/**, which would have stalled releases)
    • keripy-diff.yml / keripy-sync.yml → repointed to cesr/ (were false-green / bogus-report)

Review discipline caught (each invisible to the layer below)

  • resolver = "3" (edition-2024 default) — code-quality review
  • keri alloc-floor + dropped premature pub use cesr (semver coupling) — code-quality review
  • three stale-path CI bugs in scheduled workflows — final holistic review

Design + plan: docs/superpowers/specs/2026-07-05-96-... and docs/superpowers/plans/2026-07-05-96-....

🤖 Generated with Claude Code

joeldsouzax and others added 13 commits July 5, 2026 20:15
Symmetric cesr/ + keri/ workspace; keri-rs already reserved (owned). K0 is
pure infra: git-mv cesr into cesr/, empty keri crate under the god-level
harness, workspace-shared lints, flake covers both, compiler+grep API gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ayout)

Adopt nexus's [workspace.dependencies]/[workspace.package]/[workspace.lints]/
[workspace.metadata.crane] and whole-workspace clippy+nextest. Keep the
top-level cesr/ + keri/ layout (not nexus's crates/); no workspace-hack.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Four tasks: workspace + git-mv cesr into cesr/; empty keri skeleton with
public-API link test; flake covers both (per-crate wasm/nostd); release-plz +
boundary grep-gate + docs. Placeholder-free; verified public API paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Root becomes a virtual [workspace] manifest (members = ["cesr"]) with
workspace-shared package/deps/lints/crane metadata (nexus patterns, top-level
layout). cesr's source moves via git mv with a byte-identical public surface;
lints inherited via [lints] workspace = true. Fuzz path deps re-pointed to
../cesr. BREAKING: repo layout only — the cesr-rs crate surface is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
resolver 3 is the edition-2024 default (MSRV-aware) — preserves standalone
cesr's resolution. The git-mv of README into cesr/ left 7 relative links
pointing at root-level files; prepend ../ so they resolve.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
keri-rs (lib name keri) joins the workspace as an infrastructure-only skeleton:
no_std scaffolding, std/alloc features forwarding to cesr, a public re-export of
cesr, and a test proving it links cesr's PUBLIC API. No KERI logic (that is K1+).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cesr's core feature requires alloc unconditionally, so keri has no no-alloc
mode: request core+alloc from the dep and drop keri's misleading optional
alloc feature (only std stays optional). Remove pub use cesr — premature
public API that coupled keri-rs's semver to cesr-rs churn; the link test
resolves cesr via the extern prelude, not the re-export.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…asm/nostd

Whole-workspace clippy; wasm/nostd checks build both cesr-rs and keri-rs by
package (--features is illegal at a virtual root). keri now rides the full gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…I boundary

release-plz gains the keri-rs package (independent versioning). A flake check
fails if keri/Cargo.toml enables cesr's internals/test-utils features (the only
back-door past the compiler's per-crate visibility). CLAUDE.md notes the workspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The workspace move left three workflows pointing at the old root layout —
invisible to nix flake check, they'd fail silently in CI:
- release-plz paths: src/** never matched cesr/src/** → releases stalled;
  now cesr/** + keri/**.
- keripy-diff regenerated corpus into root tests/ (false-green parity vs the
  real cesr/tests/corpus/keripy) → both paths now cesr/tests/corpus/keripy.
- keripy-sync --cesr . skipped all relocated files (bogus zero-codes report)
  → --cesr ./cesr.
Also hash cesr/keri Cargo.toml in the nix cache keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codspeed-hq

codspeed-hq Bot commented Jul 5, 2026

Copy link
Copy Markdown

Merging this PR will create unknown performance changes

🆕 21 new benchmarks
⏩ 21 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 base64_decode[1024B_attachment] N/A 6 µs N/A
🆕 base64_decode[32B_key_digest] N/A 1.6 µs N/A
🆕 base64_decode[64B_signature] N/A 1.6 µs N/A
🆕 base64_encode[1024B_attachment] N/A 4.8 µs N/A
🆕 base64_encode[32B_key_digest] N/A 1 µs N/A
🆕 base64_encode[64B_signature] N/A 1.1 µs N/A
🆕 v1_auto_big N/A 2.9 µs N/A
🆕 v1_small N/A 2.9 µs N/A
🆕 controller_idx_sigs_1sig N/A 4.1 µs N/A
🆕 qb2_to_qb64 N/A 1.6 µs N/A
🆕 qb64_to_qb2 N/A 1.7 µs N/A
🆕 blake3_256_fixed N/A 4.6 µs N/A
🆕 ed25519n_fixed N/A 4.6 µs N/A
🆕 strb64_l0_variable N/A 4.2 µs N/A
🆕 blake3_256_to_qb64 N/A 3.5 µs N/A
🆕 ed25519n_to_qb64 N/A 3.5 µs N/A
🆕 multi_group_controller_witness N/A 5.7 µs N/A
🆕 stream_parse_scaling[1] N/A 4.9 µs N/A
🆕 stream_parse_scaling[16] N/A 15.3 µs N/A
🆕 stream_parse_scaling[256] N/A 178.3 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing feat-96-workspace-conversion-keri (a9230fa) with main (c8c3e1f)

Open in CodSpeed

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@joeldsouzax joeldsouzax merged commit 8faf304 into main Jul 5, 2026
6 checks passed
@joeldsouzax joeldsouzax deleted the feat-96-workspace-conversion-keri branch July 5, 2026 20:33
@devrandom-release-plz devrandom-release-plz Bot mentioned this pull request Jul 5, 2026
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.

K0 · Workspace conversion: sibling keri crate (publish as keri-rs — reserve NOW) + shared infra

1 participant