1.5 KiB
OpenSpec Change: crypto-hash-spec-conformance
- Change ID: crypto-hash-spec-conformance
- Package:
@suaveplan/crypto-hash - Status: PROPOSED
- Date: 2026-04-26
Summary
Add **Verified by:** lines to every requirement in openspec/specs/crypto-hash/spec.md and pin previously-unverified structural scenarios (package identity, per-primitive replaceability layout, generated *.select.ts banner) with tests/spec-conformance.test.ts. No public-API or behavioural changes.
Current state
@suaveplan/crypto-hash ships SHA-256/384/512, HMAC, HKDF, PBKDF2, Argon2id with the per-primitive replaceability layout (src/primitives/<id>/impl/<id>.{noble,native}.ts plus a generated <id>.select.ts). native-stubs.test.ts, tree-shake.test.ts, and the per-feature unit tests cover behaviour, but the structural scenarios — package name, every primitive having both impl files, generated banner on selectors — were not pinned at runtime, and no requirement carried a **Verified by:** annotation.
What changes
- Annotate every requirement in the folded
openspec/specs/crypto-hash/spec.mdwith a**Verified by:**line citing concrete tests. - Add
tests/spec-conformance.test.tscovering the package-identity and per-primitive layout scenarios. bun scripts/openspec-conformance.ts @suaveplan/crypto-hashexits 0.
Impact
- Public API unchanged.
- One new test file (~85 lines).
openspec/specs/crypto-hash/spec.mdgains 5**Verified by:**blocks.- Coverage stays 100/100/100/100.