b2d01ef8c1
- 其它 *_input 解析器都先调 ToolArgumentsRejection::check,只有 write_file_input 没有;工具桥路径靠 bridge_write_file_with_permit 里另一次 check 兜住,但独立客户端 MCP 预检 validate_write_file_arguments 只调 write_file_input,带未知字段的入参能通过预检、要等回客户端桥才被拒
- 在 write_file_input 开头补上同一份 check(path/content 白名单),两个入口共用一条规则;写文件门禁里的那次 check 保留,保证「先查形状、再过权限」的现有顺序不变
- 测试补一条:{"path":"game/index.html","content":"…","unexpected":1} 必须被 validate_write_file_arguments 拒绝
验证:cargo test --bin genarrative-ai-game-creator-shell -- agent::direct_tool_bridge:: 40 passed;agent::direct_tools_mcp::tests::tool_catalog_preserves_reviewed_resource_contracts 通过