Snapshot date: 2026-03-23
This document records the current runtime-contract validation layers beyond pure unit coverage.
The goal is to validate the real runtime boundaries:
- policy loading
- approval lifecycle
- managed config mutation
- MCP stdio contract behavior
- Unit and module-level regression coverage across
tests/ - Runtime policy integration coverage in
tests/test_runtime_policy_integration.py - MCP stdio subprocess contract coverage in
tests/test_mcp_stdio_integration.py - Operator bootstrap validation via
python3 scripts/validate_operator_bootstrap.py - Host-profile validation via
mc validate-host-profile - Real MCP client validation via
python3 scripts/validate_mcp_client.py
Run the fast engineering baseline:
python3 -m ruff check .
python3 -m mypy src
PYTHONPATH=src python3 -m unittest discover -s tests
python3 -m compileall srcRun the main pytest suite without the runtime/MCP integration slice:
PYTHONPATH=src python3 -m pytest -q tests \
--ignore tests/test_runtime_policy_integration.py \
--ignore tests/test_mcp_stdio_integration.pyRun the runtime/MCP integration slice explicitly:
PYTHONPATH=src python3 -m pytest -q \
tests/test_runtime_policy_integration.py \
tests/test_mcp_stdio_integration.pyRun the install/bootstrap path:
python3 scripts/validate_operator_bootstrap.py \
--output-dir /tmp/mc-bootstrap-validation \
--provider heuristic \
--python python3Run the real-client MCP contract check:
python3 scripts/validate_mcp_client.py \
--output-dir /tmp/mc-client-validation- operator policy can disable tools, require confirmation, constrain service targets, and redefine managed config targets
- invalid policy fails closed and is surfaced through
mc doctor mc mcp-serveworks as a real stdio subprocess for both the legacy approval API and the standard JSON-RPC MCP handshake- approval-mediated config mutation works through the real MCP server process, not just through in-process unit helpers
- the official MCP Inspector CLI can complete
tools/list, read-only execution, pending approval,approval_get, andapproval_approve
- no container-backed integration harness yet for repeatable
systemdservice scenarios - no desktop-specific GUI transcript is checked in yet
- real-host smoke validation remains necessary for host-specific paths that containers do not model well