ADR-013 Phase 2: enforcement + signed shelf + adopt (adversarial-review hardened)

This commit is contained in:
2026-07-18 21:06:38 -04:00
parent 0ff5edc553
commit 77ca2e0d2d
14 changed files with 1234 additions and 22 deletions

View File

@@ -144,6 +144,10 @@ def test_verify_dir_round_trip(tmp_path, keypair):
(plugin_dir / signing.PROVENANCE_SIG).write_bytes(
signing.sign(priv, prov_bytes))
# A real adopted/loaded tree carries no bytecode (packer excludes it, loader
# strips it); verify flags any that is present, so clear the test's planted
# __pycache__ before asserting a clean verify.
packaging.strip_bytecode(plugin_dir)
_, errors = packaging.verify_dir(plugin_dir, [pub])
assert errors == []