Добавить evidence planner для автономного маршрута
This commit is contained in:
@@ -16,6 +16,21 @@ function entryPointContract(overrides: Record<string, unknown> = {}) {
|
||||
requires_user_clarification: false,
|
||||
planner: {
|
||||
selected_chain_id: "value_flow_ranking",
|
||||
evidence_plan: {
|
||||
schema_version: "assistant_evidence_planner_v1",
|
||||
policy_owner: "assistantEvidencePlanner",
|
||||
planner_status: "ready_for_execution",
|
||||
selected_chain_id: "value_flow_ranking",
|
||||
evidence_axes: {
|
||||
missing_axes: []
|
||||
},
|
||||
coverage_gate: {
|
||||
expected_coverage: "confirmed_coverage"
|
||||
},
|
||||
answer_contract: {
|
||||
answer_mode: "confirmed_business_answer"
|
||||
}
|
||||
},
|
||||
catalog_chain_template_matches: ["value_flow_ranking", "value_flow"],
|
||||
catalog_chain_template_alignment: {
|
||||
alignment_status: "selected_matches_top",
|
||||
@@ -69,6 +84,10 @@ describe("assistant MCP discovery debug attachment", () => {
|
||||
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_evidence_plan_status).toBe("ready_for_execution");
|
||||
expect(debug.mcp_discovery_evidence_plan_answer_mode).toBe("confirmed_business_answer");
|
||||
expect(debug.mcp_discovery_evidence_plan_expected_coverage).toBe("confirmed_coverage");
|
||||
expect(debug.mcp_discovery_evidence_plan_missing_axes).toEqual([]);
|
||||
expect(debug.mcp_discovery_catalog_chain_template_matches).toEqual(["value_flow_ranking", "value_flow"]);
|
||||
expect(debug.mcp_discovery_catalog_chain_alignment_status).toBe("selected_matches_top");
|
||||
expect(debug.mcp_discovery_catalog_chain_top_match).toBe("value_flow_ranking");
|
||||
@@ -100,6 +119,11 @@ describe("assistant MCP discovery debug attachment", () => {
|
||||
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_evidence_plan_v1).toBeNull();
|
||||
expect(debug.mcp_discovery_evidence_plan_status).toBeNull();
|
||||
expect(debug.mcp_discovery_evidence_plan_answer_mode).toBeNull();
|
||||
expect(debug.mcp_discovery_evidence_plan_expected_coverage).toBeNull();
|
||||
expect(debug.mcp_discovery_evidence_plan_missing_axes).toEqual([]);
|
||||
expect(debug.mcp_discovery_catalog_chain_template_matches).toEqual([]);
|
||||
expect(debug.mcp_discovery_catalog_chain_alignment_status).toBeNull();
|
||||
expect(debug.mcp_discovery_catalog_chain_top_match).toBeNull();
|
||||
|
||||
@@ -46,6 +46,34 @@ describe("assistant MCP discovery planner", () => {
|
||||
expect(result.required_axes).toEqual(["counterparty", "period", "aggregate_axis", "amount", "coverage_target"]);
|
||||
expect(result.catalog_review.review_status).toBe("catalog_compatible");
|
||||
expect(result.discovery_plan.answer_may_use_raw_model_claims).toBe(false);
|
||||
expect(result.evidence_plan).toMatchObject({
|
||||
schema_version: "assistant_evidence_planner_v1",
|
||||
planner_status: "ready_for_execution",
|
||||
selected_chain_id: "value_flow",
|
||||
data_need: {
|
||||
business_fact_family: "value_flow",
|
||||
action_family: "turnover",
|
||||
proof_expectation: "coverage_checked_fact"
|
||||
},
|
||||
coverage_gate: {
|
||||
expected_coverage: "confirmed_coverage",
|
||||
answer_permission_if_satisfied: "confirmed_business_answer",
|
||||
answer_may_use_raw_model_claims: false
|
||||
},
|
||||
answer_contract: {
|
||||
answer_mode: "confirmed_business_answer",
|
||||
must_keep_internal_mechanics_hidden: true
|
||||
}
|
||||
});
|
||||
expect(result.evidence_plan.evidence_axes.required_axes).toEqual([
|
||||
"counterparty",
|
||||
"period",
|
||||
"aggregate_axis",
|
||||
"amount",
|
||||
"coverage_target"
|
||||
]);
|
||||
expect(result.evidence_plan.evidence_axes.provided_axes).toEqual(["counterparty", "business_entity", "period"]);
|
||||
expect(result.evidence_plan.evidence_axes.missing_axes).toEqual(["aggregate_axis", "amount", "coverage_target"]);
|
||||
expect(result.data_need_graph?.business_fact_family).toBe("value_flow");
|
||||
expect(result.catalog_chain_template_matches[0]).toBe("value_flow");
|
||||
expect(result.catalog_chain_template_alignment).toMatchObject({
|
||||
@@ -284,6 +312,17 @@ describe("assistant MCP discovery planner", () => {
|
||||
selected_chain_matches_top: true
|
||||
});
|
||||
expect(result.catalog_review.review_status).toBe("catalog_compatible");
|
||||
expect(result.evidence_plan.coverage_gate.expected_coverage).toBe("bounded_inference");
|
||||
expect(result.evidence_plan.answer_contract.answer_mode).toBe("bounded_business_inference");
|
||||
expect(result.evidence_plan.answer_contract.required_user_layers).toEqual([
|
||||
"business_conclusion",
|
||||
"key_figures",
|
||||
"evidence_boundary",
|
||||
"next_step"
|
||||
]);
|
||||
expect(result.evidence_plan.answer_contract.forbidden_overclaim_flags).toContain(
|
||||
"no_unchecked_business_health_claim"
|
||||
);
|
||||
expect(result.reason_codes).toContain("planner_selected_business_overview_from_data_need_graph");
|
||||
expect(result.reason_codes).toContain("planner_instantiated_catalog_chain_template_business_overview");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user