-
Notifications
You must be signed in to change notification settings - Fork 436
[Payables Agent] Agent-driven line matching #7546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ca778d8
fc8f9dc
ec8c181
8981d5f
a9f2b74
feedf3c
a4c5087
7ec1340
3db57e6
11ef6de
82041cb
97089c9
b540a26
92bb0a7
c08fd60
0ae0ec4
56c10f2
dab8b09
43e7063
e012f73
9509a8b
01857e9
7f8b235
a9ca176
18e009e
8ddfb38
ad67c35
d5d28e3
3666dc8
b8114d9
6df0f67
6185411
f2eb794
a23a5e9
9d42f08
32d1a92
d996534
ff58c59
6a5418e
ac6ed4e
be58e44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,6 +85,10 @@ | |
| "from": 6234, | ||
| "to": 6234 | ||
| }, | ||
| { | ||
| "from": 6244, | ||
| "to": 6249 | ||
| }, | ||
| { | ||
| "from": 6401, | ||
| "to": 6411 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ namespace Microsoft.eServices.EDocument.Processing.Import; | |
| using Microsoft.eServices.EDocument; | ||
| using Microsoft.eServices.EDocument.Processing.Interfaces; | ||
| using Microsoft.Purchases.Vendor; | ||
| using System.Config; | ||
|
|
||
| codeunit 6125 "Prepare Purchase E-Doc. Draft" implements IProcessStructuredData | ||
| { | ||
|
|
@@ -16,7 +17,12 @@ codeunit 6125 "Prepare Purchase E-Doc. Draft" implements IProcessStructuredData | |
| PrepareDraftHelper: Codeunit "EDoc Prepare Purch. Draft"; | ||
|
|
||
| procedure PrepareDraft(EDocument: Record "E-Document"; EDocImportParameters: Record "E-Doc. Import Parameters"): Enum "E-Document Type" | ||
| var | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tenant-level experiment key 'PAAgentDrivenLineMatching' and its treatment value 'agent_driven' are declared as separate, independently-maintained Label literals in two different apps: src/Apps/W1/EDocument/App/src/Processing/Import/PrepareDraft/PreparePurchaseEDocDraft.Codeunit.al (AgentDrivenLineMatchingTok/AgentDrivenTreatmentTok) and src/Apps/W1/PayablesAgent/app/Setup/PayablesAgentSetup.Codeunit.al (same token names/values, used both to select the prompt variant and to build the config-hash fingerprint). Both call sites must agree on the exact key and treatment string for the feature to behave consistently (EDocument decides whether to skip its own draft-prep logic based on the same flag PayablesAgent uses to pick the prompt and to detect instruction drift). Because the string is duplicated rather than shared from one owning location, a future rename or value change in one app silently desynchronizes from the other with no compile-time signal, causing PrepareDraft's branch and the agent's active prompt/config-hash to diverge. Recommend hoisting the experiment key (and its treatment value) into a single shared/public constant or procedure that both apps reference, or having EDocument call a published PayablesAgent API for the check instead of re-declaring the literal. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4 |
||
| FeatureConfiguration: Codeunit "Feature Configuration"; | ||
| begin | ||
| if FeatureConfiguration.GetConfiguration(AgentDrivenLineMatchingTok) = AgentDrivenTreatmentTok then | ||
|
dayland marked this conversation as resolved.
|
||
| exit("E-Document Type"::"Purchase Invoice"); | ||
|
|
||
| PrepareDraftHelper.PrepareDraft(EDocument, EDocImportParameters); | ||
| exit("E-Document Type"::"Purchase Invoice"); | ||
| end; | ||
|
|
@@ -35,4 +41,8 @@ codeunit 6125 "Prepare Purchase E-Doc. Draft" implements IProcessStructuredData | |
| begin | ||
| Vendor := PrepareDraftHelper.GetVendor(EDocument, Customizations); | ||
| end; | ||
|
|
||
| var | ||
| AgentDrivenLineMatchingTok: Label 'PAAgentDrivenLineMatching', Locked = true; | ||
|
dayland marked this conversation as resolved.
|
||
| AgentDrivenTreatmentTok: Label 'agent_driven', Locked = true; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.