Skip to content

Fix Apple Silicon iOS simulator builds - #7646

Merged
brow merged 3 commits into
mainfrom
ios-simulator-mlkit
Sep 14, 2026
Merged

brow merged 3 commits into
mainfrom
ios-simulator-mlkit

Conversation

@brow

@brow brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Apple Silicon simulator builds fail because MLImage and MLKit contain device-labelled ARM64 objects.

Enable the Flutter ML Kit package's upstream compatibility helper, which restores device labels for iPhone builds. This preserves the MLKit-based functionality (avatar background removal) and complements the notification-extension linker isolation in #7187.

Adds a complete iOS simulator build to CI to catch this build regression.

CI dependency update: both Rust lockfiles pin rustls 0.23.45 to resolve RUSTSEC-2026-0285. The root advisory check and WebSocket-client tests pass locally.

Signed-off-by: Tom Brow <tomb@block.xyz>
@brow

brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@brow

brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@builderbot review

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 4cd82f513214aad11c2b742ce7cc7c681e8e32a0...49cfc9eecdb8ee1e250f7fd5055d95c38176862a
  • Model: gpt-5.6-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability issues were identified in the authorized PR range.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • No additional limitations were reported.

Generated by Codex Security Review |
Requested by: @brow |
Workflow run

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T21:42:38.792382Z 49cfc9e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: fb0f6794bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Signed-off-by: Tom Brow <tomb@block.xyz>
@brow
brow marked this pull request as ready for review September 14, 2026 21:33
@brow
brow requested a review from a team as a code owner September 14, 2026 21:33
@brow
brow enabled auto-merge (squash) September 14, 2026 21:33
@brow

brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@buzz-security-review f5e080a

Signed-off-by: Tom Brow <tomb@block.xyz>
@brow

brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@buzz-security-review 49cfc9e

@brow

brow commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Sep 14, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 49cfc9eecd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:bot: Jude’s code review agent — APPROVE at exact head 49cfc9eecdb8ee1e250f7fd5055d95c38176862a against base 4cd82f513214aad11c2b742ce7cc7c681e8e32a0.

No author-actionable defects found.

Why the fix earns approval

  • mobile/ios/Podfile:38-48 loads the pinned google_mlkit_commons 0.12.0 compatibility helper inside post_install, after Flutter creates plugin symlinks, and applies it after Flutter's normal Pod settings. The helper maps simulator and device builds to the correct Mach-O platforms rather than leaving a persistent simulator-only mutation.
  • On arm64 macOS 26.6.2 / Xcode 26.6 / pinned Flutter 3.41.7, the complete exact-head simulator app built successfully. The same command failed at base 4cd82f5; it also failed when only the new helper invocation was removed from exact head. This causally exercises the reported Apple Silicon linker regression, not a ceremonial compilation step.
  • After the simulator build, the complete unsigned device release built successfully without reinstalling Pods. Inspection showed the MLKit arm64 slice transition from IOSSIMULATOR to IOS, covering the simulator→device ordering now encoded in .github/workflows/_ci-clients.yml:134-137.
  • The avatar pipeline remains intact: mobile/lib/features/profile/animated_avatar_capture.dart:298-353 still invokes segmentation for captured frames, and mobile/lib/features/profile/animated_avatar_capture/frame_processing.dart:11-53 still applies the returned mask. No UI, fallback, semantics, accessibility, or frame/mask algorithm code changed.
  • The complete simulator app was independently installed and launched on a fresh iOS 26.5 iPhone 17 Pro simulator; it remained alive and rendered Buzz's Welcome/pairing UI.
  • Both Rust lockfiles resolve rustls 0.23.45 plus the corresponding aws-lc-rs 1.18.1, aws-lc-sys 0.45.0, and rustls-webpki 0.103.15 updates. Dependency tracing covered root TLS consumers and Desktop updater/HTTP/WebSocket paths.

Verification

At matching exact head with a clean review tree:

  • PASS — just mobile-check (555 Dart files; analyzer clean)
  • PASS — just mobile-test (2,121 tests)
  • PASS — complete local arm64 iOS simulator build
  • PASS — fresh-simulator install, launch, liveness, and visual inspection
  • PASS — complete unsigned device release immediately after simulator build
  • PASS — exact-head GitHub Mobile Swift job on macos-26-arm64, including complete simulator app and subsequent unsigned device release
  • PASS — required GitHub checks at final preflight, including Mobile, Rust Lint, Unit Tests, Windows Rust, Desktop macOS build, Desktop Release Candidate, Security, and DCO
  • PASS — git diff --check

Non-blocking confidence gaps

The review did not execute camera → native ML Kit segmentation → transparent-avatar output on a simulator or physical iPhone, and did not exercise a signed internal release artifact. The new gate proves the linker fix, app startup, and target relabel reversal, but not model-output quality or signed-device deployment.

Author action: none.
Verification owner: native iOS reviewer tooling for the segmentation journey; normal release pipeline/operator for the signed physical-device artifact.

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:bot: Jude’s code review agent

Verdict: APPROVE
Reviewed: 4cd82f513214aad11c2b742ce7cc7c681e8e32a0..49cfc9eecdb8ee1e250f7fd5055d95c38176862a (exact head 49cfc9eecdb8ee1e250f7fd5055d95c38176862a)
Risk: high — iOS native dependency/linker behavior across simulator and device targets, plus Rust TLS lockfile updates touching relay/Desktop consumers.

Behavior/contracts traced: Flutter/CocoaPods plugin installation → ML Kit Mach-O target relabeling → complete Apple Silicon simulator app build → subsequent device release build; avatar segmentation consumer; CI runner/path gate; root/Desktop rustls/aws-lc lockfile parity and TLS consumers.

Findings: no unresolved blocking or non-blocking code defect.

The Podfile loads the upstream helper inside post_install after Flutter creates plugin symlinks (mobile/ios/Podfile:38-48). The pinned helper maps simulator arm64 objects to the simulator platform and restores device labeling for iphoneos. Independent exact-head evidence showed MLKitXenoCommon as IOSSIMULATOR after the simulator build and IOS after the subsequent device build without reinstalling Pods. The complete Apple Silicon simulator build passed at this head, failed at base, and failed again after mutation-deleting the helper, so the new CI gate exercises the causal production seam rather than a decorative compile step. The subsequent unsigned device release also passed.

The avatar path remains on SelfieSegmenter.processImage and mask application (mobile/lib/features/profile/animated_avatar_capture.dart:298-353; mobile/lib/features/profile/animated_avatar_capture/frame_processing.dart:11-53); the PR changes dependency/Pod integration, not user-facing flow or fallback semantics. Both Rust lockfiles resolve rustls 0.23.45 with matching aws-lc/webpki updates, and exact-head security/Rust/Desktop platform gates passed.

Author action: none.
Verification owner: reviewer/tooling for a native camera→segmentation→transparent-avatar journey; CI/release gate for signed physical-device packaging.

Validation at exact clean head: just mobile-check passed (555 Dart files, analyzer clean); just mobile-test passed (2,121); full arm64 iOS simulator build passed and mutation/base builds failed causally; fresh simulator install/launch remained alive and rendered the real Welcome/pairing UI; subsequent unsigned device release passed; exact-head Mobile Swift CI passed simulator then device builds; git diff --check, DCO, Security, Rust unit/platform, and Desktop macOS/Windows checks passed.

Manual/native evidence: fresh iOS 26.5 iPhone 17 Pro simulator install/launch on arm64 macOS 26.6.2 / Xcode 26.6; complete app launched and rendered. This proves startup/build compatibility, not segmentation output quality.

Residual risk: no camera/ML Kit segmentation output was exercised on simulator or physical device, and no signed release artifact was installed. Those are confidence gaps owned by reviewer/native tooling and the normal release gate, not author-actionable defects.

@brow
brow merged commit 7c789de into main Sep 14, 2026
87 checks passed
@brow
brow deleted the ios-simulator-mlkit branch September 14, 2026 22:14
brow added a commit that referenced this pull request Sep 14, 2026
…eway-origin

* origin/main:
  Fix Apple Silicon iOS simulator builds (#7646)

Signed-off-by: Tom Brow <tomb@block.xyz>
michaelneale added a commit that referenced this pull request Sep 15, 2026
* origin/main:
  Fix Apple Silicon iOS simulator builds (#7646)

Signed-off-by: Michael Neale <michael.neale@gmail.com>
brow added a commit that referenced this pull request Sep 15, 2026
…ush-cache-offload

* commit '41c5ace93740261ee5a5d962c2a17e8d846c2c1b':
  perf(mobile): move profile sig checks off main thread (#7648)
  perf(mobile): avoid redundant message list sorting (#7647)
  perf(mobile): avoid reparsing unchanged Markdown (#7649)
  Fix desktop onboarding regressions (#7659)
  Deduplicate thread context by ACP session delivery (#7620)
  feat(mobile): hard-block under-18 users on the store age signal (#4665)
  Document incoming Buzz turn structure (#7624)
  Refresh desktop onboarding flow (#7528)
  Fix Apple Silicon iOS simulator builds (#7646)

Signed-off-by: Tom Brow <tomb@block.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants