Skip to content

ci: skip device smoke lanes when a PR changes no lane input - #3904

Merged
thymikee merged 1 commit into
mainfrom
t3/skip-smoke-js-tests
Oct 22, 2026
Merged

thymikee merged 1 commit into
mainfrom
t3/skip-smoke-js-tests

Conversation

@thymikee

@thymikee thymikee commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

A PR that only changes unit tests (*.test.ts / __tests__/ under src/ or packages/*/src/) no longer runs the device smoke lanes. iOS smoke already worked this way. Android, Linux, the macOS phase of Apple, and the web smoke steps in CI now use the same affected-check rule: a lane runs only when selectChecks picks one of its checks. Pushes to main, empty or unknown diffs, and fail-open plans (scripts/, .github/, package.json, …) still run every lane.

  • scripts/device-lane-impact.ts <check-id>... holds the shared rule. apple-ci-impact.ts now uses it for iOS smoke, XCTest, and the new macOS selection.
  • The macOS phase also runs when the darwin-only bridge-proof inputs change.
  • Apple skips the build when neither phase is selected. The final status guard expects skipped for every unselected phase.
  • Scope: the lanes also route by platform family, as iOS already did. For example, an Android-only change skips Linux, web, and macOS.
  • 9 files changed.

Example: #3898, which only changed a test file, now skips Android and Linux.

Validation

At d0c85f95b7c6be5ce7f63713e95e6045e9e85949:

  • pnpm typecheck, pnpm check:fallow, check:gate-manifest, and the agent-guidance, docs-prose, production-exports, affected-selector, and depgraph gates pass.
  • vitest run scripts/__tests__/{device-lane,apple-ci}-impact.test.ts: 59 passed.
  • check:affected --run --head failed open to the full set. vitest-related ran 17,008 tests with 11 timeouts under host load around 950. All 8 failing files pass when rerun alone (65 tests). The gates after it did not run locally, so CI is authoritative for them.
  • Risk: family routing for Android, Linux, and web has not had the 90-day replay that iOS got. Pushes to main still run every lane as the backstop.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Android, Linux, macOS, and web smoke now use the affected-check model the
iOS smoke already used. Unit tests own no device lane, so a test-only PR
skips every device lane. Pushes to main and uncertain diffs still run all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 5.54 MB 5.53 MB -1.3 kB
Package (unpacked) 5.54 MB 5.53 MB -1.3 kB
Package (download) 1.68 MB 1.68 MB -463 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 42.4 ms 42.6 ms +0.1 ms
CLI --help 86.1 ms 86.1 ms +0.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at d0c85f9, and I found no problems that need a change. All 19 checks pass at this head, and there are no conflicts. Because the PR changes scripts/ and .github/, every selector fails open, so this run executed every lane. That means no Actions run has yet taken the skip path. The evidence for it is GitHub's documented skipped outcome for a false step if, plus the guard test that runs the shell. I did not rerun the vitest cases or the gates locally. I did not check cross-family execution, such as an Android-tagged module reached from a Linux or web session. The family rule accepts that, and pushes to main stay the backstop. Android, Linux and web routing has had no 90-day replay, as the PR body says.

Not blocking, and you can take or leave these: (1) The if: steps.impact.outputs.run != 'false' guard sits on every step after the selection (linux.yml), and device-lane-impact.test.ts enforces that for Android and Linux today. A small selection job with one job-level needs and if would remove the per-step repetition, and a skipped job still satisfies a required check. (2) selectMacosSmoke falls back to selectAppleBridgeProof (apple-ci-impact.ts), which selects any file under packages/platform-apple/src/, including unit tests, so a test-only Apple PR still runs the full macOS phase to reach a 4-file proof. It also misses the proof's own capture-kit test file, as main already did. Could that selector own exactly what the proof runs, ideally as an affected-check id that selectDeviceLane covers? (3) The CLI in device-lane-impact.ts accepts any CheckId, such as lint, and reportSelection labels every Android, Linux and web summary 'Device lane'. Could the arguments be limited to the lane checks that LEAF_LANES and BUILD_OWNERSHIP already list, with a lane label passed in? The device-lanes.ts header also still says only the ios.yml routing was replayed.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 22, 2026
@thymikee
thymikee merged commit 69210ef into main Oct 22, 2026
19 checks passed
@thymikee
thymikee deleted the t3/skip-smoke-js-tests branch October 22, 2026 11:11
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-22 11:12 UTC

thymikee added a commit that referenced this pull request Oct 22, 2026
* origin/main:
  perf(ios): confirm fill focus from the tapped input before the keyboard (#3906)
  feat(perf): time every iOS command against the fixture app (#3885)
  fix(ios): stop the XCTest-channel penalty from re-arming itself (#3896)
  test(android): pin that a child vanishing mid-read reads as gone (#3905)
  ci: skip device smoke lanes when a PR changes no lane input (#3904)
  fix(ios): verify deep-tree back on the sole screen (#3894)
  fix(ios): synthesize long presses and the gesture viewport on deep trees (#3893)
  perf(ios): read each resolved text input through one snapshot (#3882)
  fix(gate): take the host validation lock for heavy gates (#3900)
  fix(logs): keep an early iOS simulator logs stop from hanging the session (#3892)
  fix(apple): clean the runner derived path the runner uses (#3897)
  test(provider-scenarios): open deadline scenarios without the test IME (#3903)
  test(host-kit): stub os.homedir for the exec-trace late-close test (#3898)
  feat(test-app): add a Bluesky-depth heavy feed screen (#3884)
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