Skip to content

[Purchases] Use posted return-shipment report selection for PDF - #11230

Draft
Prangshuman Das (t-prda) wants to merge 5 commits into
prdas/646383-split-field-comparisonfrom
prdas/646383-split-return-shipment-pdf
Draft

Prangshuman Das (t-prda) wants to merge 5 commits into
prdas/646383-split-field-comparisonfrom
prdas/646383-split-return-shipment-pdf

Conversation

@t-prda

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

Copy link
Copy Markdown
Contributor

Scope

Change Return Shpt. PDF Doc.Handler.GeneratePdfBlobWithDocumentType from P.Return to P.Ret.Shpt. This is the only production-code change in the seven-way split and affects report selection/attachment naming.

AB#646383 (link only).

Evidence and limits

No corresponding PDF failure appears in saved result sets 2 or 4. The existing APIV2 purchase-return-shipment suite exclusion is unchanged. A targeted posted-return-shipment PDF regression run is still required.

Only this layer's original fix/exclusion patch is reviewed here (1 paths); the patch is unchanged by Expense-first restructuring.

Exact head: 14fb8d3bf03373ead0875804462aba2b4a2ed4ca; tree: e4467e828ce3d3ad5981d507cdd7daaa22009781.

Expense-first sequencing using existing exclusions

The same 193 method-specific temporary exclusions (135 APIV1 +58 APIV2 across12 codeunits) now live in the existing src/DisabledTests/_Exclude_APIV1__Tests/_Exclude_APIV1__Tests.DisabledTest.json and src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json. No separate sequencing files remain. Original entries retain their order/style/content; no new duplicate or wildcard/codeunit-wide exclusion is introduced. Unrelated pre-existing APIV2 duplicates are preserved rather than mixed with this change.

#11860 removes the temporary additions from these same existing manifests alongside its already-reviewed authentication uptake. All193 temporary stage entries are removed in #11860, but it makes 192/193 target methods eligible: the independent 139739::TestDeleteInUse exclusion remains until the VAT fixture fix #11224 removes it. From #11224 onward all193 are eligible; eligibility is not runtime success. All general/downstream cumulative trees are exactly byte-identical to the preceding checkpoint; the full checkpoint has none of these193 methods excluded. No app-name allowlist, selection setting, runner/authentication/test/production change or Logiq exclusion is added.

Why these methods started executing: they already required Disabled isolation and were IntegrationTest codeunits. Ordinary typed selection in TestSuiteMgt332–352 selects None|Codeunit; the old extra Disabled pass in RunTestsInBcContainer was UnitTest-only. The clean-execution switch newly reaches Disabled IntegrationTest codeunits and still honors the existing JSON exclusions. These193 methods were not listed in those exclusions. This is a pre-existing selection gap, not a newly introduced product auth bug or proof they never ran in any historical configuration. A complete67-codeunit audit preserves existing UnitTest/Legacy behavior and the ten independently handled Logiq integration tests.

**Expense scope is unchanged:**51 API reenables, nine non-API exclusions, baseline six cases and all consolidated regressions. The two legacy Spend Requests methods remain conditional on not CLEAN30. Focused #12325 review:21 files, including the two existing exclusion manifests. General #11860 review:159 files.

The official NAV Disable-NAVALTest helper was inspected: it has no destination/app-file parameter, writes NAV's App/DisabledTests using per-codeunit filenames and sorts entries. It cannot safely preserve these BCApps files. A bounded JSON relocation preserved original prefixes/order and checked exact identities, then exercised the unchanged real loader. No new shared helper/framework or NAV selector change was made.

Validation and presentation evidence

Pester117/117 passed independently at the new Expense/general/full heads. Actual existing-loader checks confirm identical effective193-method selection after relocation and preserved51/9 Expense scope. All nine downstream Git tree hashes remain exactly unchanged. Fresh exact-head CI is pending; old-head successes are not substituted for current runtime evidence.

Historical run37330893173 at head88881be reached193 general methods:171 genuine401 failures and22 nominal passes (17 bare-ASSERTERROR cases can accept the wrong error; five local fixtures). Separately, all51 Expense methods passed in13 inspected countries (663 results), and all63 touched API methods yielded819 results; Activity coverage was117/198 at that checkpoint. These are bounded historical results, not a full/current matrix pass. The preceding stage-fix runs hit50 hosted-runner acquisition cancellations; other jobs were active, so this was not a claimed global outage. New pushes schedule fresh CI, not an AL retry. The general SQL-pool NRE and missing warning-reference artifacts remain separate unresolved limitations.

