MCP server factory + benchmark tool profile with report_done (#68) - #73
Merged
Conversation
create_server(sim, instructions=, profile=) builds the FastMCP over a given Sim. The interactive profile is the stdio surface unchanged; the benchmark profile withholds inject_failure/clear_failure (the injected failure is the exam) and adds report_done as the explicit end-of-episode channel. INSTRUCTIONS becomes a profile registry (Phase 5 ablation axis) and run_until goes public for the benchmark runner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014JCrwRbtN7UA5ijn13vPmm
…the runtime check Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014JCrwRbtN7UA5ijn13vPmm
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #68 (slice A of the Phase 5 epic #19).
What
mcp/a320_mcp/server.py: the server is now built bycreate_server(sim, *, instructions=None, profile="interactive")instead of module-level decorators. Tools are sync closures over the passedSim(sync stays load-bearing:unsendablebinding, D-010/D-015).interactiveprofile (default): the 9-tool stdio surface, byte-for-byte the same behavior;main(),--startand the module-levelmcpinstance are unchanged.benchmarkprofile: withholdsinject_failure/clear_failure— the injected failure is the exam; an agent that can repair the fault (or break something else) is not flying the procedure — and addsreport_done(diagnosis, actions_summary)as the explicit end-of-episode channel (and a scorable diagnosis artifact for EPIC: scoring metric + baselines/ablations #20).INSTRUCTIONSbecomes a registry (INSTRUCTIONS_PROFILES): the benchmark variant appends the report_done contract; explicitinstructions=overrides the profile default (Phase 5 ablation axis)._run_untilrenamed to publicrun_until;START_STATESstays public — both are reused by the Phase 5 episode runner.mcp/README.md: documents the profile concept.Tests
FastMCP.list_tools()/call_tool()), unknown profile fails loudly, instructions wiring (profile default vs explicit override).python -m pytest mcp/tests -q: 11 passed (8 pre-existing stdio tests untouched and green — no behavior change on the interactive path).🤖 Generated with Claude Code
https://claude.ai/code/session_014JCrwRbtN7UA5ijn13vPmm