Render gate: hash-based canonical comparison (depends on #52)
Context
After #52 lands, the rendered SVG no longer contains ULIDs. Canonical hashing becomes deterministic by construction. This issue replaces the current string-equality snapshot comparison with SHA-256 hash comparison of canonicalized output.
Fixes the v0.9.109 false-pass bug: 15 empty snapshot files + empty captures = '' === '' = green gate.
Dependency
Design
[... same content as the v2 spec I drafted previously: compareLayer() extraction, KNOWN_EMPTY_HASH compute-on-load, try/catch discipline, response shape symmetry, .hash/.svg file pair layout, Suite 16 unit tests for compareLayer, migration steps ...]
One simplification vs. the earlier spec: normalizeIds() is removed entirely in this issue, not kept as a pre-pass. After #52, there is nothing to normalize. The pipeline becomes:
capture → canonicalize → sha256 → compare
No normalizeIds step. Dead code gets deleted in the same commit.
Render gate: hash-based canonical comparison (depends on #52)
Context
After #52 lands, the rendered SVG no longer contains ULIDs. Canonical hashing becomes deterministic by construction. This issue replaces the current string-equality snapshot comparison with SHA-256 hash comparison of canonicalized output.
Fixes the v0.9.109 false-pass bug: 15 empty snapshot files + empty captures =
'' === ''= green gate.Dependency
./sequence-builder.canonicalize.jsexports{ canonicalize }Design
[... same content as the v2 spec I drafted previously: compareLayer() extraction, KNOWN_EMPTY_HASH compute-on-load, try/catch discipline, response shape symmetry, .hash/.svg file pair layout, Suite 16 unit tests for compareLayer, migration steps ...]
One simplification vs. the earlier spec:
normalizeIds()is removed entirely in this issue, not kept as a pre-pass. After #52, there is nothing to normalize. The pipeline becomes:No
normalizeIdsstep. Dead code gets deleted in the same commit.