Skip to content

ci: Move all Mac CI jobs off macOS-14, fix iOS scene hand-over - #24961

Merged
MartinZikmund merged 18 commits into
masterfrom
dev/mazi/ci-macos14-off
Oct 5, 2026
Merged

MartinZikmund merged 18 commits into
masterfrom
dev/mazi/ci-macos14-off

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #24679, closes #24960, closes unoplatform/uno-private#2320

Part of #24959. Supersedes #24680, whose commits and review fixes are included here.

PR Type:

🏗️ Build or CI related changes, 🐞 Bugfix (iOS multi-window)

What changed? 🚀

The hosted macOS-14 image is retired on 2 Nov 2026, with outage windows from 5 Oct. This moves every remaining Mac job onto macOS-26 (Xcode 26.6), drops the macOS 14 workarounds, and fixes the iOS multi-window bug the newer simulator exposed.

CI

  • iOS Skia runtime tests run on the build image and Xcode (macOSVMImage / xCodeRoot) instead of macOS-14 / Xcode 15.3.
    • ios-uitest-run.sh uses the newest simulator runtime matching the selected Xcode instead of a hardcoded iOS-17-5. It creates iPad Pro (12.9-inch) (6th generation) when the image doesn't pre-create it, so the screen size stays the same.
    • The app is installed with xcrun simctl install (one retry) after restoring the bundle's executable bits, as the tvOS runner does. idb, its pinned Homebrew tap and the Python 3.12 pin are gone. Installing idb cost a median 6.1 min of every ~24 min shard.
  • tvOS Skia runtime tests run on the build image and Xcode. tvos-uitest-run.sh already uses whichever tvOS runtime the selected Xcode brings. The GitHub Actions spike (Run NativeAOT and tvOS runtime tests on PRs via GitHub Actions #24951) is untouched.
  • macOS desktop Skia runtime tests run on macOSVMImage. The job selects no Xcode, so the image is the only change.
  • DevServer CLI tests: the macOS legs hardcoded macOS-15 and now use macOS-26, so nothing runs on macOS-14 or macOS-15 anymore.
  • Cleanup: macOSVMImage_UITests, xCodeRoot_iOS_UITests and the vmMacImageTest / xCodeRootTest / vmImageTest template parameters are removed. The TestFlight stage received them but never used them.

iOS fix: closing a window could suspend the app

On the iOS 26.5 iPad simulator the runtime-test shards froze. The CI end-of-run screenshot showed the home screen, and the device log showed running-active → running-suspended.

Full-screen iPadOS 26 shows one scene at a time, and the app destroyed a secondary window's scene while it was in front, or on its way there, without bringing another scene forward. Real apps hit this too. Two paths did it:

  • NativeWindowWrapper.CloseCore closing the scene that was in front.
  • UnoUISceneDelegate.WillConnect discarding an unclaimed scene: a window closed before its scene connected left the late scene without a window (No window is awaiting a scene … discarding the session, then OnSuspending).

Both now go through UnoUISceneDelegate.DestroyScene:

  • Before destroying: unless the destroyed scene is in the background, it activates a remaining scene. It prefers the initial window's, only of the same session role, never one it is destroying itself, and uses ActivateSceneSession on iOS/tvOS 17+.
  • After the disconnect: activation can be overridden when transitions overlap, so it checks again once the destroyed scene has actually disconnected. Before that, one shard ran ~4.5 min with the main window hidden.

Tests: Given_Window.When_Secondary_Window_Closed_Then_Initial_Window_Visible and When_Secondary_Window_Closed_Before_Shown_Then_Initial_Window_Visible.

Validation

  • Runtime (CI, iOS 26.5 iPad simulator): with the fixes, no shard freezes. On the window tests the main window is hidden for ~3-5 s instead of minutes.
  • Remaining iOS failures are unrelated:
    • an AnimatedVisualPlayer timing flake, which passed on retry;
    • a simulator Metal XPC abort (MTLSimulator_encountered_XPC_error), an infrastructure crash.
  • Passing on macOS-26: tvOS (4/4 shards) and macOS desktop.
  • Compile: Uno.UI.Runtime.Skia.AppleUIKit builds for iOS and tvOS, with analyzers on, with no warnings in the changed files.

Risk: the simulators move from iOS 17.5 to iOS 26.5 and tvOS 26, and macOS desktop to macOS 26, so test outcomes can shift. This PR's CI run is the check.

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_018riLfyvT4wZYEh8iFjWkKa

MartinZikmund and others added 2 commits October 3, 2026 10:53
The iOS test shards ran on macOS 14 with Xcode 15.3 and spent ~6 minutes
of each ~24 minute shard installing idb from Homebrew and PyPI, only to
install the app with it. macOS 14 images are also unsupported on Azure
DevOps from 2026-11-02.

Run the shards on the build image and Xcode, pick the simulator runtime
that ships with that Xcode, create the iPad device when the image has
none, and install the app with `xcrun simctl install`, as tvOS does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017v4y4kv5NebzLmrQoV5Yny
Copilot AI balanced review requested due to automatic review settings October 3, 2026 08:59
@MartinZikmund MartinZikmund added the area/build Categorizes an issue or PR as relevant to build infrastructure label Oct 3, 2026
@MartinZikmund MartinZikmund self-assigned this Oct 3, 2026

Copilot AI left a comment

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

This PR updates CI to move tvOS and macOS Skia runtime tests off the retiring macOS-14 runner image and cleans up now-unused Azure DevOps template parameters related to separate “test” VM/Xcode selections.

Changes:

  • Switch iOS UI test harness from idb-based installs to xcrun simctl install, and dynamically select the simulator runtime that matches the selected Xcode.
  • Update tvOS/macOS (and related) Azure DevOps test templates to use vmMacImage / xCodeRootBuild and remove vmMacImageTest / xCodeRootTest.
  • Remove macOSVMImage_UITests and xCodeRoot_iOS_UITests variables from .vsts-ci.yml.
File Description
build/​test-scripts/​ios-uitest-run.sh Drops idb install path; selects runtime based on Xcode SDK; creates target iPad simulator if missing.
build/​ci/​tests/​.azure-devops-tests-windows-skia.yml Removes unused test-only VM/Xcode parameters.
build/​ci/​tests/​.azure-devops-tests-tvos-skia.yml Uses main macOS image and build Xcode root for tvOS runtime tests.
build/​ci/​tests/​.azure-devops-tests-tvos-skia-build.yml Removes unused test-only VM/Xcode parameters.
build/​ci/​tests/​.azure-devops-tests-skia-stages.yml Removes wiring of test-only VM/Xcode parameters through stage templates.
build/​ci/​tests/​.azure-devops-tests-macos-skia.yml Uses main macOS image for macOS runtime tests.
build/​ci/​tests/​.azure-devops-tests-linux-skia.yml Removes unused test-only VM/Xcode parameters.
build/​ci/​tests/​.azure-devops-tests-ios-skia.yml Uses main macOS image and build Xcode root for iOS runtime tests.
build/​ci/​tests/​.azure-devops-tests-ios-skia-build.yml Removes unused test-only VM/Xcode parameters.
build/​ci/​publish/​.azure-devops-publish-ios-testflight.yml Removes unused xCodeRootTest parameter.
build/​ci/​.azure-devops-stages.yml Stops passing test-only image/Xcode variables into templates.
.vsts-ci.yml Removes macOS-14 / Xcode 15.3 UI-test variables; keeps macOS-26 / Xcode 26.6.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread build/test-scripts/ios-uitest-run.sh Resolved
Comment thread build/test-scripts/ios-uitest-run.sh Resolved
MartinZikmund and others added 2 commits October 3, 2026 11:34
On full-screen iPadOS 26, destroying the scene of a secondary window that is in front leaves the app with no foreground scene, so it lands on the home screen and gets suspended. This froze every iOS runtime test shard on the iOS 26.5 simulator after the first multi-window test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018riLfyvT4wZYEh8iFjWkKa

Copilot AI left a comment

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 4 Medium severity

Open (4)

Comment thread build/test-scripts/ios-uitest-run.sh Resolved
Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:55
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 43s —— View job


Review complete ✅

Todo list

  • Gather context (diff vs origin/master, read changed files)
  • Review CI YAML changes (tvOS/macOS image moves, template cleanup)
  • Review ios-uitest-run.sh changes
  • Review AppleUIKitWindowWrapper.cs changes
  • Review Given_Window.cs runtime test changes
  • Post inline comments for findings
  • Post summary

Scope note: Per the PR description, build/test-scripts/ios-uitest-run.sh, AppleUIKitWindowWrapper.cs, and Given_Window.cs originate from the stacked iOS PR (#24680) and will disappear from this diff once that merges. I did not duplicate review effort there (no AGENTS.md violations spotted in a pass regardless — the scene-activation fix in AppleUIKitWindowWrapper.cs is a root-cause fix backed by a red/fix/green runtime test, not a guard-only patch).

Verdict: Ship — no inline findings posted (0 issues: 0 blocking, 0 minor).

What I verified on the actual net-new work (the tvOS/macOS/cleanup commits, plus ci: Run the macOS DevServer CLI tests on macOS-26):

  • macOSVMImage_UITests, xCodeRoot_iOS_UITests, and the vmMacImageTest/xCodeRootTest/vmImageTest template parameters are fully removed with no dangling references anywhere in build/** or .vsts-ci.yml.
  • tvOS and macOS desktop runtime test jobs now consistently point at vmMacImage/xCodeRootBuild (macOS-26 / Xcode 26.6), matching the already-exercised iOS build-job path (ios-build-select-version.yml is unchanged and platform-agnostic, so no special-casing was needed).
  • No stray macOS-14 references remain in *.yml/*.md/*.sh.
  • The macOS-15 → macOS-26 fix for the DevServer CLI test matrix is in scope with the PR's goal (consolidating onto the one supported Mac image) even though it's not explicitly called out in the PR description — worth a one-line mention there for reviewers, but not a code issue.

Cross-cutting notes (non-blocking):

  • This is pure CI/YAML + shell + a stacked Apple-window-lifecycle fix — the AGENTS.md focus areas around DependencyProperty, event Action, async/cancellation discipline, and source-generator allocation don't apply to any of the net-new lines here.
  • Risk is inherent to the change itself (newer tvOS 26/macOS 26 images can shift test outcomes), as the PR description already calls out; this PR's own CI run is the right validation signal for that, not something a line-level review can catch.

Copilot AI left a comment

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.

Comment thread build/test-scripts/ios-uitest-run.sh Resolved
@github-actions github-actions Bot added platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 27s —— View job


Review complete ✅

Scope: Per the PR description, this stacks on #24680 (iOS). I reviewed only the commits unique to this PR — ci(tvos): Run tvOS runtime tests on the build image, ci(macos): Run macOS desktop runtime tests on the build image, ci: Remove the macOS 14 test image and Xcode variables, and the newly added ci: Run the macOS DevServer CLI tests on macOS-26. The ios-uitest-run.sh and iOS window-lifecycle changes (AppleUIKitWindowWrapper.cs, Given_Window.cs) belong to the stacked #24680 and were left out of scope, consistent with the author's note.

Verdict: Ship. No inline findings — this is a clean, mechanical CI-only change.

Checks performed:

  • Confirmed no dangling references to the removed vmMacImageTest / xCodeRootTest / macOSVMImage_UITests / xCodeRoot_iOS_UITests parameters/variables anywhere in build/** or .vsts-ci.yml after their removal.
  • Verified vmImageTest passed into .azure-devops-publish-ios-testflight.yml was already undeclared/unused by that template before this PR, matching the PR body's claim ("the TestFlight stage received them but never used them") — its removal is pure cleanup, not a behavior change.
  • tvOS (.azure-devops-tests-tvos-skia.yml) and macOS (.azure-devops-tests-macos-skia.yml) templates now correctly source vmMacImage / xCodeRootBuild (the build image/Xcode) instead of the retired test-only parameters.
  • The new ci: Run the macOS DevServer CLI tests on macOS-26 commit cleanly replaces the last two hardcoded macOS-15 matrix entries in .azure-devops-tests-templates.yml, including an accurate comment update.
  • Commit messages all follow Conventional Commits and match the PR's stated intent.

Cross-cutting note: Copilot already flagged two findings on ios-uitest-run.sh (potential literal "null" UITEST_IOSDEVICE_DATA_PATH via jq, and a set -e abort on the second simctl install retry without a structured ADO error). Since that file is owned by the stacked #24680, those are best addressed there rather than duplicated here.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 47s —— View job


Claude's Review

Todo list

  • Gather context (fetch diff vs origin/master, read changed files)
  • Understand request (code review per AGENTS.md rules)
  • Review CI YAML changes (tvOS/macOS image moves, param cleanup)
  • Review build/test-scripts/ios-uitest-run.sh changes
  • Review AppleUIKitWindowWrapper.cs changes
  • Review Given_Window.cs test changes
  • Post inline comments for findings
  • Post summary

Verdict: ✅ Ship (no new findings)

As noted in the PR description, this branch is stacked on #24680 (iOS), and the diff is dominated by that stack's iOS commits (ios-uitest-run.sh, AppleUIKitWindowWrapper.cs, Given_Window.cs, plus the iOS-only CI param plumbing). Those files already have Copilot's inline review comments in place (the simctl/jq null-fallback points and the "no other scene found" logging suggestion), and per the PR author's own instructions this review focused on the four commits that are actually new to this PR:

  • ci(tvos): Run tvOS runtime tests on the build image
  • ci(macos): Run macOS desktop runtime tests on the build image
  • ci: Remove the macOS 14 test image and Xcode variables
  • ci: Run the macOS DevServer CLI tests on macOS-26

What I checked on that scope:

  • Confirmed vmMacImageTest/xCodeRootTest/macOSVMImage_UITests/xCodeRoot_iOS_UITests/vmImageTest have no remaining references anywhere in build/** or .vsts-ci.yml after removal — the cleanup is complete, no dangling parameter wiring.
  • Verified the tvOS and macOS runtime-test jobs now correctly consume vmMacImage/xCodeRootBuild (the build-image values) instead of the retired test-only image/Xcode pair.
  • Verified tvos-uitest-run.sh already resolves its simulator runtime dynamically from whichever Xcode is selected (no hardcoded tvOS/macOS version), matching the PR description's claim that no script change was needed there.
  • Checked the macOS-15 → macOS-26 matrix bump in .azure-devops-tests-templates.yml (DevServer CLI job) — consistent with the sole remaining macOSVMImage value and the stale comment about "macos-15" was correctly updated.
  • No Conventional Commits violations, no leftover dead parameters, no YAML structural issues spotted by manual inspection of the full files.

No inline comments were posted since no new issues were found in the commits unique to this PR. The real risk called out in the description — tvOS 26/macOS 26 behavior drift — isn't something static review can catch; that's appropriately deferred to this PR's own CI run as stated.
· Branch

MartinZikmund and others added 2 commits October 3, 2026 19:46
A window closed before its scene connects leaves that scene unclaimed, and the scene delegate discards it. On full-screen iPadOS 26 the scene is already on its way to the front, so the discard left the app with no foreground scene and it was suspended, freezing three of the four iOS runtime-test shards. Both destruction paths now go through UnoUISceneDelegate.DestroyScene, which brings another scene forward unless the destroyed one is in the background.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018riLfyvT4wZYEh8iFjWkKa
Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:47
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/ci-macos14-off branch from c0797d3 to 5d71198 Compare October 3, 2026 17:47
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 2m 7s —— View job


Review complete ✅

  • Gather context (diff vs fork point, identify net-new commits)
  • Review net-new CI YAML changes (tvOS/macOS image moves, param cleanup, DevServer matrix)
  • Check for dangling references to removed parameters
  • Post findings / summary

Verdict: Ship — no inline findings.

Scope reviewed: Per the PR description, this stacks on #24680 (iOS build-image migration + window-lifecycle fix). I verified locally that commits 30ee2fa3..55d01712 belong to that stacked PR, so this pass covers only the 4 commits unique to this PR — ci(tvos): Run tvOS runtime tests on the build image, ci(macos): Run macOS desktop runtime tests on the build image, ci: Remove the macOS 14 test image and Xcode variables, ci: Run the macOS DevServer CLI tests on macOS-26 — which touch 12 CI YAML files and nothing else (+8/-49 lines, no script/C# changes).

What I checked:

  • vmMacImageTest, xCodeRootTest, macOSVMImage_UITests, xCodeRoot_iOS_UITests are fully removed with no dangling references anywhere in the repo (build/**, .vsts-ci.yml) — confirmed via repo-wide grep, not just the changed files.
  • tvOS and macOS runtime-test jobs now correctly source vmMacImage/xCodeRootBuild (the build image/Xcode) instead of the retired test-only parameters, matching the already-migrated iOS path.
  • The removed vmMacImageTest: '${{ parameters.vmMacImage }}' override (with its explanatory comment) in .azure-devops-tests-skia-stages.yml was a now-redundant iOS-specific shim from the stacked PR — safe to delete since every platform now uses vmMacImage directly.
  • The .azure-devops-tests-templates.yml hardcoded macOS-15 → macOS-26 bump (DevServer CLI + Compat test jobs) is consistent with the sole remaining macOSVMImage value; the # explicit because of parsing issues with matrix and parameters comment justifying the hardcoding is untouched and still accurate.
  • No stray macOS-14/macOS-15 references remain anywhere (*.yml/*.sh/*.md).
  • All 4 commit messages follow Conventional Commits and match the PR's stated intent.

Non-blocking note: the DevServer CLI macOS-15→macOS-26 fix is in scope with the PR's "get everything off macOS-14/15" goal but isn't explicitly called out in the PR description — worth a one-line mention there for future readers, not a code issue.

Out of scope for this review: build/test-scripts/ios-uitest-run.sh, AppleUIKitWindowWrapper.cs, UnoUISceneDelegate.cs, and Given_Window.cs belong to the stacked #24680 and already carry Copilot's inline findings (jq null-fallback on UITEST_IOSDEVICE_DATA_PATH/dataPath, the removed wait/retry loop around simctl list, the second simctl install retry aborting under set -e, and the null-error/silent-no-op paths in the scene-activation code). Re-reviewing those here would duplicate that existing feedback; they should be resolved on #24680 so this diff shrinks to just the CI commits once that merges.
· Branch

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 4m 26s —— View job


Review complete ✅

Todo list

  • Gather context (diff vs origin/master, prior review comments, changed files)
  • Review net-new commits since last automated pass (fix(ios): Harden the scene hand-over, fix(ci): Make the iOS bundle executable before simctl installs it, fix(ci): Retry the iOS simulator lookups and report a failed install, test(ios): Link the scene hand-over tests to #24679)
  • Check whether prior Copilot/Claude findings were actually addressed
  • Post inline comments for any new findings
  • Post summary

Verdict: Fix-first — 1 new finding (1 moderate), plus prior open findings still unresolved

1 inline comment posted: UnoUISceneDelegate.cs:201 — HasForegroundScene() reads connectedScene.Session.PersistentIdentifier without the null-guard this same commit (fix(ios): Harden the scene hand-over) added to every other .Session access in the file. It's only called from DidDisconnect, the exact teardown window the commit's own message says Session can be null for. If it throws there, ActivateRemainingScene silently doesn't run for that disconnect — which can reintroduce the "no foreground scene → app suspended" bug this PR exists to fix, through a different path than the ones already hardened.

What the 4 new commits got right (all previously-open Copilot findings on this PR):

  • fix(ci): Make the iOS bundle executable before simctl installs it — moves chmod +x before simctl install, closing the ordering bug Copilot flagged (r4174201176).
  • fix(ci): Retry the iOS simulator lookups and report a failed install — adds a bounded 6×5s retry around both the runtime and device-type jq lookups (addresses r4172710634), makes a second failed simctl install emit a structured UNOBLD007 error and device list before exit 1 instead of a bare set -e abort (addresses r4172473670), and drops the unused UITEST_IOSDEVICE_DATA_PATH export entirely rather than just guarding its null fallback (verified repo-wide: nothing read it) — a stronger fix than the // empty jq suggestion Copilot made (r4172617084, r4172473648).
  • test(ios): Link the scene hand-over tests to #24679 — adds [GitHubWorkItem] to both regression tests per .claude/rules/runtime-tests.md, closing r4174201203.
  • fix(ios): Harden the scene hand-over — reworks ActivateRemainingScene to filter by session role (skips external-display scenes), prefer the initial window's scene, use ActivateSceneSession on iOS/tvOS 17+ with the deprecated API as a guarded fallback below that, and fixes the reconnect/disconnect bookkeeping ordering so a throwing Closing handler can't leave a session wrongly marked destroyed.

Still open from earlier Copilot passes, untouched by this diff (not re-flagged inline to avoid duplicating active threads):

  • Given_Window.cs — When_Secondary_Window_Closed_Then_Initial_Window_Visible doesn't assert initialWindow.Visible actually goes false before closing sut, so it could pass trivially if the regression reappears (r4172710669).

Cross-cutting note: this PR now directly ships the window-lifecycle fix (the PR description says it "supersedes #24680, whose commits ... are included here"), so UnoUISceneDelegate.cs isn't a separate stacked PR anymore — it's reviewed here as the merge vehicle, which is why the one new finding above is raised now rather than deferred again.
· Branch

Copilot AI left a comment

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.

Copilot review overview

🔵 Needs a closer look

Scene destruction failures and differing scene roles can leave foreground-session bookkeeping incorrect.

Review effort: Balanced
Findings: None

Resolved since last review (6)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Clear destruction tracking when the session destruction request fails

src/​Uno.UI.Runtime.Skia.AppleUIKit/​UnoUISceneDelegate.cs:137

The destruction request has no error handler, but the session was just added to both tracking sets. If UIKit rejects the request, DidDisconnect never runs, so the still-connected session remains permanently classified as destroyed and is excluded from later foreground detection/activation. Handle the request error by removing both markers (and logging it).

Medium severity Restrict foreground scene detection to the matching session role

src/​Uno.UI.Runtime.Skia.AppleUIKit/​UnoUISceneDelegate.cs:221

HasForegroundScene() treats a foreground scene of any session role as sufficient. If, for example, an external-display scene is foreground while this application-role scene disconnects, this suppresses the retry and leaves no application-role scene in front—the exact state this hand-off is intended to prevent. Pass session.Role into this check and only count non-destroyed foreground scenes with the same role, matching ActivateRemainingScene.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237310 found UI Test snapshots differences: skia-linux-screenshots: 98, skia-windows-screenshots: 218

Details
  • skia-linux-screenshots: 98 changed over 2456

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • DisplayInformation.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Examples.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 218 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • DisplayInformation.png-dark
    • CalendarView_Theming.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • GridViewEmptyGroups.png-dark
    • GridViewEmptyGroups.png
    • GridViewFirstVisibleIndex.png-dark
    • GridViewFirstVisibleIndex.png
    • GridViewGrouped.png-dark
    • GridViewGrouped.png
    • GridViewMultipleSelectionMode.png-dark
    • GridViewMultipleSelectionMode.png
    • Grid_with_UserControl_HorizonalAlignment.png-dark
    • Grid_with_UserControl_HorizonalAlignment.png
    • Grid_with_UserControl_VerticalAlignment_Fixed_Height.png-dark

HasForegroundScene read Session without the null check used elsewhere in
the file, and counted a foreground scene of any role, so an external
display scene could suppress the hand-over. Also log when no scene is
left to bring forward.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JmE5zrbCJiMAv1E5yChjQp
Copilot AI balanced review requested due to automatic review settings October 4, 2026 15:35
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 1m 32s —— View job


Review complete ✅

  • Gather context (diff vs origin/master, prior review threads, changed files)
  • Review net-new commits since last automated pass (fix(ci): Retry the iOS simulator lookups and report a failed install, test(ios): Link the scene hand-over tests to #24679, fix(ios): Null-guard and role-scope the foreground check)
  • Verify whether previously-flagged findings (jq null-fallback, simctl install retry error handling, HasForegroundScene null-guard/role-scope) are actually resolved
  • Post inline comments for any new findings
  • Post summary

Verdict: Fix-first — 1 finding (moderate), carried over from a prior revision and still unresolved

1 inline comment on UnoUISceneDelegate.cs:137 — RequestSceneSessionDestruction still has no completion handler. If the request fails, sessionId stays stuck in _destroyedSessions/_foregroundHandoffs forever (only DidDisconnect clears them, and it never fires for a session that wasn't actually destroyed), which can make HasForegroundScene/ActivateRemainingScene wrongly skip that scene later and reintroduce the suspend bug through a path the rest of this PR's hardening doesn't cover. This was already raised on an earlier revision and the latest commits didn't touch it.

What the three new commits got right (all previously-open findings, now resolved):

  • fix(ios): Null-guard and role-scope the foreground check (a7aa5481) — HasForegroundScene now takes a null-safe session pattern match and filters by session.Role, closing the exact gap flagged on the prior revision (an external-display foreground scene could no longer wrongly suppress the hand-over), and logs when no remaining scene is found.
  • fix(ci): Retry the iOS simulator lookups and report a failed install (4ed0fbcc) — both the runtime-version and device-type jq lookups now retry up to 6×5s; a second failed simctl install logs a structured UNOBLD007 error with a device dump before exit 1 instead of a bare set -e abort; UITEST_IOSDEVICE_DATA_PATH is removed entirely (confirmed nothing in build/**/src/** reads it), which is a stronger fix than guarding its null fallback.
  • test(ios): Link the scene hand-over tests to #24679 (182a9a14) — both regression tests now carry [GitHubWorkItem(...)], matching the convention used elsewhere in Uno.UI.RuntimeTests.

Not re-flagged (already discussed/resolved by the author on the existing threads):

  • The executable-bit-before-install ordering — fixed earlier in 0fe103a1.
  • Given_Window.cs's initialWindow.Visible assertion ordering — author explained (in-thread) why asserting the hidden state isn't portable across windowed/desktop multitasking modes, and that the full-screen iPad CI run does exercise the regression via the suspend/resume log trail.

Cross-cutting note: no issues found in the CI YAML commits (ci(tvos), ci(macos), ci: Remove the macOS 14 test image and Xcode variables, ci: Run the macOS DevServer CLI tests on macOS-26) — unchanged since the last pass and already verified clean.

Copilot AI left a comment

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.

Copilot review overview

🔵 Needs a closer look

Failed scene-destruction requests can leave persistent tracking state that corrupts later foreground handoffs.

Review effort: Balanced
Findings: None

Previously missed (1)

In code that hasn't changed since last review

Medium severity Failed scene destruction leaves stale tracking entries

src/​Uno.UI.Runtime.Skia.AppleUIKit/​UnoUISceneDelegate.cs:137

The new bookkeeping assumes every destruction request reaches DidDisconnect, but this call exposes an error callback and currently discards it. If UIKit rejects the request, the session remains permanently in both tracking sets, so later foreground checks exclude a still-connected scene and future handoffs can choose the wrong state. Handle the error callback by reconciling these entries (and logging/retrying the failed destruction), as the scene-creation path already does in NativeWindowFactoryExtension.cs:57-63.

Copilot AI balanced review requested due to automatic review settings October 4, 2026 15:40
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 59s —— View job


Review complete ✅

  • Gather context (diff since last automated pass, commit log)
  • Review the new commit fix(ios): Unmark a scene whose destruction failed against the previously open finding
  • Re-verify ios-uitest-run.sh, AppleUIKitWindowWrapper.cs, Given_Window.cs are unchanged / still fine
  • Post summary

Verdict: Ship — 0 open findings

What changed since the last review: one new commit, ea7c719d fix(ios): Unmark a scene whose destruction failed, which resolves the last open finding from the prior passes (flagged repeatedly: RequestSceneSessionDestruction(session, null, null) had no error handler, so a failed destruction request would leave sessionId permanently stuck in _destroyedSessions/_foregroundHandoffs, since DidDisconnect — the only other place that clears them — never fires for a session that wasn't actually destroyed).

Why this is a root-cause fix, not a guard: DestroyScene (UnoUISceneDelegate.cs:118-150) now passes an OnError callback to RequestSceneSessionDestruction that removes sessionId from both tracking sets and logs a warning when the request fails — directly restoring the invariant ("a session is only marked destroyed if it actually will be/was") rather than adding a defensive check further downstream in HasForegroundScene/ActivateRemainingScene. Verified by inspection:

  • The closure correctly captures sessionId (computed once, before the request).
  • The fix is symmetric with the existing DidDisconnect cleanup (UnoUISceneDelegate.cs:235-244), and with the ActivateSession/WillConnect error-handling pattern already used elsewhere in the file.
  • No new allocation/perf concern — OnError is a local function, not a capturing lambda allocated per call beyond what was already needed for the delegate itself.

Confirmed still resolved (no regressions) on re-read of the full diff:

  • ios-uitest-run.sh: executable bits are chmod'd before simctl install; both the runtime-version and device-type jq lookups retry up to 6×5s; a second failed simctl install logs a structured UNOBLD007 error and dumps the device list before exit 1.
  • AppleUIKitWindowWrapper.cs: the old ActivateOtherScene method is gone; CloseCore now delegates to UnoUISceneDelegate.DestroyScene, which is the method just fixed.
  • Given_Window.cs: both regression tests still carry [GitHubWorkItem(...)] linking to CI: Speed up the iOS runtime test shards and move them off macOS 14 #24679; the initialWindow.Visible assertion ordering was discussed and intentionally left as-is (author's rationale: full-screen iPadOS is the only multitasking mode where the scene actually backgrounds, and the CI log trail — not a visibility assertion — is what catches the regression there).
  • CI YAML commits: unchanged since the last pass, already verified clean (no dangling vmMacImageTest/xCodeRootTest/macOS-14/macOS-15 references anywhere).

Cross-cutting note: this is the only C# change in this pass, and it directly closes out every open thread from Copilot's and the prior automated reviews on this PR — no new findings to post.
· Branch

Copilot AI left a comment

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.

Copilot review overview

🔵 Needs a closer look

The close-before-show test can pass before the late scene lifecycle path executes.

Review effort: Balanced
Findings: None

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 237329 found UI Test snapshots differences: skia-linux-screenshots: 124, skia-windows-screenshots: 176

Details
  • skia-linux-screenshots: 124 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Examples.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • ImageIconPage.png-dark
    • ImageIconPage.png
  • skia-windows-screenshots: 176 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • Buttons.png-dark
    • ClipboardTests.png-dark
    • Buttons.png
    • ClipboardTests.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Examples.png
    • ImageBrush_Stretch.png-dark
    • ImageBrush_Stretch.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • ImageSourceUrlMsAppDataScheme.png
    • DoubleImageBrushInList.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • DoubleImageBrushInList.png
    • Grid_middle_col_auto__bottom_row_auto.png-dark
    • Grid_middle_col_auto__bottom_row_auto.png
    • Grid_MinWidth_MaxWidth.png-dark

@mergify

mergify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@MartinZikmund
MartinZikmund merged commit bfc8dff into master Oct 5, 2026
62 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/ci-macos14-off branch October 5, 2026 06:04
MartinZikmund added a commit that referenced this pull request Oct 7, 2026
Brings the review fixes master's #24961 got: retry the runtime and
device-type lookups while simctl settles, give the missing device type
its own UNOBLD009 code, and drop the unused device data path export.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tmiyo6fvmNeNuLXL2kbyJN
mikernet pushed a commit to Singulink/uno that referenced this pull request Oct 16, 2026
Backport of unoplatform#24961 (cleanup part) to servicing/6.8. Nothing runs on macOSVMImage_UITests / xCodeRoot_iOS_UITests anymore; the disabled native iOS stage and TestFlight now take the build image and Xcode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018riLfyvT4wZYEh8iFjWkKa
agneszitte pushed a commit that referenced this pull request Oct 28, 2026
Brings the review fixes master's #24961 got: retry the runtime and
device-type lookups while simctl settles, give the missing device type
its own UNOBLD009 code, and drop the unused device data path export.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tmiyo6fvmNeNuLXL2kbyJN
(cherry picked from commit 8fbf6e1)
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Nov 2, 2026
Backport of unoplatform#24961 (cleanup part) to release/stable/6.7. Nothing runs on macOSVMImage_UITests / xCodeRoot_iOS_UITests anymore; the disabled native iOS stage and TestFlight now take the build image and Xcode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018riLfyvT4wZYEh8iFjWkKa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Move the macOS desktop runtime tests off the macOS-14 image CI: Speed up the iOS runtime test shards and move them off macOS 14

5 participants