chore(mcp): PR #172 회차 1 리뷰 반영
`ask_tool_routes_multi_hop_true_to_decompose_first` 의 error code 검증을 더 견고하게 — `model_unreachable | timeout` 둘 다 accept. 환경 차이 (즉시 ECONNREFUSED vs connect timeout) 가 다른 wire code 로 분류돼도 dispatch divergence 자체 (schema_version=error.v1 + isError=true vs single-pass 의 answer.v1 grounded=false) 는 동일하게 검증. 검증 - `cargo test -p kebab-mcp -j 1 --test tools_call_ask_multi_hop` 2 통과. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -91,9 +91,17 @@ async fn ask_tool_routes_multi_hop_true_to_decompose_first() {
|
|||||||
};
|
};
|
||||||
let mh_v: serde_json::Value = serde_json::from_str(&mh_text).unwrap();
|
let mh_v: serde_json::Value = serde_json::from_str(&mh_text).unwrap();
|
||||||
assert_eq!(mh_v["schema_version"], "error.v1");
|
assert_eq!(mh_v["schema_version"], "error.v1");
|
||||||
assert_eq!(
|
// The dispatch contract is "multi-hop reached the LLM". The exact
|
||||||
mh_v["code"], "model_unreachable",
|
// error code depends on how the host TCP stack reports an
|
||||||
"multi-hop dispatch must hit the LLM and surface model_unreachable; got {mh_v}"
|
// unreachable port — fast-path `ECONNREFUSED` classifies as
|
||||||
|
// `model_unreachable`, but environments that take the connect
|
||||||
|
// timeout path (some CI / Docker network stacks) surface
|
||||||
|
// `timeout`. Accept either.
|
||||||
|
let mh_code = mh_v["code"].as_str().unwrap_or("");
|
||||||
|
assert!(
|
||||||
|
matches!(mh_code, "model_unreachable" | "timeout"),
|
||||||
|
"multi-hop dispatch must reach the LLM and surface model_unreachable/timeout; \
|
||||||
|
got code={mh_code:?} from {mh_v}"
|
||||||
);
|
);
|
||||||
|
|
||||||
// Single-pass branch — empty KB short-circuits at retrieve, no LLM
|
// Single-pass branch — empty KB short-circuits at retrieve, no LLM
|
||||||
|
|||||||
Reference in New Issue
Block a user