Skip to content

fix(ios): budget snapshot bridge test compile from the build ceiling - #2454

Merged
thymikee merged 1 commit into
mainfrom
fix/ios-native-runtime-build-deadline
Sep 10, 2026
Merged

thymikee merged 1 commit into
mainfrom
fix/ios-native-runtime-build-deadline

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

The host bridge unit test (native-runtime.test.ts) compiled the snapshot bridge under a fixed timeoutMs: 45_000 with a 60_000 hook budget. On a cold macOS runner the first xcrun pays the signature-scan stall (#2422) and then clang, so the step reports xcrun timed out after 45000ms while every other check is green.

Both beforeAll compiles now budget from a deadline sized to the production build ceiling — createSnapshotSourceDeadline(BUILD_TIMEOUT_MS) + remainingSnapshotSourceMs — so the unit lane is never stricter than the preparation path it sits beside. The budget is a true Math.min of the same value production clamps to, not a fresh constant: BUILD_TIMEOUT_MS is now @internal-exported as the single source of truth for the compile ceiling. The hook budget leaves headroom beyond it so runCmd's own timeout (not the Vitest hook) surfaces on a real hang.

Two files touched, both in snapshot-source. No production behavior or BUILD_TIMEOUT_MS value changes.

Validation

Tested at c394a46e59b03dc7af8a147969a48562678c4649.

Local gates for the change pass: format, oxlint, tsc, check:layering, check:fallow (2 changed files, no issues), check:production-exports, build, check:package, and the full snapshot-source vitest family (native-runtime 46 tests green).

A broad check:affected --run fan-out surfaced unrelated daemon/provider failures (daemon-entrypoint 5 s timeout flakes that pass in isolation, a provider-integration CI lane, an xml teardown race, and two request-router-lock-policy real-time asserts). The lock-policy pair was reproduced failing identically on origin/main with this change reverted, so none are regressions here. Provider-integration, coverage, and device lanes remain GitHub-authoritative.

Cannot produce a local failing repro: the failure is cold-runner-only and this host compiles the bridge in seconds. The definitive signal is the CI step staying green; per #2439, reopen with the run URL if it fires again.

Closes #2439

The host bridge unit test compiled the snapshot bridge under a fixed 45 s
budget that a cold macOS runner trips on during the first `xcrun` (the
signature-scan stall plus clang). Budget both `beforeAll` compiles from a
deadline sized to production's build ceiling via `createSnapshotSourceDeadline`
and `remainingSnapshotSourceMs`, so the unit lane is never stricter than the
preparation path it mirrors. `BUILD_TIMEOUT_MS` is now `@internal`-exported as
the single source of truth for that ceiling instead of a second magic number.

Closes #2439
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.53 MB 4.53 MB -246 B
Package (unpacked) 4.53 MB 4.53 MB -246 B
Package (download) 1.34 MB 1.34 MB -135 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.2 ms 26.0 ms -0.2 ms
CLI --help 75.7 ms 74.7 ms -1.0 ms

@thymikee

Copy link
Copy Markdown
Member Author

No code findings at c394a46. Both test compiles use the production build ceiling without widening the production budget, and all 46 native bridge tests passed in CI. The remaining iOS failure is in the unchanged identical-alert replacement test, not bridge compilation; it looks unrelated and needs a green rerun before merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Sep 10, 2026
@thymikee
thymikee merged commit 805ffb4 into main Sep 10, 2026
17 of 18 checks passed
@thymikee
thymikee deleted the fix/ios-native-runtime-build-deadline branch September 10, 2026 13:15
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-10 13:16 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.

ios(ci): native-runtime bridge compile test uses a fixed 45 s budget that trips on a cold runner

1 participant