Post-F: закрепить документный приоритет над bank cue
This commit is contained in:
parent
394eef066e
commit
7d9ba76cc5
|
|
@ -1645,6 +1645,9 @@ function resolveUnicodeAddressIntentBridge(text) {
|
|||
/(?:хвост|задержк|проблем|систематическ)/iu.test(normalized)) {
|
||||
return unicodeBridgeResolution("list_payables_counterparties", "high", "supplier_tail_risk_signal_detected");
|
||||
}
|
||||
if (hasDocumentCue && (hasCounterpartyCue || hasLooseCounterpartyByAnchor) && !hasContractCue) {
|
||||
return unicodeBridgeResolution("list_documents_by_counterparty", "high", "unicode_documents_by_counterparty_bridge_signal_detected");
|
||||
}
|
||||
if (hasBankCue && (hasCounterpartyCue || hasLooseCounterpartyByAnchor) && !hasContractCue) {
|
||||
return unicodeBridgeResolution("bank_operations_by_counterparty", "high", "unicode_bank_ops_by_counterparty_bridge_signal_detected");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2140,6 +2140,14 @@ function resolveUnicodeAddressIntentBridge(text: string): AddressIntentResolutio
|
|||
);
|
||||
}
|
||||
|
||||
if (hasDocumentCue && (hasCounterpartyCue || hasLooseCounterpartyByAnchor) && !hasContractCue) {
|
||||
return unicodeBridgeResolution(
|
||||
"list_documents_by_counterparty",
|
||||
"high",
|
||||
"unicode_documents_by_counterparty_bridge_signal_detected"
|
||||
);
|
||||
}
|
||||
|
||||
if (hasBankCue && (hasCounterpartyCue || hasLooseCounterpartyByAnchor) && !hasContractCue) {
|
||||
return unicodeBridgeResolution(
|
||||
"bank_operations_by_counterparty",
|
||||
|
|
|
|||
|
|
@ -2195,6 +2195,13 @@ describe("address intent resolver expansion (M2.3a)", () => {
|
|||
expect(result.intent).toBe("list_documents_by_counterparty");
|
||||
});
|
||||
|
||||
it("keeps document asks with numeric counterparty suffix out of bank operations", () => {
|
||||
const result = resolveAddressIntent(
|
||||
"\u041f\u043e\u043a\u0430\u0436\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0416\u0443\u043a\u043e\u0432\u043a\u0435 51."
|
||||
);
|
||||
expect(result.intent).toBe("list_documents_by_counterparty");
|
||||
});
|
||||
|
||||
it("resolves transliterated docy slang as documents by counterparty intent", () => {
|
||||
const result = resolveAddressIntent("svk poka docy za 2020");
|
||||
expect(result.intent).toBe("list_documents_by_counterparty");
|
||||
|
|
@ -3168,6 +3175,17 @@ describe("address filter extraction for balance drilldown", () => {
|
|||
expect(result.warnings).toContain("counterparty_anchor_derived_from_loose_by_phrase");
|
||||
});
|
||||
|
||||
it("extracts document counterparty anchor with numeric suffix without account leakage", () => {
|
||||
const result = extractAddressFilters(
|
||||
"\u041f\u043e\u043a\u0430\u0436\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0416\u0443\u043a\u043e\u0432\u043a\u0435 51.",
|
||||
"list_documents_by_counterparty"
|
||||
);
|
||||
expect(result.extracted_filters.counterparty).toBe("\u0416\u0443\u043a\u043e\u0432\u043a\u0435 51");
|
||||
expect(result.extracted_filters.account).toBeUndefined();
|
||||
expect(result.missing_required_filters).toEqual([]);
|
||||
expect(result.warnings).toContain("counterparty_anchor_derived_from_loose_by_phrase");
|
||||
});
|
||||
|
||||
it("cuts trailing as-of date from contract anchor", () => {
|
||||
const result = extractAddressFilters(
|
||||
"Покажи документы по договору 1-ПМ/2020 на дату 31.07.2020",
|
||||
|
|
|
|||
Loading…
Reference in New Issue