test(mcp-gate): the eval for an MCP surface over OKF bundles, written RED
No capability lands in this commit. `tools/okf_mcp_gate.py` measures six rows against a server that does not exist, and the reason is the interpreter's own words rather than this file's opinion: `python -c 'import llm_ingestion_okf.mcp_server'` raises ModuleNotFoundError, printed in row 1. Today: 1 (0/7) - 2 (0/0) - 3 (1/4) - 4 (0/9) - 5 (0/3) - 6 (0/6), `GATE RED: rows 1, 2, 3, 4, 5, 6`, exit 1. Row 3 is not 0, and that is a measurement rather than a slip. The order predicted 0 of N on every row; the incumbent one-to-one skill already refuses out loud when its bundle is rebuilt, because `okf check`'s `bundle_mismatch` rule exists and compares the declared ref against the payload's. One of the four artefact classes therefore passes the loudness clause today -- at the cost the row also prints: one artefact to recreate and one manual step per consuming project. The server is a SUBPROCESS and never an import. Every row speaks newline-delimited JSON-RPC over stdin/stdout starting at `initialize`, with a client written narrowly here: a client built from the server's own framing helpers would agree with the server by construction. Nothing in the gate ranks, serves or writes a bundle. Denominators are pinned in the gate and recounted a second time in the tests. `REQUIRED_TOOLS` (7 across two variants), `DRILL_ARTEFACTS` (4), `DISCOVERY_BUNDLES x DISCOVERY_CHECKS` (9), `CROSS_CHECKS` (3) and `HOSTILE_CASES` (6) do not come from the run -- a row counting what the server happened to offer goes green by offering less, which is the defect rows 2 and 3 of the retrieval gate were caught on. Row 2's denominator DOES come from the frozen graded question set, at run time, and the set is never committed here: `--sett` plus `--frys`, with the sha256 verified against the freeze file and a freeze version below the ordered one refused as a usage error, not measured. Without them the row is `0 of 0` with the reason stated. Its machinery carries a known-positive over the synthetic corpus this file invents, and a green test proves those quotes really are in the fixture on disk without asking any server -- so a 0 there means the surface could not reach text that is demonstrably present. Six tests are red, every one of them on an assert about behaviour: 0 of 7 tools answered, 1 of 4 artefacts loud, 0 of 9 discovery checks, 0 of 3 cross-bundle checks, 0 of 6 hostile cases, and `find_spec` returning None rather than an ImportError. Eight instrument tests are green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f5bf5fccbf
commit
5f1772e832
2 changed files with 1415 additions and 0 deletions
1191
tools/okf_mcp_gate.py
Normal file
1191
tools/okf_mcp_gate.py
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue