You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor, non-blocking code-quality items surfaced by the K1 (#87) audit and deliberately deferred (correct + gate-green as-is):
rotation::commitment_holds returns Result<bool> that collapses to one reason. Both Err (digest-primitive build failure) and Ok(false) (hash/length mismatch) map to NextKeyCommitmentMismatch at the call site. The Result<bool> shape buys nothing over bool (fail-closed either way); and a digest-engine failure is arguably an internal error, not a commitment mismatch. Simplify to bool, or distinguish the internal-error case.
Test fixture duplication.keri/tests/common/mod.rs has 5+ inception constructors (inception, inception_with_config, inception_with_threshold, inception_with_witnesses, inception_multi), each re-typing the full InceptionBuilder → serialize → deserialize_event chain with one field varied. Same drift risk as the production dedup already fixed — consolidate to one params-struct/base-builder helper.
fold empty-stream reason.fold(None, []) returns RejectionReason::InvalidEvent; an empty iterator with no initial state is a distinct "nothing to fold" condition, not an invalid event. Consider a dedicated reason (the enum is #[non_exhaustive], so additive) — likely folds into the K2 (K2 · Escrow decision engine — pure EscrowReason verdicts (no tables, no timers) #88) taxonomy work.
All three are taste/quality, not correctness. #1/#2 are self-contained; #3 pairs with #88.
Minor, non-blocking code-quality items surfaced by the K1 (#87) audit and deliberately deferred (correct + gate-green as-is):
rotation::commitment_holdsreturnsResult<bool>that collapses to one reason. BothErr(digest-primitive build failure) andOk(false)(hash/length mismatch) map toNextKeyCommitmentMismatchat the call site. TheResult<bool>shape buys nothing overbool(fail-closed either way); and a digest-engine failure is arguably an internal error, not a commitment mismatch. Simplify tobool, or distinguish the internal-error case.Test fixture duplication.
keri/tests/common/mod.rshas 5+ inception constructors (inception,inception_with_config,inception_with_threshold,inception_with_witnesses,inception_multi), each re-typing the fullInceptionBuilder → serialize → deserialize_eventchain with one field varied. Same drift risk as the production dedup already fixed — consolidate to one params-struct/base-builder helper.foldempty-stream reason.fold(None, [])returnsRejectionReason::InvalidEvent; an empty iterator with no initial state is a distinct "nothing to fold" condition, not an invalid event. Consider a dedicated reason (the enum is#[non_exhaustive], so additive) — likely folds into the K2 (K2 · Escrow decision engine — pure EscrowReason verdicts (no tables, no timers) #88) taxonomy work.All three are taste/quality, not correctness. #1/#2 are self-contained; #3 pairs with #88.
Spawned from #87 (K1) audit, 2026-07-06.