Skip to content

feat(cli): Decode iOS asset catalogs with CoreUI - #1500

Merged
BYK merged 3 commits into
mainfrom
feat/ios-asset-catalogs
Oct 15, 2026
Merged

BYK merged 3 commits into
mainfrom
feat/ios-asset-catalogs

Conversation

@BYK

@BYK BYK commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Supersedes getsentry/cli#1469 and carries its iOS asset-catalog work into Toolkit.

Closes getsentry/cli#1429.

  • Port the complete legacy CoreUI Swift reader from getsentry/sentry-cli@c596fcddd616867b6c6cdfa11f9853dc889a585a.
  • Preserve the legacy Assets.json array, metadata fields, and sibling <imageId>.<extension> image association. Canonicalize IDs and rename their images together for deterministic uploads.
  • Build and embed the decoder in macOS arm64 standalone binaries. Resolve native paths relative to their modules and explicitly load CoreUI.
  • Stream decoded files into XCArchive and IPA wrappers. Preserve original catalogs, reject unsafe output, keep extraction failures nonfatal, and prevent collisions with existing parsed files or parent paths.
  • Add two real legacy catalogs, focused regressions, and macOS arm64 CI that builds the production SEA binary and checks real pixels, repeated-upload stability, IPA normalization, corrupt-catalog fallback, and upload through the embedded helper.

These changes address Trevor's five review points on the original PR: native path resolution, the complete reader, the manifest contract, image filenames, and using CoreUI instead of reverse-engineering the catalog format.

Validation

Validated on Toolkit base 098a9b23:

  • pnpm run tsc — passed.
  • pnpm run lint — passed.
  • pnpm run test --printConsoleTrace — passed across all workspaces:
    • CLI: 10,734 passed, 18 skipped.
    • MCP core: 1,808 passed, 6 skipped.
    • Toolkit core: 54 passed; MCP server: 87 passed; test client: 80 passed; Cloudflare: 433 passed.
  • Documentation links, generated-file checks, generated pre-commit checks, CLI policy checks, and git diff --check — passed.
  • Focused build tests: 107 passed, 5 macOS-only tests skipped on Linux.
  • Full bundled E2E run: 162 passed, 3 skipped, 1 timing failure (completion took 519.6 ms against a 500 ms limit). The unchanged assertions passed on the focused rerun: 4/4 tests on both unchanged main and this branch, including completion at 483 ms and 478 ms respectively.
  • Source-mode completion and telemetry timing assertions fail on both unchanged main and this branch. Unchanged main measured 704.8 ms completion and 3,215.1 ms telemetry-enabled exit; the branch measured 868.8 ms and 2,944.5 ms. The source E2E timing limits remain unchanged.

Native CoreUI execution is covered by the macOS arm64 job, which now feeds the required aggregate test gate.

Review update (e24253e7)

  • Removed the redundant license disclosures from the native sources, both READMEs, and this description.
  • Made native CI part of the required aggregate gate, with a regression covering nine job-result/project-count scenarios.
  • Fixed universal idiom metadata and added a real-catalog native assertion.
  • Incorporated main 1b63965f and reran typecheck, lint, all workspace tests, documentation/generated-file checks, CLI policies, and all 65 CI-policy tests successfully. The CLI suite passed 10,795 tests; the Local viewer passed 110.
  • All six current review threads have concrete replies and are resolved. CI is rerunning on this exact head, including the native regression.

Fixture correction (79f76b3f)

The legacy catalog is phone-specific. The native suite now compiles a separate explicitly universal image set with Xcode actool and tests both idioms through XCArchive, IPA, and embedded-binary uploads: eight native cases. Both original real catalogs and all pixel, filename-association, and repeat-upload checks are retained.

Local typecheck, lint, workspace tests, documentation/generated-file checks, and all 65 CI-policy tests passed. macOS CI passed all eight native cases on 79f76b3f, including universal assets uploaded through the embedded binary: https://github.com/getsentry/toolkit/actions/runs/38667923127/job/116204089698 .

Port the pinned legacy Swift reader, preserve its manifest and image pairing, and embed the decoder in macOS arm64 binaries. Add safe deterministic normalization, real catalog fixtures, and native integration coverage.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@BYK
BYK requested a review from trevor-e October 14, 2026 22:33
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 14, 2026

@cursor cursor Bot 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.

Stale Bugbot comment from a previous run.

Comment thread packages/cli/src/lib/build/asset-catalog-extract.ts
Comment thread packages/cli/script/build.ts
Comment thread packages/cli/native/car-extract/Sources/ObjcSupport/safeValueForKey.m Outdated
Comment thread packages/cli/native/car-extract/README.md Outdated
Comment thread .github/workflows/test.yml
Merge current main, remove redundant license disclosures, require native asset-catalog checks in the aggregate test gate, and preserve universal idiom metadata with regressions.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Oct 15, 2026 1:51am UTC

Request Review

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e24253e. Configure here.

Comment thread .github/workflows/test.yml
Keep the phone-specific legacy catalog and compile a separate universal image set with actool. Verify both idioms through XCArchive, IPA, and embedded-binary uploads.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@BYK

BYK commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Reviewed the final Warden helper-path annotation against the exact-head macOS run. It repeats the earlier lookup finding: SwiftPM provides the release alias, and all eight native cases passed on 79f76b3, including source-mode XCArchive/IPA normalization and universal-image upload through the embedded binary. The remaining annotation is a false positive; no code change is needed. Native evidence: https://github.com/getsentry/toolkit/actions/runs/38667923127/job/116204089698

@BYK
BYK merged commit bc345eb into main Oct 15, 2026
35 checks passed
@BYK
BYK deleted the feat/ios-asset-catalogs branch October 15, 2026 02:19

This branch was previously deployed

1 inactive deployment
Preview — 79f76b3f Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse iOS Assets.car into per-asset images

1 participant