Уточнить ответ о заработке через учетный финрезультат
This commit is contained in:
@@ -705,6 +705,77 @@ describe("assistant MCP discovery response candidate", () => {
|
||||
expect(candidate.reply_text).not.toContain("wide overview");
|
||||
});
|
||||
|
||||
it("leads earnings wording with accounting result when explicit-period proof is available", () => {
|
||||
const candidate = buildAssistantMcpDiscoveryResponseCandidate(
|
||||
entryPoint({
|
||||
turn_input: {
|
||||
adapter_status: "ready",
|
||||
turn_meaning_ref: {
|
||||
raw_message: "а за 2017 мы скок заработали?",
|
||||
asked_action_family: "broad_evaluation",
|
||||
unsupported_but_understood_family: "broad_business_evaluation",
|
||||
explicit_organization_scope: "ООО Альтернатива Плюс",
|
||||
explicit_date_scope: "2017"
|
||||
},
|
||||
data_need_graph: {
|
||||
business_fact_family: "business_overview",
|
||||
ranking_need: null,
|
||||
reason_codes: [
|
||||
"data_need_graph_family_business_overview",
|
||||
"data_need_graph_business_overview_direct_money_answer"
|
||||
]
|
||||
}
|
||||
},
|
||||
bridge: {
|
||||
bridge_status: "answer_draft_ready",
|
||||
user_facing_response_allowed: true,
|
||||
business_fact_answer_allowed: true,
|
||||
requires_user_clarification: false,
|
||||
pilot: {
|
||||
pilot_scope: "business_overview_route_template_v1",
|
||||
derived_business_overview: {
|
||||
period_scope: "2017",
|
||||
incoming_customer_revenue: {
|
||||
total_amount_human_ru: "16 932 063,96 руб."
|
||||
},
|
||||
outgoing_supplier_payout: {
|
||||
total_amount_human_ru: "15 617 432,52 руб."
|
||||
},
|
||||
net_amount_human_ru: "1 314 631,44 руб.",
|
||||
net_direction: "net_incoming",
|
||||
top_customers: [],
|
||||
top_suppliers: [],
|
||||
accounting_financial_result: {
|
||||
final_result_direction: "profit",
|
||||
final_result_amount_human_ru: "116 938,23 руб.",
|
||||
net_margin_to_revenue_pct: 1.03,
|
||||
period_scope: "2017"
|
||||
}
|
||||
}
|
||||
},
|
||||
answer_draft: {
|
||||
answer_mode: "confirmed_with_bounded_inference",
|
||||
headline: "wide overview should not leak",
|
||||
confirmed_lines: [],
|
||||
inference_lines: [],
|
||||
unknown_lines: [],
|
||||
limitation_lines: [],
|
||||
next_step_line: null
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
expect(candidate.reply_text).toContain("учетная прибыль");
|
||||
expect(candidate.reply_text).toContain("116 938,23");
|
||||
expect(candidate.reply_text).toContain("маржа");
|
||||
expect(candidate.reply_text).toContain("1.03%");
|
||||
expect(candidate.reply_text).toContain("денежное нетто");
|
||||
expect(candidate.reply_text).toContain("1 314 631,44");
|
||||
expect(candidate.reply_text).toContain("разные метрики");
|
||||
expect(candidate.reply_text).not.toContain("wide overview");
|
||||
});
|
||||
|
||||
it("uses compact cashflow output for one-line no-breakdown wording", () => {
|
||||
const candidate = buildAssistantMcpDiscoveryResponseCandidate(
|
||||
entryPoint({
|
||||
|
||||
Reference in New Issue
Block a user