Repository navigation
test(windows): fix installer self-update and MCP registry parallel flakes (#4029) - #4036
Merged
Daniel Meppiel (danielmeppiel) merged 6 commits intoNov 20, 2026
Merged
Conversation
#4029) Replace the wall-clock budget (elapsed < 1.0s) in the three parallel registry tests with an in-flight probe: each stubbed lookup holds until all three lookups are in flight together, and the test asserts max_in_flight == 3. The result no longer depends on runner speed, and a serialized executor (workers = 1) fails all three tests. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ore ready) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The installer job evidence comes from main instead. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Closed
5 of 14 tasks
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 20, 2026 07:56
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 07:56
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changelog entry for this test-only change conflicts with the release-note policy excluding internal CI/test changes and leaves an otherwise-empty Fixed section.
1 open issue
What changed in this PR
This PR stabilizes MCP registry concurrency tests for #4029 by replacing tight timing assertions with direct overlap checks. Installer code is unchanged; the description records evidence for the earlier fix in #3931.
Changes:
- Add a lock-protected in-flight probe with a bounded timeout.
- Update three tests to assert concurrent lookups while preserving result checks.
- Add an internal changelog entry describing the test stabilization.
| File | Description |
|---|---|
tests/unit/integration/test_mcp_registry_parallel.py |
Replace wall-clock assertions with concurrency checks. |
CHANGELOG.md |
Record the Windows CI test stabilization under Fixed. |
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…ELOG [Unreleased] resolved) Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-reimagined-waddle
branch
November 20, 2026 08:16
Merged
3 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
TL;DR — The two Windows CI flakes in #4029 are now both closed. The installer self-update flake was already root-caused and fixed on
mainby #3931; this PR records that evidence and changes nothing in the installer. The MCP registry parallel tests drop theirelapsed < 1.0wall-clock budget for a max-in-flight concurrency counter, so they prove parallelism independent of runner speed.Note
This PR changes only
tests/unit/integration/test_mcp_registry_parallel.pyand one CHANGELOG line. A temporary harness workflow was added and reverted in-branch (its run was never approved, so it never executed); the net diff has no workflow change andbuild-release.ymlis untouched.Problem (WHY)
Windows installerjob failures onmain(2026-11-19 07:10–15:08 UTC) failed Test 5 (apm self-updatefrom v0.28.0) withExpand-Archive : Cannot find an overload for "ExtractToDirectory" and the argument count: "3". Cause: the old binary's self-update leaked the pwsh host'sPSModulePathinto Windows PowerShell 5.1, which then loaded PowerShell 7's Archive module. It was not a file-release race; intermittency tracked the runner image mix.elapsed < 1.0over three 500 ms sleeps. Onmainrun 44515662558 (Windows units (2/2)) the lookups ran in parallel yet failed:Wall time 1.234s >= 1.0s (not parallel). Thread startup and scheduler jitter on a loaded runner exceed the budget.Approach (WHAT)
a98ac4238): test scrubsPSModulePathfor pre-0.37 binaries,self_updatedrops it,install.ps1falls back to the 2-argZipFile.ExtractToDirectory. Evidence below._InFlightProbe: each stubbed lookup holds until all 3 are in flight together, test assertsmax_in_flight == 3.Implementation (HOW)
tests/unit/integration/test_mcp_registry_parallel.py— new_InFlightProbestub (lock-guarded in-flight counter +threading.Event). Pass path has no time dependency. A serialized caller never reaches the target; the first call gives up after 10 s and releases the rest, so a serial regression fails fast instead of hanging. The three*_parallel_wall_timetests become*_runs_lookups_concurrently, keeping their result assertions (call count, valid/invalid, key order). The order/exception/clamp tests are unchanged.CHANGELOG.md— one internal line underFixed.Trade-offs
threading.Barrier: a barrier raisesBrokenBarrierErrorinside the worker, whichbatch_fetch_server_infomaps toNone, hiding the cause. The probe always returns a valid result, and only themax_in_flightassertion decides.main, not PR reruns: theWindows installerjob runs only on pushes tomain. 19 consecutive green runs of the real job on the real event are stronger than synthetic PR reruns and need no workflow change during the 0.37 release (PM ruling).Benefits
Issue and approved scope
Issue: Fixes #4029
Human scope-approval comment: #4029 (comment) (
eligibility.cjs:record-present,contact_confirmation_needed: false)Completes the issue: both flakes fixed (installer by #3931, MCP here), recorded mutant, 10+ consecutive green installer runs, one CHANGELOG line.
Type of change
Testing
Validation
Scenario evidence
test_{validate_servers_exist,check_servers_needing_installation,batch_fetch_server_info}_runs_lookups_concurrentlytests/integration/test_windows_installer_launchers.py(Test 5)Recorded mutant — set
workers = 1in all threeMCPServerOperationsbatch methods (src/apm_cli/registry/operations.py), then restored:Unmutated
Lint contract (
.apm/instructions/linting.instructions.md, on HEAD merged with currentmain): ruff check, ruff format --check, pylint R0801,lint-auth-signals.sh— all exit 0.Installer: 19 consecutive green
Windows installerjobs onmainsince #3931 (workflowbuild-release.yml, eventpush)67936cd7d84960829414d828e3f945a8fb642cff059100a0f2a2501995f50458921f49dfe64639cad9182f68168b0520b81ee00d6aaea532989570bb0886dbb50c4035394b0c693f17993ab38d46ce76e5a98ac4238Before #3931, the same job failed 8 of 21
mainpushes (runs 44477507825, 44481309217, 44487123861, 44500212313, 44515662558, 44534060108, 44540425052, 44551368046), every one at Test 5 with theExtractToDirectoryoverload error.How to test
uv run --extra dev pytest tests/unit/integration/test_mcp_registry_parallel.py -q→ 7 passed.workers = 1on the threeworkers = ...lines insrc/apm_cli/registry/operations.py, rerun → the three*_runs_lookups_concurrentlytests fail withmax in flight 1 (not parallel); revert.Changelog
## [Unreleased]inCHANGELOG.md: user-visible effect first, 25 words or fewer, ending with(#PR); breaking changes only under upgrade notes; no Highlights; see.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
Co-authored-by: Copilot [email protected]