Make audit fixture retries deterministic
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a0260c-4067-7052-9647-ad000d576e38
This commit is contained in:
parent
8a97fac17f
commit
cf696f09d5
3 changed files with 18 additions and 7 deletions
|
|
@ -21,10 +21,11 @@ def test_equivalent_denial_includes_digest():
|
|||
|
||||
|
||||
def test_event_is_synthetic_and_correlation_bound():
|
||||
payload = runner.event("event-a", "tenant-a", "corr")
|
||||
payload = runner.event("event-a", "tenant-a", "corr", "2026-08-21T23:00:00Z")
|
||||
assert payload["id"] == payload["data"]["fixture_id"]
|
||||
assert payload["tenant"] == "tenant-a"
|
||||
assert payload["correlation_id"] == "corr"
|
||||
assert payload["occurred_at"] == "2026-08-21T23:00:00Z"
|
||||
|
||||
|
||||
def test_p95_is_conservative_for_small_runs():
|
||||
|
|
|
|||
|
|
@ -56,8 +56,14 @@ def test_unauthorized_route_fails_closed(tmp_path):
|
|||
engagement.permits(technique="e2-differential", route="DELETE /objects/{id}")
|
||||
|
||||
|
||||
def test_pending_owner_acknowledgement_fails_closed(tmp_path):
|
||||
data = record()
|
||||
data["target_owner_acknowledged_at"] = None
|
||||
with pytest.raises(AuthorizationError, match="pending"):
|
||||
load(tmp_path, data)
|
||||
|
||||
|
||||
def _write(tmp_path, data):
|
||||
path = tmp_path / "engagement.json"
|
||||
path.write_text(json.dumps(data), encoding="utf-8")
|
||||
return path
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue