АРЧ АП11 - Архитектура после регресса: Архитектура: централизовать address debug context для memory recap и living-chat follow-up
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveAssistantOrganizationAuthority } from "../src/services/assistantContinuityPolicy";
|
||||
import {
|
||||
resolveAddressDebugContextFacts,
|
||||
resolveAssistantOrganizationAuthority
|
||||
} from "../src/services/assistantContinuityPolicy";
|
||||
|
||||
describe("assistantContinuityPolicy organization authority", () => {
|
||||
it("prefers explicit assistant organization authority over older grounded continuity and merges known organizations once", () => {
|
||||
@@ -55,4 +58,21 @@ describe("assistantContinuityPolicy organization authority", () => {
|
||||
]);
|
||||
expect(authority.organizationClarificationSelectionFromScope).toBe("Org Selected");
|
||||
});
|
||||
|
||||
it("reads item, organization and scoped date from root-frame fallback when direct filters are missing", () => {
|
||||
const facts = resolveAddressDebugContextFacts({
|
||||
anchor_type: "item",
|
||||
anchor_value_resolved: "Рабочая станция",
|
||||
address_root_frame_context: {
|
||||
organization: 'ООО "Альтернатива Плюс"',
|
||||
as_of_date: "2020-03-31"
|
||||
}
|
||||
});
|
||||
|
||||
expect(facts).toEqual({
|
||||
item: "Рабочая станция",
|
||||
organization: 'ООО "Альтернатива Плюс"',
|
||||
scopedDate: "31.03.2020"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user