Skip to content

[API tests] Separate APIV1 fixture and verification reliability fixes - #11322

Open
Prangshuman Das (t-prda) wants to merge 33 commits into
prdas/646383-split-return-shipment-pdffrom
prdas/646383-split-apiv1-reliability
Open

Prangshuman Das (t-prda) wants to merge 33 commits into
prdas/646383-split-return-shipment-pdffrom
prdas/646383-split-apiv1-reliability

Conversation

@t-prda

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

Copy link
Copy Markdown
Contributor

Scope

AB#646383

Draft follow-up to #11230, based on prdas/646383-split-return-shipment-pdf.

  • Identify five posted blank API lines by GUID description and exact record lookup.
  • Regenerate RapidStart fixtures per invocation; refresh all three polling loops, correct expected/actual assertion order, and fix the apply-status qualifier.
  • Keep G/L journal-template handler state in a codeunit global.
  • Enable Foundation setup for the invoice discount-percent scenario.
  • Re-enable exactly ten APIV1 methods temporarily quarantined while these business fixes were separated. These were conservative/deferred exclusions, not newly proven failures. RS create/upload were not additionally quarantined.

Lifetime and preservation

Automation initialization keeps workdate first, followed by idempotent authentication-provider selection, per-test cleanup, and sample generation. Removing the guard makes provider selection per invocation; its existing same-provider early return remains intact.

Preserves the shared prefix, all seven earlier API-fix layers, APIV2 wildcards, and all 48 Expense exclusion entries inherited at this layer. Only eight AL files and the APIV1 exclusion manifest change.

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.

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 b1973cf1bd2f40f58038b95adfae8ff45fd51565, tree 90e607244ddf7ca30b50838338236c11fba423ef; parent 004bf02871e12fec89243265b7bb7aaa34823828.

Forward-integrated captured main bb7111877ff786951b86a1a0f80d8b39b8f5dacd, including upstream CLEAN27 removal 82b11d26c073de93df3aab17434069f72feab640 (PR12066), to align the direct stacked-PR warning gate. The prior direct uptake checkout retained obsolete source while warning-reference run37020063048 used main73d5794e; RU and CH therefore each reported51 additional warnings (36 AA0244,15 AA0218). Main-targeted RU validations already passed with cleaned source. No warning suppression, parameter rename, partial cherry-pick, or comparator change was made.

Local Pester:117 passed, zero failed/skipped at exact workflow, uptake and full heads. Every layer retains its exact owned patch; all changed baseline blobs equal captured main, and all remaining blobs—including exclusions—are unchanged. The23 committed wrappers/shared success-only finalizer, generator removal, current-process credential identity, ACLs, buffer clearing and narrowed platform classifier remain intact; ordinary configured reruns are unchanged.

Accepted cleanup limitation: failed/cancelled runs rely on normal container teardown; no hard-runner-loss guarantee. Normal CI uses per-run disposable credentials, but supplied credentials may differ. Hook logs prove invocation, not necessarily explicit deletion if teardown already removed the file.

Uptake retains the five query-safe URL compositions in CU148343 StandardSubmissionExposesPolicySnapshot, all assertions,8 methods, setup restoration and the single unlimited-approval fixture. Workflow remains default-off; uptake enables clean execution. Auth visibility/provider contracts and HTTP scenario are preserved. Upstream shared Spend Request zero-amount UnitTest semantics and permission cleanup from PR11561 remain unchanged. CU139806 TestGetCompanyAndEnvironmentDescriptions stays excluded pending its original rationale/current NAV verification (PR11741).

Fresh exact-head GitHub CI is pending, not passed. Previous runs are historical for these new commits. Verify all8 activity methods across22 countries if present; Windows runtime and excluded PDF/native coverage remain unverified. Only this captured main was integrated—no repeated baseline chasing. Merged prefix/native stack #11893 and draft/ready states remain unchanged; validation drafts remain Do Not Merge.

AB#646383

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Sep 10, 2026
@t-prda
Prangshuman Das (t-prda) added this pull request to stack #11232 September 10, 2026 11:43
@github-actions github-actions Bot added the Team: Integrations GitHub request for Integrations area label Sep 10, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Sep 10, 2026
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
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

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) marked this pull request as ready for review September 28, 2026 11:13
@t-prda
Prangshuman Das (t-prda) requested a review from a team September 28, 2026 11:13
@t-prda
Prangshuman Das (t-prda) requested a review from a team as a code owner September 28, 2026 11:13
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept

What this PR does

This PR makes the affected APIV1 tests deterministic before re-enabling ten methods. It uses exact record lookup, refreshes asynchronous status reads, regenerates RapidStart fixtures, keeps handler state stable, and enables the required application area. The changes match each failing path and do not alter production code.

Problem-solution fit

Fit: Strong

The reliability changes directly address stale state, ambiguous record selection, and missing setup in the affected tests. The removed exclusions match the corrected methods.

Suggestions

None.

Risk assessment and necessity

Risk: Low because only test code and disabled-test metadata change. The main risk is renewed test instability, but the changed paths match a successful full test run and the exact-head build is green.

Necessity: These fixes restore reliable APIV1 regression coverage. Keeping the methods disabled would leave the affected API scenarios untested.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11322 round=1 by=alexei-dobriansky at=2026-09-28T22:05:14.599Z lastSha=c4983df05e8f5dc952623343950e9b7fd2c703b0 reviewKey=438de1f642ba874a13e4416e0e686ef086b864450687ee36593a8f8a5a63f1bd suggestions=

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
@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
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 only reconcile stacked ancestry and upstream baseline changes. The reviewed test and exclusion files are byte-for-byte unchanged, and the net PR diff remains aligned with the corresponding APIV2 patterns.

Status of previous suggestions

None from round 1.

New observations (commits since round 1)

None - no scoped code changed since round 1.

Risk assessment and necessity

Risk: Low because the PR still changes only tests and disabled-test metadata. Fresh exact-head unit-test jobs are queued, but no new scoped change requires a different assessment.

Necessity: The reliability fixes remain needed to restore APIV1 regression coverage without changing production behavior.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=11322 round=2 by=alexei-dobriansky at=2026-10-02T22:26:24.5153409Z lastSha=b1973cf1bd2f40f58038b95adfae8ff45fd51565 reviewKey=1864789e07827e3252fc4d0d493a662eac08fed8aecb2d776e6359f97395dc7f suggestions=none parentRound=1

This branch was successfully deployed

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

Labels

AL: Apps (W1) Add-on apps for W1 Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants