Skip to content

fix: accept SwiftBuild-backend bundle layout in release stage checks#59

Merged
onevcat merged 1 commit into
mainfrom
fix/release-stage-swiftbuild-bundle-layout
Jul 23, 2026
Merged

fix: accept SwiftBuild-backend bundle layout in release stage checks#59
onevcat merged 1 commit into
mainfrom
fix/release-stage-swiftbuild-bundle-layout

Conversation

@onevcat

@onevcat onevcat commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

verify-stage hardcoded the classic flat SwiftPM resource layout (<bundle>/viewer/index.html, <bundle>/Resources/sim-use-device-bridge.apk). SwiftBuild-backend toolchains (Xcode 26.6+/27) produce macOS-shaped bundles with resources under Contents/Resources, so staging a payload built on Xcode 27 B4 failed the Viewer-SPA contract even though every resource was present — blocking the upcoming v0.11.0 release.

Fix

New bundle_resource_root() helper resolves each staged bundle's resource root the way Foundation does (Contents/Resources when present, bundle root otherwise); the Viewer-SPA and bundled-APK contracts run against that root. Both layouts pass; the contracts still trip when resources are genuinely missing.

Runtime needed no change: all three lookup sites (AndroidDeviceController.bundledAPKPath, ViewerStaticFiles.rootURL, Init skill source) go through the Bundle API, which is layout-agnostic.

Verification

  • Found by /bump-version-dev on Xcode 27 Beta 4: staging previously failed at the Viewer contract; after the fix verify-stage passes (Android bridge APK 4511756 bytes, Viewer 2 assets).
  • Staged v0.11.0-shaped payload smoke-tested live: tap --id + describe-ui + orientation calibration on a booted iOS 27 simulator through the installed binary, and the Viewer SPA served index.html (HTTP 200) from the deep layout.

🤖 Generated with Claude Code

verify-stage hardcoded the classic flat SwiftPM resource layout
(<bundle>/viewer/index.html, <bundle>/Resources/*.apk). SwiftBuild-
backend toolchains (Xcode 26.6+/27) produce macOS-shaped bundles with
resources under Contents/Resources, so staging a payload built there
failed on the Viewer-SPA contract even though the resources were
present. Resolve each bundle's resource root the way Foundation does
(Contents/Resources when it exists, bundle root otherwise) before
running the contracts; runtime lookups already go through the Bundle
API and are layout-agnostic.

Found by a /bump-version-dev local install on Xcode 27 Beta 4; the
staged v0.11.0-shaped payload passed verify-stage after the fix and
was smoke-tested live (tap-by-id + describe-ui on a booted simulator,
Viewer SPA served from the deep layout).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Signed-off-by: onevcat <onevcat@gmail.com>
@onevcat
onevcat merged commit 78883bc into main Jul 23, 2026
4 checks passed
@onevcat
onevcat deleted the fix/release-stage-swiftbuild-bundle-layout branch July 23, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant