Skip to content

test(scene-e2e): pre-approve the url scheme, make push banners persistent, and give waits a 60s budget - #701

Merged
mahmoud-elmorabea merged 10 commits into
mainfrom
mbl-2804-rn-scene-flakes
Nov 20, 2026
Merged

mahmoud-elmorabea merged 10 commits into
mainfrom
mbl-2804-rn-scene-flakes

Conversation

@matt-frizzell

@matt-frizzell matt-frizzell commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

MBL-2804

Summary

The scheduled scene routing E2E fails on most days because of three harness problems, not SDK defects. The simulator asked for permission before opening the test URL, and the open approved through that prompt sometimes never reached the app. The push banner sometimes left the screen before the test tapped it. Separately, a few waits were too short for a slow simulator.

  1. Warm ordinary URL, 8 of the last 11 failures on main. The first simctl openurl for the cio-rn-scene-e2e scheme makes SpringBoard ask Open in "CioRnSceneHost"?, because LaunchServices has no stored approval for the requester (CoreSimulatorBridge) to open that scheme. Run 44579139265 logs the path: cfprefsd Couldn't open .../com.apple.launchservices.schemeapproval.plist (no approval exists yet), then the prompt 30s later. After the flow tapped Open, the open sometimes never reached the app. In 44548202041 and 44573028335, lsd logs Sending request to open "org.reactjs.native.example.CioRnSceneHost" and SpringBoard never logs Received request to open, even with a 60s wait. In 43572742513, lsd never sends at all.
    run_scene_push.sh now writes that approval right after installing the app: simctl spawn defaults write com.apple.launchservices.schemeapproval 'com.apple.CoreSimulator.CoreSimulatorBridge-->cio-rn-scene-e2e' -string <bundle id>. Expo runs the same command in its own E2E setup (preApproveDeepLinkPromptAsync, apps/bare-expo/scripts/start-ios-e2e-test.ts:211-226), and Expo CLI writes the same key (simctl.ts:161). The URL flow drops its optional Open tap, so a prompt that still shows now fails the run every time instead of being tapped. It checks Received: with a plain assert, since a lost open never arrives late.
  2. Slow simulator launch. Launch, ready and destination waits had a 15s cap. In 43691531006 the app took 19.8s to launch after a notification tap, and in 44566182810 the ready text showed about a second after the 15s wait expired. These waits now have a 60s budget. extendedWaitUntil returns as soon as the text shows, so passing runs don't get slower.
  3. Push banner gone before the tap. iOS revokes a temporary banner a few seconds after it appears, and the tap on it sometimes lands after that. In 44615662651 SpringBoard logs Revoking banner for notification AF3C-81EF at 21:41:13.851, and testmanagerd logs Synthesizing event for the tap at 21:41:14.920, so the tap hit the Home screen and the cold push flow failed waiting for Received:. In 44261671681 the same happens with Revoking banner for notification 4FB5-00A5 at 08:19:26.438 and the tap at 08:19:28.376. The banner was temporary because the permission came from tapping the system prompt, which saves Alert style = Banner.
    After installing the host, run_scene_push.sh stops SpringBoard and usernotificationsd, writes the host's notification record into data/Library/BulletinBoard/VersionedSectionInfo.plist as authorized with alert type 2 (the Persistent banner style, which stays until tapped), and starts them again. set_persistent_banners.py writes the record and explains why; its shape and the stop, write, start order are adapted from ios-sim-notification-permission (MIT, notice in the file). Because the record already says authorized, the system permission prompt no longer appears in the prepare flow. After each prepare flow the script decodes the record from disk, logs it to react-native-scene-maestro-notification-settings.log, and fails the run if it is no longer authorized and persistent.

Autonomous fix by Moby.

Platforms

iOS harness only (.maestro/). No SDK code changes. The Flutter sample's scene push flows (scene_push_open.yaml, scene_push_prepare.yaml) have the same 15s waits and also tap a notification banner; both are still outstanding.

Related Issues

https://linear.app/customerio/issue/MBL-2804

Testing

  • The prompt is gone. An untapped prompt blocks the open (44542042673). With the approval written, the URL flows have no Open tap and pass, and the warm and cold logs of 44586480752 and 44593607759 show no SpringBoard alert.
  • The persistent style takes effect in place. 44651152222 (3924ee3) passed: the settings log shows alertType=2 authorizationStatus=2 after the write and after both prepare flows, SpringBoard runs as one process (pid 51928) for the whole run and reports alertStyle: Alert for the host 22 times (44615662651 and 44261671681 report alertStyle: Banner), no permissions dialog appears, and in all 5 push flows Revoking banner comes only after the tap's Synthesizing event.
  • Rescue of a late tap, not yet observed. The taps in these runs landed 1.9-5.8s after the banner appeared, inside even a temporary banner's 6s life (44615662651: appeared 21:41:07.849, revoked 21:41:13.852). Late taps were 2 of about 110 on recent runs, too rare to see in a few runs; the evidence here is that SpringBoard uses the persistent style.
  • Loss rates, not yet proven. Prompted opens were lost 8 of 20 times on main; opens without a prompt were lost 0 of 12 (cold URL on main) and 0 of 8 on this branch. A few warm passes would also happen by luck at the old rate. The proof is the scheduled runs on main after merge: 6 straight warm-URL passes at the old rate is under 5% by luck. Late taps are rarer (about 2%), so only weeks of scheduled runs without a cold or warm push failure can show the banner fix.
  • bash -n .maestro/run_scene_push.sh; python3 -m py_compile and a write plus --check round trip of set_persistent_banners.py on a sample store.