Durable session presentation notes: api-test-enablement-presentation-notes.md, with source-pinned selection proof, fix/coverage inventory, helper limitations and historical-vs-current evidence boundaries. Fresh runtime proof must still establish the51 Expense cases and actual193-case suppression at Expense stage.

AB#646383 (link only). Native stack #12327 remains #12325 → #11860 → #11224 → #11225 → #11226 → #11227 → #11228 → #11229 → #11230 → #11322. Protected merged #10085/#11862/#11891 and validation #11892 are untouched; validation-only #11861/#11455 remain Do Not Merge. No new main integration, native-group/base change, PR merge, queue operation, Actions cancellation or manual retry was made. All prior heads remain ancestors; source publication used backups and an atomic forward-only push with explicit leases.

Exact current head: 14fb8d3bf03373ead0875804462aba2b4a2ed4ca; source tree: e4467e828ce3d3ad5981d507cdd7daaa22009781.

@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.

@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.

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept with Suggestions

What this PR does

This changes the posted purchase return-shipment PDF handler to use the report-selection usage for posted return shipments instead of purchase return orders. The new value matches the record type passed to the report and the usage already used when printing posted return shipments, so it selects the correct report and keeps attachment naming aligned.

Problem-solution fit

Fit: Strong

The changed value directly corrects the mismatch between a posted return shipment and the return-order report selection. The scope is narrow and addresses the reported PDF behavior without changing posting or stored document data.

Suggestions

S1 (🟠 Moderate): Add targeted posted return shipment PDF coverage
Add a regression test for GeneratePdfBlobWithDocumentType on a posted return shipment. Verify that it uses the P.Ret.Shpt. report selection and produces the expected attachment name.

Risk assessment and necessity

Risk: Low. The one-line change affects PDF report selection and attachment naming for posted purchase return shipments. It does not change posting, ledger entries, amounts, persisted records, or public APIs.

Necessity: The change is required because P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. Without it, the wrong configured report can be used for the generated PDF.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=1 by=alexei-dobriansky at=2026-09-28T12:22:20.2138883Z lastSha=e494103c9652cbd3260756d7091a9689fc31170c reviewKey=40f8e15effe2f91c283f6631e7988a5e92864789ff0f3d816117256f7f56e29b suggestions=S1@f5a9305b

pull Bot pushed a commit to CarstenMertes/BCApps that referenced this pull request Sep 29, 2026
## Purpose


[AB#646383](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/646383)

Add opt-in authentication to `Library - Graph Mgt.` without API
re-enablement or pipeline changes.

## Design

- Default `None` preserves existing behavior. The public enum/interface
and public `API Test Auth Context` retain external provider
extensibility.
- The Microsoft provider stays `Internal`; context `Apply` stays
internal. Internal visibility is API encapsulation, not authorization.
- Credential precedence remains container file, then existing Key Vault
only if the file is absent. Invalid configured credentials fail;
successful passwords remain instance-scoped `SecretText`.
- File credentials now use a private file-mapping provider directly,
without replacing or clearing the session-wide Azure Key Vault
provider/cache. No extra AL plaintext copy is introduced.
- `OnAfterInitializeWebRequestWithURL` remains last. The pre-existing
empty Graph `OnRun` is restored.

The trust boundary is admitted OnPrem test code and environment
credential access, not `Internal` visibility or a destination-URL
restriction.

## Tests and scope

All six AL contracts remain: default None, event ordering, provider
reuse, instance scoping, same-provider reselection and deselection.
The dedicated recorder is removed. The non-SingleInstance internal mock
publishes the **test-only** `OnAfterConfigureAuthentication` event; the
same manually bound test-codeunit instance owns `Library - Variable
Storage` for both recording and verification. Initialization clears that
instance's queue after prior failures; each contract drains it and calls
`AssertEmpty`.

The six source-pattern PowerShell checks are removed, not replaced by
other AL-text assertions. The real 401/200/401 HTTP scenario is owned by
uptake microsoft#11860 after credential provisioning; core has no dependency on
that future workflow. This is not a claim of a complete provider-branch
matrix.

No caller migration, URL repair, credential provisioning, scheduling,
exclusion or work-date rollout belongs to this core.

Native stack #11893: **microsoft#10085 auth core -> microsoft#11862 URL/fixture
prerequisites -> microsoft#11891 workflow infrastructure -> microsoft#11860 AL uptake ->
microsoft#11224–microsoft#11230 -> microsoft#11322 -> microsoft#11451–microsoft#11454**.

## Current checkpoint

Head `4a76bb71851c158083dbe4d22e84bf40a0577842`, tree
`12739039e502a3feeea9e98694fb360ea959c606`.

Merged main baseline remains `0a602a2481c93ebfe7b1d27d6016fb9926c42111`
(permission cleanup from PR 11561). No additional main merge or code
changes were made during finalization. Old `b195c7a`/`4eef8ac`
tree-equality claims remain obsolete after the intentional baseline/auth
changes.

[Verified AL compile/publish/test run
36131334134](https://github.com/microsoft/BCApps/actions/runs/36131334134)
**succeeded, attempt 2**, at exact validation head
`4a76bb71851c158083dbe4d22e84bf40a0577842`. **113/113 test jobs and
113/113 cleanup steps succeeded.** Core has no credential-file
provisioning/removal step (expected).

W1 artifacts verify all **6 auth contracts**.

Local Pester at the applicable checkpoint: **28 passed, zero
failed/skipped**. Core local Pester: **28 passed**; no unsupported claim
about a separate root PowerShell workflow.

## Validation limits

For uptake/full, CU139496
`MicrosoftAuthenticationRespectsServerAuthMode` is verified in the
actual UserPassword fixture (**401/200/401**). The Windows
**200/200/200** expectations are implemented but **Windows runtime
remains unverified**; no foreign local NST was used. Successful GitHub
runs do not establish universal native NAV coverage. Excluded PDF cases,
country-specific absent/excluded cases and tolerated-native distinctions
are not claimed passing. No PR has been merged or auto-merged;
validation drafts remain Do Not Merge outside stack #11893.

---------

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 with Suggestions

What this PR does

The net PR change still updates posted purchase return-shipment PDF generation to use P.Ret.Shpt. instead of P.Return. The commits since round 1 only reconcile the stacked parent and do not alter this hunk; the change still matches the posted document type and the standard report-selection usage.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted posted return shipment PDF coverage Not addressed —
New observations (commits since round 1)

None - commits since round 1 add no attributable net change to this PR.

Risk assessment and necessity

Risk: Low. The one-line change affects only API PDF report selection and attachment naming for posted purchase return shipments. No new net code change was added after round 1, but targeted runtime coverage is still missing.

Necessity: The change is required because P.Return uses purchase return-order configuration, while this handler processes a posted return shipment. Without the change, PDF generation can select the wrong configured report and attachment name.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=2 by=alexei-dobriansky at=2026-09-30T18:13:38.7734192Z lastSha=130808d8c99adb871201d0b36dda259bd2b13ef5 reviewKey=dbd19a31246a78791041846cc2696142f4fafbba7d9dbf13191eaf7b4e80a608 suggestions=S1@f5a9305b:notaddressed parentRound=1

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 3

Recommendation: Accept with Suggestions

What this PR does

The net PR change still updates posted purchase return-shipment PDF generation to use P.Ret.Shpt. instead of P.Return. The commits since round 2 only reconcile the stacked parent and refreshed base; they do not alter the reviewed hunk. The selected usage matches the posted record type, the purchase report-selection setup, and the equivalent posted-document handlers.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted posted return shipment PDF coverage Not addressed —
New observations (commits since round 2)

None - commits since round 2 add no attributable net change to this PR.

Risk assessment and necessity

Risk: Low. The one-line change affects PDF report selection and attachment naming for posted purchase return shipments. The existing API test only checks that the expanded PDF value exists and remains excluded, so it does not protect the exact report-usage and filename behavior.

Necessity: The change is required because P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. Without the change, PDF generation can select the wrong configured report and attachment name.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=3 by=alexei-dobriansky at=2026-10-02T07:19:28.9062628Z lastSha=24b0760ed61b737d387c798d71a82a6226208f6e reviewKey=d71291e67bee2d622db973b3cafbd02bc0beeda785c084b608155cb57f4be5cd suggestions=S1@f5a9305b:notaddressed parentRound=2

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 4

Recommendation: Accept with Suggestions

What this PR does

The net PR change still updates posted purchase return-shipment PDF generation to use P.Ret.Shpt. instead of P.Return. The commits since round 3 only reconcile stacked ancestry and do not alter this hunk; inherited workflow changes are already in the current base. The selected usage matches the posted record type, the standard return-shipment print path, and the equivalent posted-document handler pattern.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted posted return shipment PDF coverage Not addressed —
New observations (commits since round 3)

None - commits since round 3 add no attributable net change to this PR.

Risk assessment and necessity

Risk: Low. The one-line change affects PDF report selection and attachment naming for posted purchase return shipments. The exact handler path still lacks targeted regression coverage, but the change does not affect posting, ledger entries, amounts, persisted document data, or public APIs.

Necessity: The change is required because P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. Without the change, PDF generation can select the wrong configured report and attachment name.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=4 by=alexei-dobriansky at=2026-10-02T12:35:42.3658332Z lastSha=66e9530b09e90282c2f46d248b1a641fe6e9fd05 reviewKey=a1fdee69b8e116ca7e7e3022fdb63d3817046f6e4e5d1747f37a09500620f132 suggestions=S1@f5a9305b:notaddressed parentRound=3

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 5

Recommendation: Accept with Suggestions

What this PR does

The net PR change still updates posted purchase return-shipment PDF generation to use P.Ret.Shpt. instead of P.Return. The commits since round 4 only refresh stacked ancestry and the shared warning baseline; they do not alter the reviewed hunk. The selected usage matches the posted document type, the standard return-shipment print path, and the equivalent posted-document handler pattern.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted posted return shipment PDF coverage Not addressed —
New observations (commits since round 4)

None - commits since round 4 add no attributable net change to this PR.

Risk assessment and necessity

Risk: Low. The one-line change affects PDF report selection and attachment naming for posted purchase return shipments. Fresh exact-head builds and targeted PDF runtime coverage are still pending, but the change does not affect posting, ledger entries, persisted data, public APIs, or events.

Necessity: The change is required because P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. Without the change, PDF generation can select the wrong configured report and attachment name.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=5 by=alexei-dobriansky at=2026-10-02T18:41:32.9087791Z lastSha=004bf02871e12fec89243265b7bb7aaa34823828 reviewKey=551e55ba8a465eb6794c299c01ab0e9362c0906b0558d126aef85e4dfc7e553d suggestions=S1@f5a9305b:notaddressed parentRound=4

@alexei-dobriansky

alexei-dobriansky commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 6

Recommendation: Accept with Suggestions

What this PR does

The scoped PR diff still changes posted purchase return-shipment PDF generation from P.Return to P.Ret.Shpt.. The newer stacked commits do not change this one-line layer. The selected usage matches the posted document type and the standard return-shipment report-selection path.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted posted return shipment PDF coverage Not addressed Fresh targeted PDF runtime coverage is still pending.
New observations

None - the net layer remains the same one-line report-selection fix.

Risk assessment and necessity

Risk: Low. The change affects report selection and attachment naming for posted purchase return shipments. It does not change posting, ledger entries, persisted data, public APIs, or events.

Necessity: P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. P.Ret.Shpt. is the matching report-selection usage.

Suggestions

S1 (🟠 Moderate): Add targeted return-shipment PDF coverage
Add a regression test that configures a distinct P.Ret.Shpt. report and generates the posted return-shipment PDF. Verify the selected report and attachment filename behavior; the current API test only checks that the PDF property exists and its codeunit is excluded.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=6 by=alexei-dobriansky at=2026-10-05T00:54:23.8947050Z lastSha=2ec18ba5e69b3851bd8b01f25462897b30fc57a4 reviewKey=3c0a3c5901f0eaaf0f05fdc5ebb8ed2ce723be66240061b7aa64358e5258cd8f suggestions=S1@f5a9305b:notaddressed parentRound=5

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 7

Recommendation: Accept with Suggestions

What this PR does

The scoped PR diff still changes posted purchase return-shipment PDF generation from P.Return to P.Ret.Shpt.. The commits since round 6 do not change this one-line layer. The selected usage matches the posted document type and keeps report selection and attachment naming aligned.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted return-shipment PDF coverage Not addressed Targeted posted return-shipment PDF runtime coverage is still pending.
New observations (commits since round 6)

None - the net layer remains the same one-line report-selection fix.

Risk assessment and necessity

Risk: Low. The change affects report selection and attachment naming for posted purchase return shipments. It does not change posting, ledger entries, persisted data, public APIs, or report layouts.

Necessity: P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. P.Ret.Shpt. is the matching report-selection usage.

Suggestions

S1 (🟠 Moderate): Add targeted return-shipment PDF coverage
Add a regression test that configures a distinct P.Ret.Shpt. report and generates the posted return-shipment PDF. Verify the selected report and attachment filename behavior; the current evidence does not include this targeted runtime coverage.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=7 by=alexei-dobriansky at=2026-10-05T18:53:01.8330843Z lastSha=fb756cccfeeadfc95010668baa188841edc233fa reviewKey=3e48c87c2d7d55e76b898ff8ec094721df3ef86845a5a4743a64de1cb46ee5da suggestions=S1@f5a9305b:notaddressed parentRound=6

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

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

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

melnikbo pushed a commit to melnikbo/BCApps that referenced this pull request Oct 6, 2026
…cture (microsoft#11891)

## Scope


[AB#646383](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/646383)

Workflow-only prerequisite above microsoft#11862 and below microsoft#11860: 33
`.github`/`build` files including the committed project finalizer
wrappers.

- Atomic protected credential-file materialization and cleanup, with
cleared temporary buffers and consumers stopped before deletion.
- Secondary-tenant Disabled-isolation discovery/restoration and
clean-codeunit worker resets.
- Clean-codeunit execution is opt-in via
`enableCleanTestCodeunitExecution`. This infrastructure stage leaves it
absent/off, preserving ordinary typed/Legacy execution and the existing
Unit Disabled pass, including warmup and retries. Uptake microsoft#11860
activates it alongside AL authentication adoption.
- Existing Legacy lanes, selectors, result aggregation and retry policy
remain; Task Scheduler stays limited to the existing Uncategorized
profile.
- Behavioral PowerShell/ACL coverage of credential lifetime, discovery,
scheduling, retries and result merging.

All AL source and exclusions equal the integrated main baseline
`bb7111877ff786951b86a1a0f80d8b39b8f5dacd`, including merged
auth/prerequisites. No provider adoption or API re-enablement belongs
here. The old Expense helper remains until uptake.
The six relocated source-pattern auth checks are removed here too; the
three additional uptake AL source-inspection assertions were also
removed. No replacement auth source-pattern checks are added.

The previous workflow-only NZ Integration run newly dispatched API
Disabled-isolation codeunits before authentication adoption: CU139700
has 22 failures in its JUnit, while unchanged-core NZ has no CU139700
suite and no failures. These are real runtime regressions, not infra
failures or tolerated-native evidence. The default-off gate restores the
stage boundary; enabled uptake/full behavior remains equivalent to the
previous combined implementation. The earlier workflow run succeeded;
that evidence is historical after this baseline refresh.

Native stack #11893: **microsoft#10085 auth core -> microsoft#11862 URL/fixture
prerequisites -> microsoft#11891 workflow infrastructure -> microsoft#11860 AL uptake ->
microsoft#11224–microsoft#11230 -> microsoft#11322 -> microsoft#11451–microsoft#11454**. Main-targeted draft microsoft#11892
stays outside grouping.

## Validation limits

Historical uptake/full runs verified CU139496
`MicrosoftAuthenticationRespectsServerAuthMode` in the actual
UserPassword fixture (**401/200/401**). The Windows **200/200/200**
expectations are implemented but **Windows runtime remains unverified**;
no foreign local NST was used. Successful GitHub runs do not establish
universal native NAV coverage. Excluded PDF cases, country-specific
absent/excluded cases and tolerated-native distinctions are not claimed
passing. No additional PR was merged or auto-merged during this refresh;
validation drafts remain Do Not Merge outside stack #11893.

## Historical targeted country evidence

Final workflow NZ Integration artifact at
`9269e3df582704881a898e19029308e9296cbbf1` verifies **2,751 test cases,
zero failures, and CU139700 absent**. This confirms the default-off gate
no longer prematurely runs the API Items codeunit that previously had 22
failures. [Workflow
run36157073629](https://github.com/microsoft/BCApps/actions/runs/36157073629)
succeeded with all113 test jobs.

## Current checkpoint

Head `69df41756d918a516a3c868ca66f45cbfd320428`; captured main
`eaddd6b3c518414f372154ea6cedd6c12b287359`.

**Validation BLOCKED; no whole-run or all-country green claim.** Current
exact-head AL runs:
[workflow](https://github.com/microsoft/BCApps/actions/runs/37215976231),
[workflow
validation](https://github.com/microsoft/BCApps/actions/runs/37215975121),
[uptake](https://github.com/microsoft/BCApps/actions/runs/37215975884),
[uptake
validation](https://github.com/microsoft/BCApps/actions/runs/37215973922),
[full](https://github.com/microsoft/BCApps/actions/runs/37215975278).
Remaining jobs are not cancelled.

Platform `30.0.55429.0` reproducibly throws
`AcquireSqlConnectionFromPool` NullReference on the first API GET after
tenant reset: uptake IS Integration job111493435528
(`CapabilitiesProjectsEnabledViaAPI`) and full MX Default
job111493443618 (`TestGetCurrencyExchangeRates`). Both occur56–64
seconds after tenant3 reset; later independent requests pass, but the
failed methods do not recover. No scheduler reset/worker overlap was
found. Async runtime/pool lifecycle coupling remains possible,
unproven—not infrastructure-only. Exact implementation is unavailable in
the exposed NAV tree; runtime-owner source/PDB analysis of pool lifetime
across dismount/copy/remount is required. Separately, uptake-validation
BE job111494278233 fails ordinary SLS installation with a duplicate
datasearch sequence before clean execution. Runner/network outages are
separate failures. No AL retries, arbitrary waits or classifier
broadening will mask these failures.

**Verified partial evidence:** direct uptake CU148343 passes **153/198
cases across17 countries**, including all9 methods and the repaired
policy snapshot method. CA/CZ/ES/NL/NO artifacts were missing
at2026-10-04T19:58Z; absence is not failure or success. Original8
methods, all assertions, four response clears and five query-safe URLs
are preserved alongside upstream's ninth method. Local Pester
remains117/117 at workflow/uptake/full. All4 exact-head PowerShell runs
passed; workflow-validation37215974877 required attempt2 after one
analyzer-tool crash; the other3 passed attempt1. Uptake PowerShell
provenance is validation37215973669 at the same uptake SHA, not a
separate direct-branch run.

The supported finalizer ran after normal teardown in direct workflow BE
Default job111495104917 at2026-10-04T19:30:13.2943924Z and direct uptake
DE Integration job111493433096 at2026-10-04T19:37:30.6075547Z. These
markers prove hook invocation, not explicit deletion when teardown
already removed the file. The23 committed wrappers/shared finalizer and
absent generator remain unchanged. **Accepted limitation:** explicit
cleanup is success-only; failed/cancelled runs rely on normal container
teardown, with no hard-runner-loss guarantee. Credential ACL protections
remain; per-run disposable CI credentials limit risk, not eliminate it.

No CU139496 runtime evidence yet; Legacy1 remains unverified and W1
Default does not cover it. Windows authentication, excluded CompanyInfo
(`TestGetCompanyAndEnvironmentDescriptions`, PR11741), Travel,
PDF/native coverage remain unverified/excluded as applicable. Existing
review fixes/resolutions, native stack #11893, merged prefix,
approval/queue/draft states and upstream exclusions remain unchanged.
Permission cleanup from PR11561 is retained. No new source change,
baseline update, push, merge or AL retry accompanies this checkpoint.
Validation drafts remain Do Not Merge.

---------

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 8

Recommendation: Accept with Suggestions

What this PR does

The net PR change still updates posted purchase return-shipment PDF generation from P.Return to P.Ret.Shpt.. The commits since round 7 add no attributable change to this one-line layer. The selected usage matches the posted document type and keeps report selection and attachment naming aligned.

Status of previous suggestions
ID Title Status Author response
S1 Add targeted return-shipment PDF coverage Not addressed Targeted posted return-shipment PDF runtime coverage is still pending.
New observations (commits since round 7)

None - the net layer remains the same one-line report-selection fix.

Risk assessment and necessity

Risk: Low. The change affects report selection and attachment naming for posted purchase return shipments. It does not change posting, ledger entries, persisted data, public APIs, or report layouts.

Necessity: P.Return selects purchase return-order configuration, while this handler processes a posted return shipment. P.Ret.Shpt. is the matching report-selection usage.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11230 round=8 by=alexei-dobriansky at=2026-10-06T07:23:32.6643440Z lastSha=14fb8d3bf03373ead0875804462aba2b4a2ed4ca reviewKey=f53dcc639f63e009efbc3d872e6974a100d83e42fa725df04a7501134a383c57 suggestions=S1@f5a9305b:notaddressed parentRound=7

melnikbo pushed a commit to melnikbo/BCApps that referenced this pull request Oct 7, 2026
…microsoft#12325)

## Scope

Related authentication and API enablement:
[AB#646383](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/646383)
(link only; this PR does not resolve the umbrella item).

Fixes
[AB#653119](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/653119)

Separate test defect: [653119 - Policy snapshot API URL composition and
response
isolation](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/653119).
This tracks the policy-snapshot test corrections, not production access
permissions or unrelated runtime failures.

Expense-first adoption directly against main after the external squash
merge of workflow microsoft#11891; remaining general APIs follow in microsoft#11860.

- Migrate the 11 reviewed Expense API/helper paths to shared
authentication and remove exactly 51 existing Expense API exclusions.
Preserve exactly nine non-API Expense exclusions; all 19 previously
retained API exclusions are now removed.
- Enable the existing `enableCleanTestCodeunitExecution` boolean. Use
existing DisabledTests selectors throughout discovery, ordinary
execution and clean-codeunit execution/reruns. No app-name allowlist,
new selection setting or runner implementation/test change.
- Include the six-line license-safe WorkDate helper needed by PerDiem,
five query-safe policy URL compositions, four independent response
clears, and the existing unlimited-approval fixture. Preserve all nine
Activity Log tests and upstream assertions.
- Consolidate microsoft#11453's exact assigned-user filter (no cross-table range
compression), true fallback fixture and regressions. Upstream wildcard
quoting alone did not fix the range-gap case.
- Consolidate microsoft#11451's unique denied-approval error/permission capture
and microsoft#11454's existing repeated-delta, missing-header-permission,
Released-status and real deletion-total regressions, including its
internal test-only permission set.
- Do not reintroduce upstream repairs from microsoft#11654 (three permission-role
tests and posted zero-amount fixture), the obsolete date test removed by
microsoft#12074, or the production indirect-Modify change already supplied by
microsoft#11333. microsoft#11452's duplicate deletion helper is absent; existing callers
use the upstream shared helper.
- All seven artificial Expense exclusions introduced by the previous
uptake are absent here and at every general checkpoint. This is not
blanket re-enablement of Expense tests.

This focused review diff has21 paths, using the two existing API
exclusion manifests. No NAV selectors, local NST, BC-ExpenseAgent
changes, unrelated new test scope or production permission changes.

Exact head: `bd3bbc04e13965f967a26eef435bdbf0cbc09ad7`; tree:
`2b8c47b138846f63bd49d47188f54ea7e86c1f24`.

## Expense-first sequencing using existing exclusions

The same **193 method-specific temporary exclusions (135 APIV1 +58 APIV2
across12 codeunits)** now live in the existing
`src/DisabledTests/_Exclude_APIV1__Tests/_Exclude_APIV1__Tests.DisabledTest.json`
and
`src/DisabledTests/_Exclude_APIV2__Tests/_Exclude_APIV2__Tests.DisabledTest.json`.
No separate sequencing files remain. Original entries retain their
order/style/content; no new duplicate or wildcard/codeunit-wide
exclusion is introduced. Unrelated pre-existing APIV2 duplicates are
preserved rather than mixed with this change.

microsoft#11860 removes the temporary additions from these same existing
manifests alongside its already-reviewed authentication uptake. All193
temporary stage entries are removed in microsoft#11860, but it makes **192/193
target methods eligible**: the independent `139739::TestDeleteInUse`
exclusion remains until the VAT fixture correction in PR
[microsoft#11224](microsoft#11224) removes it.
From microsoft#11224 onward all193 are eligible; eligibility is not runtime
success. All general/downstream cumulative trees are **exactly
byte-identical** to the preceding checkpoint; the full checkpoint has
none of these193 methods excluded. No app-name allowlist, selection
setting, runner/authentication/test/production change or Logiq exclusion
is added.

**Why these methods started executing:** they already required Disabled
isolation and were IntegrationTest codeunits. Ordinary typed selection
in TestSuiteMgt332–352 selects None|Codeunit; the old extra Disabled
pass in RunTestsInBcContainer was UnitTest-only. The clean-execution
switch newly reaches Disabled IntegrationTest codeunits and still honors
the existing JSON exclusions. These193 methods were not listed in those
exclusions. This is a pre-existing selection gap, not a newly introduced
product auth bug or proof they never ran in any historical
configuration. A complete67-codeunit audit preserves existing
UnitTest/Legacy behavior and the ten independently handled Logiq
integration tests. Historical baseline run37215976231 at
head69df41756d918a516a3c868ca66f45cbfd320428 independently corroborates
this: zero of the exact193 methods appear across five inspected W1
result artifacts containing37,626 testcases (Integration, both Legacy
buckets, default/unit and Uncategorized). This evidence is limited to
that W1 baseline, not every country or historical run. The completed
alternate-path audit found no other ordinary configured baseline BCApps
lane: APIV1/APIV2 are outside Legacy buckets, Disabled-unit fallback
retains UnitTest filtering, discovery skips test procedures, and
ordinary PR/CI/CD/rerun routes do not bypass those constraints. Manual
or explicitly untyped execution remains possible; no universal
historical or NAV absence is claimed.

**Expense scope is unchanged:**51 API reenables, nine non-API
exclusions, baseline six cases and all consolidated regressions. The two
legacy Spend Requests methods remain conditional on not CLEAN30. Focused
microsoft#12325 review:21 files, including the two existing exclusion manifests.
General microsoft#11860 review:159 files.

The official NAV `Disable-NAVALTest` helper was inspected: it has no
destination/app-file parameter, writes NAV's App/DisabledTests using
per-codeunit filenames and sorts entries. It cannot safely preserve
these BCApps files. A bounded JSON relocation preserved original
prefixes/order and checked exact identities, then exercised the
unchanged real loader. No new shared helper/framework or NAV selector
change was made.

## Validation and presentation evidence

**Pester117/117 passed independently at the new Expense/general/full
heads.** Actual existing-loader checks confirm identical
effective193-method selection after relocation and preserved51/9 Expense
scope. All nine downstream Git tree hashes remain exactly unchanged.
Fresh exact-head CI is pending; old-head successes are not substituted
for current runtime evidence.

Historical run37330893173 at head88881be reached193 general methods:171
genuine401 failures and22 nominal passes (17 bare-ASSERTERROR cases can
accept the wrong error; five local fixtures). Separately, all51 Expense
methods passed in13 inspected countries (663 results), and all63 touched
API methods yielded819 results; Activity coverage was117/198 at that
checkpoint. These are bounded historical results, not a full/current
matrix pass. The preceding stage-fix runs hit50 hosted-runner
acquisition cancellations; other jobs were active, so this was not a
claimed global outage. New pushes schedule fresh CI, not an AL retry.
The general SQL-pool NRE and missing warning-reference artifacts remain
separate unresolved limitations.

Durable session presentation notes:
**api-test-enablement-presentation-notes.md**, with source-pinned
selection proof, fix/coverage inventory, helper limitations and
historical-vs-current evidence boundaries. Fresh runtime proof must
still establish the51 Expense cases and actual193-case suppression at
Expense stage.


[AB#646383](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/646383)
(link only). Native stack #12327 remains microsoft#12325 → microsoft#11860 → microsoft#11224 →
microsoft#11225 → microsoft#11226 → microsoft#11227 → microsoft#11228 → microsoft#11229 → microsoft#11230 → microsoft#11322. Protected
merged microsoft#10085/microsoft#11862/microsoft#11891 and validation microsoft#11892 are untouched;
validation-only microsoft#11861/microsoft#11455 remain Do Not Merge. No new main
integration, native-group/base change, PR merge, queue operation,
Actions cancellation or manual retry was made. All prior heads remain
ancestors; source publication used backups and an atomic forward-only
push with explicit leases.

Exact current head: `bd3bbc04e13965f967a26eef435bdbf0cbc09ad7`; source
tree: `2b8c47b138846f63bd49d47188f54ea7e86c1f24`.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3952f078-a881-4da8-ad96-13b727e48a91
@t-prda
Prangshuman Das (t-prda) marked this pull request as draft October 7, 2026 13:12

This branch was successfully deployed

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

Labels

Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants