Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# OpenSpec Change: crypto-utils-spec-conformance
- **Change ID**: crypto-utils-spec-conformance
- **Package**: `@suaveplan/crypto-utils`
- **Status**: PROPOSED
- **Date**: 2026-04-26
## Summary
Add `**Verified by:**` lines to every requirement in `openspec/specs/crypto-utils/spec.md` and pin the previously-unverified "No vendored code" structural scenario with `src/no-vendored.spec-conformance.test.ts`. No public-API or behavioural changes.
## Current state
`@suaveplan/crypto-utils` ships its full surface (encoding delegation, byte helpers, constant-time equality, random bytes, zeroize, KAT/diff-fuzz harnesses, Merkle helpers, primitive-id registry, `PrimitiveNotImplemented`) with 100% coverage. The spec was authored without the `**Verified by:**` annotation mandated by `openspec/AGENTS.md` Section 13, and the "No vendored code" requirement asserted a tree-structure invariant with no test pinning it.
## What changes
1. Annotate every requirement in the folded `openspec/specs/crypto-utils/spec.md` with a `**Verified by:**` line citing concrete `src/**/*.test.ts::"<it title>"` pairs.
2. Add `src/no-vendored.spec-conformance.test.ts` to pin the "src/ contains no vendored directory" structural scenario at runtime.
3. `bun scripts/openspec-conformance.ts @suaveplan/crypto-utils` exits 0.
## Impact
- Public API unchanged.
- One new test file (~30 lines).
- `openspec/specs/crypto-utils/spec.md` gains 6 `**Verified by:**` blocks.
- Coverage stays 100/100/100/100.

View File

@@ -0,0 +1,23 @@
# Capability Spec Delta: crypto-utils (spec-conformance)
**Package**: `@suaveplan/crypto-utils`
**Status**: PROPOSED
This delta annotates each existing requirement in `openspec/specs/crypto-utils/spec.md` with a `**Verified by:**` line. No requirement semantics change.
## MODIFIED Requirements
(See `openspec/specs/crypto-utils/spec.md` for the full requirement bodies; this delta only records the verification mapping.)
| Requirement | Verified by |
|---|---|
| Pure-composition utility surface | `src/encoding/hex/hex.test.ts` AND `src/encoding/base64/base64.test.ts` AND `src/encoding/base58/base58.test.ts` |
| Encoding delegation to @suaveplan/bytes | `src/encoding/hex/hex.test.ts` AND `src/encoding/base64/base64.test.ts` AND `src/bytes/concat-bytes/concat-bytes.test.ts` AND `src/bytes/xor/xor.test.ts` AND `src/bytes/i2osp/i2osp.test.ts` AND `src/bytes/os2ip/os2ip.test.ts` AND `src/constant-time/constant-time-equal/constant-time-equal.test.ts` AND `src/random/random-bytes/random-bytes.test.ts` AND `src/zeroize/zeroize.test.ts` |
| Test-vector and fuzz harness | `src/testing/run-vectors/run-vectors.test.ts` AND `src/testing/diff-fuzz/diff-fuzz.test.ts` AND `src/errors/primitive-not-implemented.test.ts` |
| Primitive id registry | `src/primitive-id/primitive-id.test.ts` |
| No vendored code | `src/no-vendored.spec-conformance.test.ts` |
| Merkle helpers | `src/merkle/merkle-root/merkle-root.test.ts` AND `src/merkle/merkle-proof/merkle-proof.test.ts` |
## Newly added tests in this change
- `src/no-vendored.spec-conformance.test.ts` — pins the "src/ contains no vendored directory" structural scenario.

View File

@@ -0,0 +1,7 @@
# Tasks — crypto-utils-spec-conformance
- [x] Add `**Verified by:**` line to every `### Requirement:` block in `openspec/specs/crypto-utils/spec.md`.
- [x] Add `src/no-vendored.spec-conformance.test.ts` pinning the "no vendored directory" scenario.
- [x] Confirm `bun scripts/openspec-conformance.ts @suaveplan/crypto-utils` exits 0.
- [x] Confirm `bunx turbo lint typecheck test --filter=@suaveplan/crypto-utils` is green.
- [x] Confirm `bunx turbo test:coverage --filter=@suaveplan/crypto-utils` reports 100/100/100/100.