Background
ADR 005 (PR #9, branch 1-1-4-record-seeded-prng-choice) ratifies a canonicalisation contract for contentHash computation and a semantic-version migration policy for parameter packs, but defers all implementation — including test coverage — to later roadmap items (principally 1.3.2, 1.4.x, and 2.4.3).
A review check flagged that the decision record specifies determinism, canonicalisation, and migration invariants without documenting a property-test strategy. Golden-vector snapshot tests are proposed for the PRNG but no equivalent is proposed for:
- Canonicalisation rules (key ordering, numeric-subset extraction, field exclusion, whitespace normalisation, NaN/Infinity rejection, duplicate-key rejection)
- Migration policy conditions (PATCH rebind predicate, MINOR upgrade eligibility, MAJOR quarantine trigger)
Required work
- When roadmap item 1.3.2 lands (
ParameterPack type and contentHash serialiser): author fast-check property tests that assert:
- Canonicalisation is stable under arbitrary key-insertion order
- Numeric-subset extraction is byte-identical for semantically equal numeric values
- NaN, Infinity, and
undefined fields are rejected deterministically
- Round-trip:
canonicalize(pack) === canonicalize(canonicalize(pack))
- When roadmap item 1.4.x lands (Dexie schema and migration transforms): author property tests that assert:
- PATCH rebind predicate returns
true iff canonical numeric subsets are byte-identical
- MINOR upgrade prompt is triggered iff MAJOR segment is equal and numeric subsets differ
- MAJOR quarantine is triggered iff MAJOR segment differs
- Sequential transform application is order-deterministic
References
Raised by @leynos via code-review check on PR #9.
Background
ADR 005 (PR #9, branch
1-1-4-record-seeded-prng-choice) ratifies a canonicalisation contract forcontentHashcomputation and a semantic-version migration policy for parameter packs, but defers all implementation — including test coverage — to later roadmap items (principally 1.3.2, 1.4.x, and 2.4.3).A review check flagged that the decision record specifies determinism, canonicalisation, and migration invariants without documenting a property-test strategy. Golden-vector snapshot tests are proposed for the PRNG but no equivalent is proposed for:
Required work
ParameterPacktype andcontentHashserialiser): authorfast-checkproperty tests that assert:undefinedfields are rejected deterministicallycanonicalize(pack) === canonicalize(canonicalize(pack))trueiff canonical numeric subsets are byte-identicalReferences
docs/adr-005-use-deterministic-simulation-and-parameter-packs.mddocs/roadmap.mdRaised by @leynos via code-review check on PR #9.