Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions tests/test_protocol_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Scope honesty (read before editing):
- This gate runs against the SOURCE TREE: the subprocess below boots the
editable install (``uv run mnemo-mcp``), i.e. the code in this repository,
not a published artifact. It is pre-BETA hardening only.
editable install (``python -m mnemo`` on the test interpreter), i.e. the
code in this repository, not a published artifact. It is pre-BETA
hardening only.
- The authoritative D3 gate runs against the installed BETA artifact with
``uvx --from mnemo-mcp==<beta>`` driven by ``mcp.ClientSession``; that is
blocked until PyPI trusted publishing exists. This file does NOT claim D3
Expand Down Expand Up @@ -37,6 +38,7 @@
import os
import socket
import subprocess
import sys
import time
import warnings
from pathlib import Path
Expand Down Expand Up @@ -203,8 +205,12 @@ def server(tmp_path_factory):
out_path = state_dir / "server-stdout.log"
err_path = state_dir / "server-stderr.log"
with out_path.open("w") as out_f, err_path.open("w") as err_f:
# The test interpreter, not ``uv run``: on Windows terminate() only
# kills the direct child, and uv does not take its own children down
# with it, so every run left a live server holding the venv's
# mnemo-mcp.exe (and the next ``uv sync`` failed with os error 32).
proc = subprocess.Popen(
["uv", "run", "mnemo-mcp"],
[sys.executable, "-m", "mnemo"],
cwd=str(_REPO_ROOT),
env=_build_gate_env(state_dir, port=port),
stdin=subprocess.DEVNULL,
Expand Down
Loading