init: vaultmesh mcp server
Some checks are pending
Governance CI / Constitution Hash Gate (push) Waiting to run
Governance CI / Governance Tests (push) Blocked by required conditions
Governance CI / Golden Drill Mini (push) Blocked by required conditions

This commit is contained in:
Vault Sovereign
2025-12-26 23:23:08 +00:00
commit e4871c2a29
35 changed files with 6511 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
"""
Governance Test Configuration
Shared fixtures for all governance tests.
"""
import os
import sys
import pytest
from pathlib import Path
# Add packages to path
REPO_ROOT = Path(__file__).parents[2]
sys.path.insert(0, str(REPO_ROOT / "packages"))
# Set VaultMesh root
os.environ["VAULTMESH_ROOT"] = str(REPO_ROOT)
@pytest.fixture
def repo_root():
"""Return the repository root path."""
return REPO_ROOT
@pytest.fixture
def constitution_path(repo_root):
"""Return path to the constitution."""
return repo_root / "docs" / "MCP-CONSTITUTION.md"
@pytest.fixture
def constitution_lock_path(repo_root):
"""Return path to the constitution lock file."""
return repo_root / "governance" / "constitution.lock"
@pytest.fixture
def parse_lock_file(constitution_lock_path):
"""Parse the constitution lock file into a dict."""
lock = {}
with open(constitution_lock_path, "r") as f:
for line in f:
line = line.strip()
if not line or line.startswith("#"):
continue
if "=" in line:
key, value = line.split("=", 1)
lock[key.strip()] = value.strip()
return lock