Skip to content

test: stabilize iOS snapshot timeout regression#1309

Merged
thymikee merged 1 commit into
mainfrom
agent/stabilize-ios-snapshot-timeout-test
Jul 16, 2026
Merged

test: stabilize iOS snapshot timeout regression#1309
thymikee merged 1 commit into
mainfrom
agent/stabilize-ios-snapshot-timeout-test

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Stabilize the iOS snapshot timeout lifecycle regression tests.

The injected modal probe previously self-released after eight seconds while recovery through live SpringBoard accessibility could take roughly fifteen seconds on loaded CI hosts. The test then inspected state after the abandoned work had already drained and falsely failed its busy and retention assertions.

The test now uses a deterministic unavailable application target and keeps the injected probe blocked until it records the abandoned-work state. It then explicitly releases the probe and verifies the real drain path. Both snapshotFast and snapshotRaw still run through their production entrypoints.

Validation

  • Reproduced the original assertions locally by shortening the old self-release window.
  • Ran both fixed tests for 10 iterations each: 20 tests passed.
  • pnpm format
  • AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1 pnpm build:xcuitest
  • pnpm check:affected --base origin/main --run
  • git diff --check

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.8 MB 1.8 MB -2.7 kB
JS gzip 567.2 kB 566.2 kB -939 B
npm tarball 681.8 kB 680.5 kB -1.3 kB
npm unpacked 2.4 MB 2.4 MB -3.7 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.0 ms 25.9 ms -0.1 ms
CLI --help 53.2 ms 53.6 ms +0.4 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/registry.js -1.1 kB -301 B
dist/src/cli-help.js -655 B -218 B
dist/src/session.js -140 B -88 B
dist/src/internal/daemon.js -159 B -86 B
dist/src/snapshot-diagnostics.js -254 B -83 B

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 16, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Exact-head review (f785c5b3): clean. The change is confined to the unit-test gate and does not affect shipping behavior. Both real snapshotFast and snapshotRaw entrypoints still exercise the production bounded-probe, abandoned-work, penalty, recovery-before-drain, and onDrained paths. Replacing live SpringBoard with an unavailable deterministic target prevents fallback-tier duration from racing the old self-release, while the test-owned semaphore and defer preserve bounded cleanup and revert sensitivity. All checks are green, including iOS Smoke and Swift unit compile. Applying ready-for-human despite draft status under coordinator policy.

@thymikee
thymikee marked this pull request as ready for review July 16, 2026 19:00
@thymikee
thymikee merged commit d851658 into main Jul 16, 2026
23 checks passed
@thymikee
thymikee deleted the agent/stabilize-ios-snapshot-timeout-test branch July 16, 2026 19:00
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-16 19:00 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant