Skip to content

[API tests] Ensure vendor-payment journal number series - #11228

Open
Prangshuman Das (t-prda) wants to merge 41 commits into
prdas/646383-split-quote-datesfrom
prdas/646383-split-journal-numbering
Open

Prangshuman Das (t-prda) wants to merge 41 commits into
prdas/646383-split-quote-datesfrom
prdas/646383-split-journal-numbering

Conversation

@t-prda

@t-prda Prangshuman Das (t-prda) commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Assign a generated number series only when the test-created vendor-payment journal batch lacks one. Keep production numbering behavior unchanged.

AB#646383 — follow-up split from PR #10085; link only, not an instruction to resolve the umbrella work item.

Evidence and limits

Two observed CZ failures in saved result set 2: CU139843.TestCreateVendorPaymentWithoutDocNo and CU139867.TestApplyVendorEntryAppliesPayment. There are 18 direct test callers of the shared helper, but only these two failures are evidenced by those saved results.

Native GitHub stack #11893

This draft is stacked above #11227. #10085 is the bottom API-authentication fix. The review diff contains only this layer's fix plus removal of its 2 temporary method exclusions. Earlier layers are inherited, not repeated in this diff.

Existing PR/branch history is preserved; no force-push or merge into main was performed. NAV selection/company/native exclusions and existing out-of-scope Expense exclusions remain untouched.

Methods re-enabled by this layer

  • 139843.TestCreateVendorPaymentWithoutDocNo
  • 139867.TestApplyVendorEntryAppliesPayment

Validation

Exact parent ancestry, file scope, whitespace and exclusion ownership checks pass. This layer's added/removed source lines are unchanged relative to its refreshed parent. Upstream changes are inherited through the main merge, not reverted. Earlier exact-head cumulative artifact evidence is historical after this parent reconciliation; fresh new-head runtime validation is pending. Existing excluded PDF, IN/RU gaps and tolerated-native distinctions remain; no absent/excluded case is claimed passing.

Historical targeted country evidence

Historical before this parent reconciliation; not new-head proof.

Final full-stack artifacts at da6d82d6c8cf7c64bbd7355ca0acab28f0d5e28a verify CZ: 2/2 owned methods passed exactly once. Each listed method passed exactly once in its country artifact from run36162564729. These are targeted country checks, not a claim about excluded PDF/native cases or Windows authentication.

Validation limits

The previous UserPassword HTTP 401/200/401 result is historical after this reconciliation. CU139496 MicrosoftAuthenticationRespectsServerAuthMode still executes all three requests; Windows200/200/200 runtime remains unverified. The workflow clean-codeunit gate stays default-off and uptake stays explicitly enabled. No provider, authentication contract, new public event, NAV selector or foreign NST change was introduced. Excluded PDF cases and absent/excluded country/native cases remain unverified; prior tolerated-native results are not universal passes. The 59 owned re-enabled methods cover the reviewed fixes, not59 distinct product defects. Validation drafts remain Do Not Merge, outside native stack #11893.

Current checkpoint

Head 43d49532985f295124457991410ca72345592232, tree 0133d29f172a77b982a358260ca79000efef9b82; parent 19d9186d1531b3856702491e36ef23b5e47f762b.

Forward-integrated only captured main eaddd6b3c518414f372154ea6cedd6c12b287359 to resolve the actual uptake/full SyncMirror conflict. Upstream independently added three response clears and a ninth activity-log test, TravelRequestSubmissionExposesTotalExpectedAmounts, plus travel-request scope behavior. The reconciliation keeps all upstream additions and assertions, the original eight methods, all four independent policy-response clears, five query-safe URL compositions, configured auth provider, setup restoration and unlimited-approval fixture. All unrelated upstream changes and new exclusions remain; each layer retains its scoped changes. No moving-main refresh, warning suppression or retry-policy expansion.

Local Pester:117 passed, zero failed/skipped at exact workflow, uptake and full heads. Deterministic blob/patch inventories verify captured-main propagation and semantic conflict resolution. The23 committed wrappers/shared success-only finalizer, absent generator, current-process credential identity, ACLs, buffer zeroing and narrowed classifier remain unchanged. Tenant-info help correctly documents Id/DatabaseName objects; executable workflow behavior is unchanged from the preceding checkpoint.

Fresh exact-head GitHub CI is pending, not passed. The activity-log codeunit now has9 methods: retain verification of the original176 cases (8x22), plus22 upstream-added cases, for198 if all22 Integration countries run. Old workflow successes and policy contamination evidence are historical, not fresh runtime proof. Seven correlated SQL-pool NREs occurred after tenant refreshes; lifecycle coupling remains possible, not infrastructure-only. The ES generated-sequence duplicate occurred during ordinary upstream SLS installation before discovery/reset; its precise race remains unproven. No blanket retries were issued.

Accepted cleanup limitation: success-only explicit cleanup; failed/cancelled runs rely on normal container teardown, with no hard-runner-loss guarantee. Per-run disposable CI credentials limit risk, not eliminate it; supplied credentials may differ. Hook invocation alone does not prove file deletion after teardown. CU139806 TestGetCompanyAndEnvironmentDescriptions remains excluded pending original rationale/current NAV verification (PR11741). Permission cleanup from PR11561, native stack #11893, merged prefix and draft/ready states are preserved; validation drafts remain Do Not Merge. Windows runtime and excluded PDF/native coverage remain unverified.

Split from the preserved PR10085 snapshot. AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve published branch history and re-enable only the 2 methods covered by this layer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda
Prangshuman Das (t-prda) changed the base branch from main to prdas/646383-split-quote-dates September 8, 2026 17:06
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda
Prangshuman Das (t-prda) removed this pull request from stack #11232 September 24, 2026 15:27
@t-prda
Prangshuman Das (t-prda) added this pull request to stack #11863 September 24, 2026 15:27
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@github-actions

Copy link
Copy Markdown
Contributor

Issue #11561 is not valid. Please make sure you link an issue that exists, is open and is approved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda Prangshuman Das (t-prda) added the Team: Finance GitHub request for Finance area label Sep 28, 2026
@github-actions github-actions Bot removed the Team: Finance GitHub request for Finance area label Sep 28, 2026
@t-prda
Prangshuman Das (t-prda) marked this pull request as ready for review September 28, 2026 11:09
@t-prda
Prangshuman Das (t-prda) requested a review from a team September 28, 2026 11:09
@t-prda
Prangshuman Das (t-prda) requested a review from a team as a code owner September 28, 2026 11:09
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept

What this PR does

This change gives a test-created vendor-payment journal batch a generated number series when its template leaves that value blank. The guard addresses the failure at its source, preserves an existing configured series, and lets API tests generate document numbers as expected.

Problem-solution fit

Fit: Strong

The change directly covers the reported vendor-payment failures, and both re-enabled scenarios exercise the updated shared helper.

Suggestions

None.

Risk assessment and necessity

Risk: Low. The change is limited to test infrastructure. It affects the vendor-payment tests that use this helper, but only fills a blank number series and leaves existing configuration unchanged.

Necessity: The change is needed to run the two previously disabled scenarios in environments where the vendor-payment template has no number series.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11228 round=1 by=alexei-dobriansky at=2026-09-28T22:21:45.9059082Z lastSha=7641cd6f04750a7fa3d92777fa6777f413c81835 reviewKey=aac7d5fb76e8f29646069dd84697ecadb6ba793ae345299e11bd7d89fe68e7aa suggestions=none

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
…exclusion

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 2

Recommendation: Accept

What this PR does

The commits since round 1 reconcile the stacked parent only. The layer-owned AL code is unchanged, and the net diff still assigns a generated number series only when the test-created vendor-payment batch lacks one, then re-enables the same two scenarios.

Status of previous suggestions

Round 1 had no suggestions.

New observations (commits since round 1)

None — no new layer-owned hunk appears in both the incremental view and the current net PR diff.

Risk assessment and necessity

Risk: Low. The change remains test-only, preserves configured number series, and changes shared-helper behavior only when the generated batch has no series. Fresh exact-head runtime validation is pending.

Necessity: The change remains necessary to run the two vendor-payment scenarios where the template provides no number series.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11228 round=2 by=alexei-dobriansky at=2026-10-02T22:25:54.7350824Z lastSha=582fe9675fc8365823fb9d894d422ad874f4e08d reviewKey=df3efa1a79919e1ddf4431858d49008cb6d984e993c72fa6626005b41f19efab suggestions=none parentRound=1

begin
JournalName := LibraryUtility.GenerateRandomCode(GenJournalBatch.FieldNo(Name), DATABASE::"Gen. Journal Batch");
LibraryAPIGeneralJournal.EnsureGenJnlBatchExists(GraphMgtJournal.GetDefaultVendorPaymentsTemplateName(), JournalName);
GenJournalBatch.Get(GraphMgtJournal.GetDefaultVendorPaymentsTemplateName(), JournalName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Performance}$

CreateVendorPaymentsJournal calls EnsureGenJnlBatchExists, which already performs a primary-key Get for this template and batch, and then immediately performs the same Get again before checking No. Series. This adds an avoidable database round trip on every helper call; return or pass through the record loaded by the ensure helper, or otherwise combine the existence check and No. Series update into one lookup.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.48.6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
…I test fixes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91

This branch was successfully deployed

1 active (outdated) deployment
triage — 7641cd6f Deployed Sep 28, 2026 by t-prda via Classify team ownership #5947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants