fix(ios): budget snapshot bridge test compile from the build ceiling - #2454
Merged
Merged
Conversation
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
Size Report
Startup median (7 runs, lower is better):
|
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. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The host bridge unit test (
native-runtime.test.ts) compiled the snapshot bridge under a fixedtimeoutMs: 45_000with a60_000hook budget. On a cold macOS runner the firstxcrunpays the signature-scan stall (#2422) and then clang, so the step reportsxcrun timed out after 45000mswhile every other check is green.Both
beforeAllcompiles 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 trueMath.minof the same value production clamps to, not a fresh constant:BUILD_TIMEOUT_MSis now@internal-exported as the single source of truth for the compile ceiling. The hook budget leaves headroom beyond it sorunCmd's own timeout (not the Vitest hook) surfaces on a real hang.Two files touched, both in
snapshot-source. No production behavior orBUILD_TIMEOUT_MSvalue 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 fullsnapshot-sourcevitest family (native-runtime 46 tests green).A broad
check:affected --runfan-out surfaced unrelated daemon/provider failures (daemon-entrypoint5 s timeout flakes that pass in isolation, a provider-integration CI lane, an xml teardown race, and tworequest-router-lock-policyreal-time asserts). The lock-policy pair was reproduced failing identically onorigin/mainwith 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