Implement authenticated custody observations and durable root-grant baseline
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a1029d-2c93-7500-a0e0-e3e089668b29
This commit is contained in:
parent
1999a144c9
commit
0d0751d39d
18 changed files with 1129 additions and 14 deletions
14
tests/test_custody_policy_package.py
Normal file
14
tests/test_custody_policy_package.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import hashlib
|
||||
from importlib.resources import files
|
||||
import json
|
||||
import unittest
|
||||
from user_engine.custody_canon import policy
|
||||
|
||||
|
||||
class CustodyPolicyPackageTests(unittest.TestCase):
|
||||
def test_pinned_policy_and_schema_integrity(self):
|
||||
package = files("user_engine.custody_canon")
|
||||
receipt = json.loads(package.joinpath("provenance.json").read_text())
|
||||
self.assertEqual(hashlib.sha256(package.joinpath("policy.py").read_bytes()).hexdigest(), receipt["packaged_policy_sha256"])
|
||||
self.assertEqual(hashlib.sha256(package.joinpath("custody-record_v0.1.schema.json").read_bytes()).hexdigest(), receipt["schema_sha256"])
|
||||
self.assertEqual(policy.load_schema()["$id"], "https://policy.coulomb.social/schemas/custody-record/v0.1")
|
||||
Loading…
Add table
Add a link
Reference in a new issue