@@ -272,6 +272,10 @@ def operator_guide() -> str:
272272 monthly triage and release-buddy cadence.
273273- Keep downstream orchestration-layer and PBPK handoffs explicit;
274274 do not add hidden transformation logic in clients.
275+ - Use `python scripts/summarize_http_audit.py <path>` for fleet-level counts and
276+ `python scripts/replay_http_audit.py <path> --request-id <id>` for request-level debugging.
277+ - Keep `docs://http-audit-operations-guide` available to operators who need to trace a result
278+ back to a defaults manifest and release metadata snapshot.
275279"""
276280
277281
@@ -346,9 +350,23 @@ def deployment_hardening_guide() -> str:
346350 request-level JSONL audit trail without persisting raw bodies.
347351- Keep the default request timeout and concurrency ceiling unless you have benchmark evidence that
348352 a wider setting is necessary for your deployment.
353+ - Rotate audit JSONL externally with `logrotate`, container log rotation, or explicit
354+ per-day/per-release file paths. The server intentionally appends and never truncates in-process.
355+ - Retain enough JSONL history to cover incident review, release rollback, and benchmark drift
356+ analysis. A reviewed 30- to 90-day retention window is a reasonable default for remote HTTP.
349357- Re-run release verification after transport or deployment changes.
350358- Keep warning-level security and provenance findings visible to downstream users.
351359
360+ ## Replay and forensic workflow
361+
362+ - Capture the `X-Exposure-Audit-Request-Id` response header from the calling client or access log.
363+ - Use `python scripts/replay_http_audit.py /path/to/http-audit.jsonl --request-id <id>` to isolate
364+ a single exchange without storing the raw request body.
365+ - Use `python scripts/replay_http_audit.py /path/to/http-audit.jsonl --input-digest <sha256>` to
366+ group logically identical JSON-RPC requests that differ only in key order or redacted secrets.
367+ - Match the event defaults and release fingerprints against `defaults://manifest` and
368+ `release://metadata-report` before replaying a scenario downstream.
369+
352370## Boundary note
353371
354372This MCP now provides first-party bearer-token auth, explicit origin allow-list enforcement, and
@@ -360,6 +378,56 @@ def deployment_hardening_guide() -> str:
360378"""
361379
362380
381+ def http_audit_operations_guide () -> str :
382+ return """# HTTP Audit Operations Guide
383+
384+ Use this guide when a remote `streamable-http` deployment needs retention planning, replay,
385+ or request-level debugging without persisting raw request bodies.
386+
387+ ## What every event carries
388+
389+ - `requestId`: echoed back through `X-Exposure-Audit-Request-Id` for incident correlation.
390+ - `normalizedInputDigestSha256`: stable digest over a redacted, canonical JSON request payload
391+ that ignores the top-level JSON-RPC `id`.
392+ - `outputDigestSha256`: digest over the JSON-RPC response body for change detection.
393+ - `qualityFlagCodes`, `limitationCodes`, and `manualReviewRequired`: the high-signal trust surface
394+ needed for screening review without reopening the whole tool payload first.
395+ - `reproducibility.defaultsVersion` and `reproducibility.defaultsHashSha256`: the exact defaults
396+ pack fingerprint needed to confirm replay compatibility.
397+ - `reproducibility.releaseVersion`, `reproducibility.releaseMetadataPath`, and
398+ `reproducibility.releaseMetadataSha256`: the release snapshot that should match
399+ `release://metadata-report` or the checked-in release metadata file.
400+
401+ ## Retention and rotation
402+
403+ - Treat the JSONL sink as append-only application evidence, not as a transient debug log.
404+ - Rotate externally with host tooling such as `logrotate`, container log rotation, or explicit
405+ per-day/per-release paths.
406+ - Keep write permissions narrow because the audit file becomes part of the operational evidence
407+ trail for HTTP requests.
408+ - Retain enough history to support incident review, release rollback checks, and benchmark drift
409+ investigation. A reviewed 30- to 90-day retention window is a reasonable default.
410+
411+ ## Replay workflow
412+
413+ ```bash
414+ python scripts/summarize_http_audit.py /path/to/http-audit.jsonl
415+ python scripts/replay_http_audit.py /path/to/http-audit.jsonl --request-id <request-id>
416+ python scripts/replay_http_audit.py /path/to/http-audit.jsonl --input-digest <sha256>
417+ ```
418+
419+ ## Reproducibility checklist
420+
421+ 1. Match `requestId` to the client-visible response header.
422+ 2. Match `defaultsVersion` and `defaultsHashSha256` to `defaults://manifest`.
423+ 3. Match `releaseVersion` and the release metadata fields to `release://metadata-report`.
424+ 4. Confirm `qualityFlagCodes`, `limitationCodes`, and `manualReviewRequired` still align with the
425+ downstream interpretation you plan to make.
426+ 5. Treat `normalizedInputDigestSha256` as an equivalence key for redacted replay, not as a
427+ substitute for validated scenario inputs.
428+ """
429+
430+
363431def test_evidence_summary_guide () -> str :
364432 return """# Test Evidence Summary
365433
0 commit comments