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

Classes

class  TestFormatArgs
class  TestDocsArgs
class  TestExportSourceArgs
class  TestNewArgs
class  TestScaffoldArgs
class  TestCleanArgs
class  TestInstallHooksArgs
class  TestGitCommitArgs
class  TestGitHooksInstallArgs
class  TestGitInitArgs
class  TestGitChangelogArgs
class  TestValidateToolArgsWriteTools
class  TestWriteToolsPolicy
class  TestArgvBuilders

Detailed Description

Purpose
-------
Regression tests for Phase 5B write-tool Pydantic models
(:mod:`oct.mcp.validator`) and argv builders (:mod:`oct.mcp.executor`).

Responsibilities
----------------
- Verify all 11 write-tool models (defaults, unknown field rejection,
  confirm field).
- Verify ``FormatArgs`` double guard and ``GitCommitArgs`` safety.
- Verify path traversal (T-02) and shell metacharacter rejection.
- Verify strict/airgapped profile blocks write tools.
- Verify argv builder spot-checks (format dry-run, format fix, git
  commit).
- Verify T-06 privilege escalation and T-06b strict-profile denial.

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

Contracts
---------
- Tests are in-memory validation and policy checks; no subprocess or
  filesystem writes.