Option C Tools
Loading...
Searching...
No Matches
tests_mcp.test_mcp_audit Namespace Reference

Classes

class  TestMcpAuditRecord
class  TestHelpers
class  TestMcpAuditLoggerWrite
class  TestMcpAuditLoggerRotation
class  TestMcpAuditLoggerPruning

Detailed Description

Purpose
-------
Regression tests for :mod:`oct.mcp.audit` — ``McpAuditRecord`` and
``McpAuditLogger``.

Responsibilities
----------------
- Verify JSONL write and rotation (size and count thresholds).
- Verify pruning of old audit files.
- Verify session/request ID propagation and redaction flag.

Diagnostics
-----------
Domain: MCP-TESTS
Levels:
    L2 — test lifecycle
    L3 — assertion details
    L4 — deep tracing

Contracts
---------
- All audit files are written to ``tmp_path``; no real logs directory
  is touched.