# Capability Spec Delta: serialization (spec-conformance) **Package**: `@suaveplan/serialize` **Status**: PROPOSED This delta annotates each existing requirement in `openspec/specs/serialization/spec.md` with a `**Verified by:**` line. No requirement semantics change. ## MODIFIED Requirements (See `openspec/specs/serialization/spec.md` for the full requirement bodies; this delta records the verification mapping.) | Requirement | Verified by | |---|---| | SZ-01 — Eval-safe by default | `tests/tree-shake.test.ts::"dist/index.js does not reference serialize-javascript"` AND `tests/tree-shake.test.ts::"package.json has sideEffects: false"` | | SZ-02 — Round-trip fidelity for built-in types | `src/codec/json/json-encode.test.ts::"Date round-trips"` AND `src/codec/json/json-encode.spec-conformance.test.ts::"Int8Array round-trips through serialize/deserialize"` (and the other six typed-array cases) | | SZ-03 — Tagged JSON format | `src/codec/json/json-encode.spec-conformance.test.ts::"Date encodes to { __t: '__Date', v: } envelope"` | | SZ-04 — Cycle detection | `src/codec/json/json-encode.test.ts::"circular reference throws CircularReferenceError"` AND `src/codec/json/json-encode.property.test.ts::"object with self-reference always throws CircularReferenceError"` | | SZ-05 — Type registry | `src/registry/registry.test.ts::"is idempotent for same tag + ctor"` AND `src/registry/registry.test.ts::"throws DUPLICATE_TAG for same tag + different ctor"` | | SZ-06 — MessagePack profile | `src/codec/msgpack/msgpack.test.ts::"plain object round-trips"` AND `src/codec/msgpack/msgpack-encode.spec-conformance.test.ts::"encodeBinary produces byte-identical output for the same structured input"` | | SZ-07 — Streaming | `src/codec/stream/stream.test.ts::"small value round-trips"` AND `src/codec/stream/stream.test.ts::"already-aborted signal causes stream error"` | | SZ-08 — Unsafe subpath isolation | `tests/tree-shake.test.ts::"dist/index.js does not reference serialize-javascript"` | | SZ-09 — Structured errors | `src/errors/serialize-error.test.ts::"can switch on code for all error types"` | | SZ-10 — Zod schemas for options | follow-up change `serialize-schema-validation` (schemas exported; boundary `.parse()` wiring deferred — gap visible at every conformance audit until rectified) | | SZ-11 — OTel instrumentation | follow-up change `serialize-otel-instrumentation` (histogram + counter not yet emitted — gap visible at every conformance audit until rectified) | | SZ-12 — sideEffects: false + coverage 100% | `tests/tree-shake.test.ts::"package.json has sideEffects: false"` + coverage gate (Vitest thresholds in `vitest.config.ts`) | ## Newly added tests in this change - `src/codec/json/json-encode.spec-conformance.test.ts` — pins SZ-02 typed-array end-to-end round-trip and SZ-03 envelope-shape contract. - `src/codec/msgpack/msgpack-encode.spec-conformance.test.ts` — pins SZ-06 byte-identical output for structurally identical inputs.