Skip to content

feat: schema stability, batch git storage, and pairing protocol extraction#27

Merged
bordumb merged 17 commits intomainfrom
fn-18-19-20
Mar 5, 2026
Merged

feat: schema stability, batch git storage, and pairing protocol extraction#27
bordumb merged 17 commits intomainfrom
fn-18-19-20

Conversation

@bordumb
Copy link
Contributor

@bordumb bordumb commented Mar 5, 2026

Summary

  • Epic 18 (Schema Stability & Fuzzing): Added schema feature flag with JsonSchema derives on contract types, cargo xtask generate-schemas / validate-schemas commands, CI schema drift detection, and fuzz_cesr_import fuzz target with nightly CI workflow
  • Epic 19 (Batch Git Storage): Implemented batch_append_events() on GitRegistryBackend with in-memory state overlay, single-commit atomic writes, and index-aware BatchValidationFailed errors. Added concurrent batch writer tests and batch vs sequential benchmarks
  • Epic 20 (LAN Pairing Protocol Extraction): Created auths-pairing-protocol crate with transport-agnostic protocol logic (no axum/tokio deps), PairingProtocol state machine, ring-direct Ed25519 sign/verify. Converted auths-core::pairing to a re-export facade. Updated publish ordering

Test plan

  • cargo nextest run -p auths-pairing-protocol — protocol unit tests
  • cargo nextest run -p auths-storage -E 'test(batch)' — batch event tests
  • cargo nextest run -p auths-storage -E 'test(concurrent_batch)' — concurrent batch tests
  • cargo xtask generate-schemas && git diff --exit-code schemas/ — schema drift check
  • cargo build -p auths-cli --all-features — CLI still compiles with facade
  • cargo bench -p auths-storage -- batch — batch benchmarks run

bordumb added 11 commits March 5, 2026 10:57
- Add schemars 0.8 as workspace dependency
- Migrate auths-core, xtask, auths-telemetry to workspace schemars dep
- Add schema feature to auths-verifier and auths-keri
- Add JsonSchema derives to Attestation, IdentityBundle, KERI event types
- Manual JsonSchema impls for Ed25519PublicKey/Signature (hex format)
- Regenerate telemetry schema.json for schemars 0.8 format
- Create auths-keri fuzz target for import_cesr_to_events
- Add .github/workflows/fuzz.yml covering all 5 targets across 3 crates
- Nightly schedule with manual dispatch option
- Generate JSON Schema from Attestation, IdentityBundle, IcpEvent types
- Validate fixture JSON files against committed schemas
- Add auths-verifier (schema feature) and jsonschema deps to xtask
- Regenerate schemas and diff against committed files
- Validate test fixtures against schemas
- Fails CI if schemas drift from Rust type definitions
Adds atomic batch event appending with in-memory state overlay,
single-commit writes, and index-aware validation errors.
Concurrent tests verify parallel batch writers, batch+single interleaving,
and CAS failure clarity. Benchmarks compare batch vs sequential for
100-1000 events and mixed-prefix batches.
Transport-agnostic pairing protocol extracted from auths-core. Uses ring
directly for Ed25519 sign/verify (no tokio dependency). DeviceDID replaced
with String, schemars derives removed.
Deletes token.rs, response.rs, types.rs from auths-core. Rewrites mod.rs
to re-export from auths-pairing-protocol. Keeps qr.rs and transport error
variants locally. CLI and SDK compile unchanged.
PairingProtocol provides initiate/complete flow with typed state
transitions. respond_to_pairing helper for responder side. Adds
auths-pairing-protocol to Batch 2 in publish ordering.
@vercel
Copy link

vercel bot commented Mar 5, 2026

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

Project Deployment Actions Updated (UTC)
auths Ready Ready Preview, Comment Mar 5, 2026 0:09am

The cargo alias from .cargo/config.toml isn't picked up in CI.
bordumb added 2 commits March 5, 2026 11:48
…nts in tests

Tests using Ed25519KeyPair::generate_pkcs8(&rng) were taking >60s in CI
because debug-mode entropy reads are expensive. Pre-generated PKCS8 DER
byte arrays eliminate all runtime key generation — from_pkcs8 is just
parsing. Documents the pattern in testing-guide.md.
@bordumb bordumb merged commit ab6891a into main Mar 5, 2026
7 of 8 checks passed
@bordumb bordumb deleted the fn-18-19-20 branch March 8, 2026 00:29
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