Commit Graph

2 Commits

Author SHA1 Message Date
Wes
0e7fd48d41 ci(mobile): run the Mobile Swift Native lane only for native changes (#9847)
## What changes

The Mobile Swift Native job rebuilds the iOS simulator app from scratch.
On the run in #9809, `xcodebuild build-for-testing` took about 19
minutes and RunnerTests took about a minute. That PR changed the pubspec
files, so it would select Native under this filter.

For PRs, select Native for changes to `mobile/ios/`, `mobile/packages/`,
`mobile/assets/`, `mobile/scripts/`, the pubspec files, the Flutter SDK
pin, the four native test scripts, or either CI workflow that configures
it. Changes to the SDK pin or the four native test scripts also select
mobile CI. At GitHub’s 3,000-file listing limit, the selector runs all
suites.

When a PR selects mobile CI and touches none of the Native paths, Mobile
Swift runs the unsigned iOS release build and skips the debug simulator
build and its Apple Silicon linking check (#7646). Dart-only and
Android-only mobile PRs are examples.

Pushes to `main` and `release` run both Swift lanes whenever mobile CI
is selected. A RunnerTest starts the normal Dart entry point in a
Flutter engine. A Dart change that passes PR checks can therefore fail a
simulator test on the merge commit.

## Validation

- The local CI selection suite passed against the pinned
`dorny/paths-filter` action with 83 passes and eight Linux-only skips.
The required-context isolation contract also passed.
- GitHub scheduled both Swift lanes on the initial revision `a34746e6`.
Native passed in 14m35s and Release passed in 6m24s. [CI
run](https://github.com/block/buzz/actions/runs/44863694135)
- To verify hosted Release-only scheduling after merge, check the next
mobile PR that changes none of the Native paths. Mobile Swift should
show Release only, and the required Mobile check should report its
result.

---------

Signed-off-by: Wes <wesb@block.xyz>
Co-authored-by: Gamora <a0291282695a734997579812cc077d006bd2c5a73855019e537a0cddd46887c1@buzz.block.builderlab.xyz>
2026-11-21 16:41:55 -07:00
Tom Brow
02c6309f53 fix(ci): select runtime suites from PR changes only (#7843)
A documentation-only update to #7809 selected desktop builds and E2E
tests because path detection compared an old PR base SHA with GitHub's
newer synthetic merge commit. The [failing run's path-detection
log](https://github.com/block/buzz/actions/runs/35789957773/job/106955810630)
includes four unrelated desktop files from `main`; `VISION_MOBILE.md`
did not match a runtime filter.

Use GitHub's PR file list for pull requests so unrelated changes in the
synthetic merge commit cannot select runtime suites. The existing
directory filters are unchanged: root and docs/ Markdown do not select
runtime suites, while Markdown under runtime directories still selects
its affected suites. Mixed code/documentation changes retain normal
coverage. Always-on security, policy, and source-contract checks and
full push-to-main coverage are unchanged.

Added regression coverage runs the pinned paths-filter action against
real fixture repositories, including a synthetic merge containing
unrelated upstream desktop code. All 35 selection scenarios and 26
required-check scenarios pass; the new regressions failed before the
fix. Existing required-context isolation, file-size policy, and
security-review contract checks pass, as do script lint and workflow
syntax validation. Full workflow lint reports the same two pre-existing
shell-quoting findings in the untouched dead-token guard. A desktop E2E
build was run to diagnose the unrelated required smoke failure.

Related: #7809 (incident, unchanged) and #5756 (shared-input path
coverage, separate scope). No matching issue found.

PRs with at least 3,000 changed files now select every runtime suite,
avoiding GitHub's PR-file-list ceiling. Boundary tests cover 2,999,
3,000, and 3,001 files, including a runtime file omitted beyond the API
cap; disabling the safeguard makes the latter two regressions fail.

Required checks now run and fail when path selection fails, is
cancelled, or is skipped. Regression coverage exercises the workflow
conditions and shell checks for all 13 required wrappers, plus an
API-denial case against the pinned action. Mutating either the
scheduling guard or the result check makes all 13 failure regressions
fail.

The required mention-settings smoke test expected a pin after explicitly
disabling automatic mentions. Waiting for its old avatar to exit
reproduced the CI failure 3/3; the test now checks that subsequent
mentions remain manual and retains outgoing recipient-tag assertions.
Corrected browser regression: 20/20 repeated runs; related picker unit
tests: 18/18. No desktop production behavior changed. The always()
requirement is now pinned in required-wrapper regression tests; deleting
it fails all 26 gate cases.

---------

Signed-off-by: Tom Brow <tomb@block.xyz>
2026-09-25 23:19:32 +00:00