ARCH: удержать year-switch после contracts pivot
This commit is contained in:
@@ -4080,6 +4080,28 @@ describe("address query limited taxonomy and stage diagnostics", { timeout: 1500
|
||||
});
|
||||
});
|
||||
|
||||
it("auto-broadens out-of-window period after contracts pivot and keeps requested year in the reply", async () => {
|
||||
const service = new AddressQueryService();
|
||||
const seed = await service.tryHandle("покажи договора все по жуковке 51");
|
||||
expect(seed?.handled).toBe(true);
|
||||
expect(seed?.debug.detected_intent).toBe("list_contracts_by_counterparty");
|
||||
|
||||
const result = await service.tryHandle("Р° Р·Р° 2021?", {
|
||||
followupContext: {
|
||||
previous_intent: (seed?.debug.detected_intent as any) ?? "list_contracts_by_counterparty",
|
||||
previous_filters: seed?.debug.extracted_filters,
|
||||
previous_anchor_type: (seed?.debug.anchor_type as any) ?? "counterparty",
|
||||
previous_anchor_value: seed?.debug.anchor_value_resolved ?? seed?.debug.anchor_value_raw ?? null
|
||||
}
|
||||
});
|
||||
|
||||
expect(result?.handled).toBe(true);
|
||||
expect(result?.debug.detected_intent).toBe("list_contracts_by_counterparty");
|
||||
expect(result?.debug.selected_recipe).toBe("address_contracts_by_counterparty_v1");
|
||||
expect(result?.debug.limitations).toContain("period_window_auto_broadened_to_available_data");
|
||||
expect(String(result?.reply_text ?? "")).toContain("2021");
|
||||
});
|
||||
|
||||
describe("address decompose stage follow-up carryover", () => {
|
||||
it("promotes selected-object supplier slang follow-up into inventory provenance with inherited date context", () => {
|
||||
const result = runAddressDecomposeStage('По выбранному объекту "Столешница 600*3050*26 дуб ниагара": кто это поставил нам', {
|
||||
|
||||
Reference in New Issue
Block a user