Correct audit engagement and idempotent fixture setup

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a0260c-4067-7052-9647-ad000d576e38
This commit is contained in:
tegwick 2026-08-22 00:05:15 +02:00
parent edc9df0491
commit 8a97fac17f
5 changed files with 34 additions and 10 deletions

View file

@ -30,3 +30,15 @@ def test_event_is_synthetic_and_correlation_bound():
def test_p95_is_conservative_for_small_runs():
assert runner._p95([10, 20, 30]) == 30
def test_post_headers_bind_idempotency_key_to_event_id():
headers = runner.request_headers(
"secret-not-rendered", "eng-1", "corr-1", {"id": "event-1"}
)
assert headers["Idempotency-Key"] == "event-1"
assert headers["User-Agent"] == "whitehat-security/eng-1"
def test_get_headers_have_no_idempotency_key():
headers = runner.request_headers("secret", "eng-1", "corr-1", None)
assert "Idempotency-Key" not in headers