Skip to content

test: add canonical JSON nested ordering regressions#25

Merged
DigiEmu merged 1 commit into
mainfrom
test/canonical-json-nested-order-v1
May 8, 2026
Merged

test: add canonical JSON nested ordering regressions#25
DigiEmu merged 1 commit into
mainfrom
test/canonical-json-nested-order-v1

Conversation

@DigiEmu
Copy link
Copy Markdown
Owner

@DigiEmu DigiEmu commented May 8, 2026

Summary

Adds regression tests for canonical JSON nested key ordering.

The tests ensure that:

  • nested object keys are sorted deterministically
  • equivalent nested maps with different input order produce identical canonical JSON

Why

DigiEmu Core depends on canonical JSON stability for deterministic hashing.

This protects against Go map iteration order and nested JSON key-order drift.

Tests

Added:

  • TestNestedMapKeyOrdering
  • TestEquivalentNestedMapsWithDifferentInputOrderProduceSameCanonicalJSON

Verification

go test ./...

@DigiEmu DigiEmu merged commit 26a572a into main May 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant