Skip to content

Render gate: hash-based canonical comparison #56

Description

@MeatPopSci1972

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureiceboxParked — not current cyclerfcDesign spike — no implementation until gate condition mettestsTest suite only

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions