iOS runner smoke: alert-observation XCTests are red or flaky on main
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- ios, swift
- Domain
- mobile-dev, testing
Research direction
Start with apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+AlertObservationTests.swift and run the two named alert-observation XCTests on a hosted macOS runner. Read the related alert-deadline tests and docs/agents/device-verification.md, then determine whether probe timing, deadline sizing, or runner ordering explains the empty action list. Done means a pinned fix or diagnosis, five consecutive green iOS Smoke Tests runs without reruns, and observeFixtureHome fixed or split into its own issue.
Written by the indexing model from the issue text.
Description
Purpose
Smoke Tests in the iOS workflow is not deterministic on main. Two alert-observation XCTests fail on the runner host without any Apple source changing, so every PR that reaches that step has to be re-run before a reviewer can trust it.
Observed on main
-
main@973b74cc14(push run 34741577232, job 103682270067, stepRun targeted iOS runner XCTest regressions),RunnerTests+AlertObservationTests.swift:72:XCTAssertEqual failed: ("false") is not equal to ("true") - Optional(… code: "ALERT_DEADLINE_EXCEEDED", message: "alert dismiss exhausted its deadline")Failing test:
testAlertDismissDoesNotActivateAReplacementWithTheSameTitle. -
PR #2533 head
a16821b661(run 34742468875 attempt 1, docs-only diff), same file at:75and:80:XCTAssertEqual failed: ("First actions: 0; replacement actions: 0") is not equal to ("First actions: 1; replacement actions: 0")Failing test:
testAlertCannotProveAnIdenticalReplacementAndDoesNotActivateIt. Attempt 2 of the identical run and commit passed at 06:46 UTC, so the second case is a flake rather than a regression.
Both symptoms share one shape: a presented alert reports no actions, and the assertion times out through ALERT_DEADLINE_EXCEEDED.
Separate symptom on the same step family, worth tracking apart from the two above: main@8e8eeb2ced (run 34712516058) failed Run fixture-backed iOS simulator E2E smoke with an assertion raised at test/integration/ios-simulator-e2e/live-automation-scenario.ts:33 (observeFixtureHome).
Required behavior
- The alert-observation assertions in
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+AlertObservationTests.swiftpass or fail on their own terms, not on simulator alert presentation timing. - A presented system alert that the test can see must expose its button list to the probe, or the probe must report the empty-button case as a distinct typed outcome instead of consuming the whole deadline.
- Whatever the resolution, an unchanged
mainmust not require a manual re-run to go green.
Observable completion conditions
- A diagnosis recorded here naming the mechanism (alert not yet realized when the action list is read, deadline sized below host latency, or a genuine runner-side ordering bug).
- If it is timing: the probe or deadline change lands and the
iOSworkflow'sSmoke Testsjob is green across at least five consecutivemainpushes, with no manual re-runs. - If it is a real defect: a failing-then-passing XCTest that pins it, plus the same five-run streak.
- The
observeFixtureHomecase is either fixed or split into its own issue with the above evidence linked.
Dependencies
- Reproduce on a hosted macOS runner or a local simulator; the failure does not appear in unit or
check:affectedruns, so this is device-facing anddocs/agents/device-verification.mdapplies. - Related history for the alert horizon: ADR-tracked alert deadline work behind
testAlertResolutionCannotBypassRequestedDeadlineandtestAlertDeadlineBeforeActivationLeavesTheOriginalUntouched, which pass in the same runs where the two above fail.
Discovered while babysitting #2533, whose diff touched no Apple source.
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 304
- Avg merge
- 11h 19m
- Merged PRs (30d)
- 539
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Proxy lease refuses every iOS install/open: connection platform 'ios' compared with internal 'apple'Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
callstack/agent-device#2962 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
needs-triage refactor
Difficulty 5/5 Over a week Newbie friendliness 28/100
callstack/agent-device#2976 ·
Maintainers usually reply within 1 day
-
ready-for-agent refactor
Difficulty 4/5 3-5 days Newbie friendliness 48/100
callstack/agent-device#2974 ·
Maintainers usually reply within 1 day
-
needs-triage refactor
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstack/agent-device#2973 ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Fission-AI/OpenSpec#1986 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nestjs/docs.nestjs.com#3554 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
publicodes/publicodes#868 ·
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 78/100
EclipseFdn/open-vsx.org#13488 ·
Maintainers usually reply within 2 days