fix: stabilize workflow manifest canonicalization

This commit is contained in:
lda
2026-08-03 07:39:03 +07:00 Verified
parent 99f0671771
commit b100675658
3 changed files with 33 additions and 6 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class ManifestDriftError(RuntimeError):
def canonical_manifest_json(manifest: ContractManifest) -> str:
try:
return json.dumps(manifest, ensure_ascii=False, indent=2) + "\n"
return json.dumps(manifest, ensure_ascii=False, indent=2, sort_keys=True) + "\n"
except (TypeError, ValueError) as error:
raise ValueError(f"manifest is not canonically serializable: {error}") from error