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

Functions

McpConfig _make_config ()
 test_canonical_path_preferred (Path tmp_path)
 test_legacy_path_used_when_canonical_absent (Path tmp_path)
 test_neither_path_returns_empty (Path tmp_path)

Variables

list _CANONICAL_PATTERNS = [{"name": "canonical", "pattern": "CANONICAL-SECRET"}]
list _LEGACY_PATTERNS = [{"name": "legacy", "pattern": "LEGACY-SECRET"}]

Detailed Description

Purpose
-------
OI-504 regression tests — ``_load_debug_config_patterns()`` must look up
``debug_config.json`` at ``<root>/oc_diagnostics/debug_config.json`` first
(the canonical location since v0.9.0) and fall back to the legacy
``<root>/debug_config.json`` only when the canonical path is absent.

Responsibilities
----------------
- Canonical ``oc_diagnostics/debug_config.json`` is preferred when present.
- Legacy root-level ``debug_config.json`` is still read when the canonical
  path is missing.
- Neither path present → returns ``[]`` (safe default, no raise).

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

Contracts
---------
- Function never raises; returns a list.

Function Documentation

◆ _make_config()

McpConfig tests_mcp.test_mcp_debug_config_path._make_config ( )
protected

Definition at line 44 of file test_mcp_debug_config_path.py.

Here is the caller graph for this function:

◆ test_canonical_path_preferred()

tests_mcp.test_mcp_debug_config_path.test_canonical_path_preferred ( Path tmp_path)

Definition at line 48 of file test_mcp_debug_config_path.py.

Here is the call graph for this function:

◆ test_legacy_path_used_when_canonical_absent()

tests_mcp.test_mcp_debug_config_path.test_legacy_path_used_when_canonical_absent ( Path tmp_path)

Definition at line 65 of file test_mcp_debug_config_path.py.

Here is the call graph for this function:

◆ test_neither_path_returns_empty()

tests_mcp.test_mcp_debug_config_path.test_neither_path_returns_empty ( Path tmp_path)

Definition at line 76 of file test_mcp_debug_config_path.py.

Here is the call graph for this function:

Variable Documentation

◆ _CANONICAL_PATTERNS

list tests_mcp.test_mcp_debug_config_path._CANONICAL_PATTERNS = [{"name": "canonical", "pattern": "CANONICAL-SECRET"}]
protected

Definition at line 40 of file test_mcp_debug_config_path.py.

◆ _LEGACY_PATTERNS

list tests_mcp.test_mcp_debug_config_path._LEGACY_PATTERNS = [{"name": "legacy", "pattern": "LEGACY-SECRET"}]
protected

Definition at line 41 of file test_mcp_debug_config_path.py.