Record seven created sitting approvals; silence attended stdout.
Warden failed closed on leftover JSON after a successful create. Objects are requested, no entries. Flex Auth package draft pins the seven ids; c01 skipped. No human bind. Assistant: grok Assistant-Session: 01a09dc1-b21e-77e1-919e-fcad2f82b267
This commit is contained in:
parent
a911eaf816
commit
ca563504c4
9 changed files with 360 additions and 25 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import importlib.util
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
|
@ -26,6 +27,32 @@ def test_require_attended_refuses_this_shell():
|
|||
create.require_attended()
|
||||
|
||||
|
||||
def test_created_receipt_has_seven_requested_and_no_entries():
|
||||
receipt = json.loads((Path(__file__).resolve().parents[1] / "docs" / "evidence" / "2026-09-15-sitting-approval-creates.json").read_text())
|
||||
assert receipt["status"] == "created"
|
||||
assert receipt["human_entries_created"] is False
|
||||
assert receipt["credential_values_emitted"] is False
|
||||
assert len(receipt["requests"]) == 7
|
||||
assert receipt["skipped"] == ["infd-20260914-c01"]
|
||||
for row in receipt["requests"]:
|
||||
approval = row["approval"]
|
||||
assert approval["status"] == "requested"
|
||||
assert approval["entries"] == []
|
||||
assert approval["binding"]["human_control"] is True
|
||||
assert approval["binding"]["digest"].startswith("sha256:")
|
||||
|
||||
|
||||
def test_policy_package_pins_match_created_receipt():
|
||||
root = Path(__file__).resolve().parents[1] / "docs" / "batches" / "2026-09-14"
|
||||
receipt = json.loads((Path(__file__).resolve().parents[1] / "docs" / "evidence" / "2026-09-15-sitting-approval-creates.json").read_text())
|
||||
package = (root / "policy-package.md").read_text()
|
||||
assert "c01" not in package or "infd-20260914-c01" not in package
|
||||
for row in receipt["requests"]:
|
||||
assert f'memo:{row["memo_id"]}' in package
|
||||
assert row["approval"]["id"] in package
|
||||
assert row["approval"]["binding"]["digest"] in package
|
||||
|
||||
|
||||
def test_failed_receipt_does_not_block_retry(tmp_path, monkeypatch):
|
||||
receipt = tmp_path / "r.json"
|
||||
monkeypatch.setattr(create, "RECEIPT", receipt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue