Planner Autonomy: протащить catalog chain matches в runtime debug

This commit is contained in:
2026-05-01 14:15:55 +03:00
parent 52a974d4d7
commit 1c1383b8b5
8 changed files with 60 additions and 4 deletions
@@ -14,6 +14,10 @@ function entryPointContract(overrides: Record<string, unknown> = {}) {
user_facing_response_allowed: true,
business_fact_answer_allowed: true,
requires_user_clarification: false,
planner: {
selected_chain_id: "value_flow_ranking",
catalog_chain_template_matches: ["value_flow_ranking", "value_flow"]
},
answer_draft: {
answer_mode: "confirmed_with_bounded_inference"
}
@@ -37,6 +41,8 @@ describe("assistant MCP discovery debug attachment", () => {
expect(debug.mcp_discovery_attempted).toBe(true);
expect(debug.mcp_discovery_hot_runtime_wired).toBe(false);
expect(debug.mcp_discovery_bridge_status).toBe("answer_draft_ready");
expect(debug.mcp_discovery_selected_chain_id).toBe("value_flow_ranking");
expect(debug.mcp_discovery_catalog_chain_template_matches).toEqual(["value_flow_ranking", "value_flow"]);
expect(debug.mcp_discovery_answer_mode).toBe("confirmed_with_bounded_inference");
expect(debug.mcp_discovery_business_fact_answer_allowed).toBe(true);
expect(debug.mcp_discovery_user_facing_response_allowed).toBe(true);
@@ -54,6 +60,8 @@ describe("assistant MCP discovery debug attachment", () => {
expect(debug.mcp_discovery_attempted).toBe(false);
expect(debug.mcp_discovery_hot_runtime_wired).toBe(false);
expect(debug.mcp_discovery_bridge_status).toBeNull();
expect(debug.mcp_discovery_selected_chain_id).toBeNull();
expect(debug.mcp_discovery_catalog_chain_template_matches).toEqual([]);
expect(debug.mcp_discovery_answer_mode).toBeNull();
expect(debug.mcp_discovery_business_fact_answer_allowed).toBe(false);
expect(debug.mcp_discovery_user_facing_response_allowed).toBe(false);
@@ -147,6 +147,7 @@ describe("assistant MCP discovery runtime bridge", () => {
});
expect(result.loop_state.pending_axes).toContain("organization");
expect(result.loop_state.provided_axes).toContain("aggregate_axis");
expect(result.loop_state.catalog_chain_template_matches[0]).toBe("value_flow_ranking");
expect(result.reason_codes).toContain("runtime_bridge_loop_state_awaiting_clarification");
});