Harness time. PR runs on slow hosts hit the workflow's 40-minute step timeout: 44656003596 timed out starting the cold push after the prepare check and both URL flows had passed. Without touching the workflow, run_scene_push.sh now builds only the simulator's architecture (ONLY_ACTIVE_ARCH=YES; the Release build also compiled an x86_64 slice the test never runs), boots the simulator in the background while packages, pods and the build run, installs the host's packages with one npm install, and prints a ==> phase: line at each phase boundary. Both runs on this head passed: 44661869296 finished the step in 38.9 minutes and 44666723760 in 25.9, against 33.2 for the green 44651152222 and a timeout at 40.2 for 44656003596 on earlier heads. From pod install done to the record write (mostly the build) took 7.0 and 6.0 minutes against 8.6 and 12.8, and the boot wait at the start of the step (about 2.3 minutes) is now 2-5 seconds before install. Host speed still dominates: 44661869296 spent 8.9 minutes in npm ci and 4.5 starting its first Maestro flow, so a slow host can still come close to the cap, and raising it remains a maintainer's call.

Follow-ups (not in this PR)

  1. Cut harness time further: every maestro test starts a new driver (about 1 minute; the first took 1.3-4.5 minutes), so running several flows in one Maestro session would save the most; caching npm and CocoaPods downloads in the workflow would cut npm ci (6-9 minutes) and pod install (3-5).
  2. Flutter parity: the same 60s waits and persistent banners in the Flutter scene push flows.
  3. After merge, check the warm URL and push taps in the first 6 scheduled runs on main.

Deployment

Test harness only, nothing ships to customers. This change can be safely reverted.


Submitted by Moby -- autonomous triage agent for Squad Mobile

@talon-github-manager talon-github-manager Bot changed the title MBL-2804: tap the Notification Center copy and open warm URLs from Home in scene E2E test(MBL-2804): tap the Notification Center copy and open warm URLs from Home in scene E2E Nov 19, 2026
@talon-github-manager
talon-github-manager Bot force-pushed the mbl-2804-rn-scene-flakes branch from fcd27d4 to 676b17a Compare November 19, 2026 14:50
@talon-github-manager talon-github-manager Bot changed the title test(MBL-2804): tap the Notification Center copy and open warm URLs from Home in scene E2E test(MBL-2804): give scene E2E destination waits a 60s budget Nov 19, 2026
@talon-github-manager talon-github-manager Bot added the ci:full Run the full PR CI lane label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


Builds are in progress. This comment will be updated when they finish.

  • iOS FCM: 701.10.0 (29919174)
  • Android APN: 701.10.0 (29919174)

@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 19, 2026
@talon-github-manager talon-github-manager Bot changed the title test(MBL-2804): give scene E2E destination waits a 60s budget test(MBL-2804): give scene E2E launch and destination waits a 60s budget Nov 19, 2026
@talon-github-manager talon-github-manager Bot changed the title test(MBL-2804): give scene E2E launch and destination waits a 60s budget test(scene-e2e): open the warm url inside the running flow and give waits a 60s budget Nov 19, 2026
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 19, 2026
@talon-github-manager talon-github-manager Bot changed the title test(scene-e2e): open the warm url inside the running flow and give waits a 60s budget test(scene-e2e): pre-approve the url scheme and give launch and destination waits a 60s budget Nov 19, 2026
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 19, 2026
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 19, 2026
@talon-github-manager talon-github-manager Bot changed the title test(scene-e2e): pre-approve the url scheme and give launch and destination waits a 60s budget test(scene-e2e): pre-approve the url scheme, make push banners persistent, and give waits a 60s budget Nov 19, 2026
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 19, 2026
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 20, 2026
Moby added 2 commits November 20, 2026 01:45
…ase, and keep one explanation of the persistent banner write
…ture, boot the simulator during the build, install host packages once, and mark phase boundaries
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 20, 2026
@talon-github-manager
talon-github-manager Bot force-pushed the mbl-2804-rn-scene-flakes branch from cecfa86 to 51af087 Compare November 20, 2026 03:52
@talon-github-manager talon-github-manager Bot added ci:full Run the full PR CI lane and removed ci:full Run the full PR CI lane labels Nov 20, 2026
@talon-github-manager
talon-github-manager Bot marked this pull request as ready for review November 20, 2026 05:25
@talon-github-manager
talon-github-manager Bot requested a review from a team as a code owner November 20, 2026 05:25
@mahmoud-elmorabea
mahmoud-elmorabea merged commit 367691c into main Nov 20, 2026
42 of 45 checks passed
@mahmoud-elmorabea
mahmoud-elmorabea deleted the mbl-2804-rn-scene-flakes branch November 20, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the full PR CI lane

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants