1.6 KiB
OpenSpec Change: crypto-curve-spec-conformance
- Change ID: crypto-curve-spec-conformance
- Package:
@suaveplan/crypto-curve - Status: PROPOSED
- Date: 2026-04-26
Summary
Add **Verified by:** lines to every requirement in openspec/specs/crypto-curve/spec.md and pin previously-unverified structural scenarios (per-primitive replaceability, GENERATED-banner check, Phase-0.5 consistency gate, dangerous-tier flip-gate runtime reflection, native-stub state) with tests/spec-conformance.test.ts. No public-API or behavioural changes.
Current state
@suaveplan/crypto-curve ships secp256k1, ed25519, x25519, p256 with the per-primitive replaceability layout. Each primitive has a noble.ts (active) and a native.ts stub that throws PrimitiveNotImplemented. Per-feature unit tests cover sign/verify, ECDH, RFC vectors, malformed-input rejection, and verify boolean contract. The structural scenarios (impl-file presence, GENERATED banner, vendored noble Phase-0.5 gate, dangerous-tier flip gate, constant-time stub state) were not pinned, and no requirement carried a **Verified by:** annotation.
What changes
- Annotate every requirement in the folded
openspec/specs/crypto-curve/spec.mdwith a**Verified by:**line. - Add
tests/spec-conformance.test.tscovering layout, banner, Phase-0.5 consistency, native-stub state, and the dangerous-tier runtime reflection. bun scripts/openspec-conformance.ts @suaveplan/crypto-curveexits 0.
Impact
- Public API unchanged.
- One new test file (~120 lines).
openspec/specs/crypto-curve/spec.mdgains 5**Verified by:**blocks.- Coverage stays 100/100/100/100.