feat(workbench): add runtime GIS and sample integrations

This commit is contained in:
2026-09-22 10:44:31 +08:00
parent a3b4e75317
commit 7ab9b36a5e
62 changed files with 6685 additions and 51 deletions
+18
View File
@@ -0,0 +1,18 @@
"""RFC 8785 canonical JSON hashing shared by persisted records."""
from hashlib import sha256
import rfc8785
from app.domain.domain_errors import DomainError
def canonical(value: object) -> bytes:
try:
return rfc8785.dumps(value)
except rfc8785.CanonicalizationError as exc:
raise DomainError("SCHEMA_INVALID", "Content is not canonicalizable JSON") from exc
def digest(value: object) -> str:
return "sha256:" + sha256(canonical(value)).hexdigest()