Skip to content

ci(apple): compile tvOS and visionOS runners on runner-owning PRs - #4755

Merged
thymikee merged 1 commit into
mainfrom
t3/tvos-visionos-pr-build
Nov 19, 2026
Merged

thymikee merged 1 commit into
mainfrom
t3/tvos-visionos-pr-build

Conversation

@thymikee

@thymikee thymikee commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

PR CI compiled only the iOS runner; tvOS/visionOS compiled only at release time (scripts/build-package-xcuitest.mjs), which let #4608 escape to release.

Adds a build-runner-tvos-visionos job to .github/workflows/apple.yml running the same xcodebuild build-for-testing compile (setup-apple-runner-build, one leg per platform, generic simulator destinations, arm64, release variant) on blacksmith-6vcpu-macos-26, whose Xcode ships the tvOS/visionOS SDKs. A device-lane-impact selector step gates it: macOS minutes are spent only on PRs owning runner sources (apple/runner/** and the other own:swift trees), failing open on an unknown diff; main pushes build unconditionally. Registers swift-runner-tvos/swift-runner-visionos in ALL_CHECKS, CHECK_CATALOG, and own:swift ownership so the gate manifest wires the lane.

Touched files: 6 (1 workflow, 2 catalog/selector, 3 tests), +139/-5.

  • BEFORE: tvOS/visionOS compile ran only in release packaging; PR CI built iOS only, so release-time-only build breaks escaped PRs (fix(apple-runner): keep the keyboard return tap iOS-only #4608). AFTER: runner-owning PRs run build-for-testing for tvOS + visionOS; such failures fail the PR.
  • SIZE: +1 workflow job, +2 catalog entries, 0 source lines.
  • PERF: minutes only on runner PRs (selector-gated, cache-backed); release-time escapes on PRs 1 -> 0.
  • COLLOCATION: the tvOS/visionOS guard lives in CHECK_CATALOG/own:swift beside the other runner builds, not only in release scripts.

Validation

Tested SHA: 9cab32a92623f0f621fa3437c0bb2a533ea12173 (clean head).

  • pnpm check:gate-manifest -> ok, 62 checks / 25 lanes (base 60/24).
  • node --test scripts/check-affected/{model,device-lanes}.test.ts scripts/gate/*.test.ts -> 107 pass; vitest --project unit-core (apple-ci-impact, device-lane-impact, root-docs-paths-ignore) -> 74 pass.
  • pnpm check:quick (oxlint 0/0, tsc ok); pnpm format clean; actionlint 1.7.7: no new findings vs base.
  • pnpm check:affected --run --head 9cab32a926...: not completed locally — the shared-host validation lock was held by other worktrees (pids 39662, 15344) and the 300s per-command cap killed the fail-open run mid-suite, so no receipt was emitted. Per docs/agents/pull-requests.md, CI's serialized gate stage validates the pushed head instead.
  • CI obligations: the Apple workflow gains Runner Build (tvOS + visionOS); PR required checks are authoritative. No device lanes or other workflows touched; no source changes.
  • Risk: the first real macOS run confirms the image resolves the generic tvOS/visionOS destinations (same mechanism release packaging uses); a cache-miss first run pays one compile per platform.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

PR CI built only the iOS runner (apple.yml smoke lane); tvOS and visionOS
compiled only at release time via scripts/build-package-xcuitest.mjs,
which let #4608 escape to release.

Add a build-runner-tvos-visionos job to the Apple workflow that runs the
same xcodebuild build-for-testing compile (setup-apple-runner-build, one
parallel leg per platform, generic simulator destinations, arm64, release
build variant) on blacksmith-6vcpu-macos-26, whose Xcode ships the tvOS
and visionOS SDKs. A device-lane-impact selector step gates the builds on
the affected-check model, so macOS minutes are spent only on PRs that own
runner sources (apple/runner/** and the other own:swift trees) and fail
open when the change set is unknown; pushes to main build unconditionally.

Register swift-runner-tvos and swift-runner-visionos in ALL_CHECKS,
CHECK_CATALOG (build:xcuitest:tvos / build:xcuitest:visionos), and the
own:swift build-ownership rules, so the gate manifest wires the new lane
(62 checks across 25 lanes) and the selector can route the job.
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.41 MB 6.41 MB -2.9 kB
Package (unpacked) 6.41 MB 6.41 MB -2.9 kB
Package (download) 1.95 MB 1.95 MB -982 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 68.1 ms 45.7 ms -22.4 ms
CLI --help 141.7 ms 89.4 ms -52.3 ms

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 9cab32a

No open findings.

Reviewed with this repository's own Sentinel configuration (7b6500cd2da2).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready as of 9cab32a. All 21 checks pass, and the Runner Build (tvOS + visionOS) job ran both builds live and reported TEST BUILD SUCCEEDED for each. That job ran live because this PR's workflow and script changes make the selector run everything. Only the cold cache-miss path has run so far; a TypeScript-only PR skipping the builds end to end has not been observed yet. There are no conflicts, and nothing else needs to happen before merge.

Not blocking: the job-level if is only the draft check, so every non-draft PR still provisions the macOS runner before the builds are skipped, and the comment and PR text could say "runs the builds only on..." instead of "pays macOS minutes only on..."; the four BUILD_OWNERSHIP entries could be generated from one platform list; the new selectChecks assertions in apple-ci-impact.test.ts repeat what model.test.ts and device-lanes.test.ts already pin; the cache restore and save around a roughly 20s build adds little; and ownsAppleRunnerBuildSource skips the build recipe files, though scripts/ and .github/ changes already select everything. You can take or leave any of these.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 19, 2026
@thymikee
thymikee merged commit 93d9ff6 into main Nov 19, 2026
21 checks passed
@thymikee
thymikee deleted the t3/tvos-visionos-pr-build branch November 19, 2026 15:10
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