Initial external conformance skeleton: contract, pure-lib/consumer, foreign kernel
extension-conformance / conformance (push) Canceled after 0s

This commit is contained in:
marqdo-extension-conformance committed 2026-11-21 23:08:00 +08:00
commit e92448f863
20 files changed
+1044

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""Refresh the SHA-256 pin in kernel/kernel.json from kernel/mocklang.
This script is for fixture maintainers only. Tests never rewrite the fixture;
they read the committed digest and fail if it no longer matches.
"""
import hashlib
import json
import pathlib
import sys
ROOT = pathlib.Path(__file__).resolve().parent.parent
KERNEL = ROOT / "kernel"
def main() -> int:
mocklang = KERNEL / "mocklang"
descriptor = KERNEL / "kernel.json"
digest = hashlib.sha256(mocklang.read_bytes()).hexdigest()
data = json.loads(descriptor.read_text(encoding="utf-8"))
data["digest"] = digest
descriptor.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
print(f"kernel.json digest = {digest} ({mocklang.name})")
return 0
if __name__ == "__main__":
sys.exit(main())