Bind WP-0025 receipts to a canonical projection contract
Railiance's WP-0025 review found the first adapter fail-open: --contract was optional, receipt_id was not canonical, and target, identities, resources, UIDs, broker digest and times were unbound. Require the contract and refuse any receipt that is not the platform canonical form. Assistant: grok Assistant-Session: 01a02670-3345-76f2-a014-70fde8e2a2bb
This commit is contained in:
parent
da6f5fb3f8
commit
5a0eb6b343
6 changed files with 592 additions and 140 deletions
|
|
@ -147,6 +147,23 @@ def test_example_projection_receipt_is_value_safe():
|
|||
assert broker.receipt["mounted_keys"] == ["token-a", "token-b"]
|
||||
|
||||
|
||||
def test_admit_plane_wp0025_receipt_requires_contract(tmp_path, capsys):
|
||||
engagement = tmp_path / "engagement.json"
|
||||
receipt = tmp_path / "receipt.json"
|
||||
engagement.write_text(json.dumps(_live_e2_record()), encoding="utf-8")
|
||||
receipt.write_text(json.dumps({
|
||||
"interface": "railiance.custody-projection-receipt",
|
||||
"version": 1,
|
||||
"engagement_id": "WH-ENG-CLI-RECEIPT",
|
||||
"secret_values_observed": False,
|
||||
}), encoding="utf-8")
|
||||
with pytest.raises(SystemExit) as stopped:
|
||||
main(["admit-plane", str(engagement), "targets/audit-core-e2.json",
|
||||
"--receipt", str(receipt)])
|
||||
assert stopped.value.code == 2
|
||||
assert "requires a bound contract" in capsys.readouterr().err
|
||||
|
||||
|
||||
def test_deliver_queues_abort_without_calling_it_target_assurance(tmp_path, capsys):
|
||||
report = json.loads(
|
||||
Path("evidence/WH-ENG-20260822-AUDIT-E2-02-abort.json").read_text(encoding="utf-8")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue