iOS Phase 1: unified JS bundle + smoke test (simulator-only)#15
Merged
Conversation
Captures the implementation plan for Phase 1 of build-architecture-plan.md (unifying the iOS JS bundle with Android via scripts/build-backend.ts) plus the iOS half of Phase 3 (an XCTest smoke that proves the embedded ComapeoManager actually instantiates). https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
Device builds (ios-arm64) are deferred to Phase 2's xcframework migration, which provides a single multi-slice artifact per addon. Shipping loose .node files for both device and simulator now would force a runtime TARGET_OS_SIMULATOR branch and codesign workarounds that Phase 2 throws away. https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
scripts/build-backend.ts now produces the same nodejs-project tree for both Android and iOS, plus simulator-arch native prebuilds for iOS at ios/nodejs-native/<arch>/. The hand-maintained ios/nodejs-project/ tree and the podspec script_phase that ran npm install for it are removed — the unified bundle ships node_modules pre-populated. iOS device slices (ios-arm64) are deferred to Phase 2 of docs/build-architecture-plan.md, when xcframework packaging delivers a single multi-slice artifact per addon. https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
SimpleRpcServer now tracks connected clients and a readiness phase. After
both UDS servers start listening, backend/index.js calls
setReadinessPhase("started") and (after a 1 s settle window)
setReadinessPhase("ready"). Both transitions broadcast to current clients
and are replayed in order to any client that connects after the broadcast.
The settle-window + replay behaviour previously lived in the iOS-only
ios/nodejs-project/index.js stub, where it was needed to make Swift's
NodeJSIPC client (which polls for the socket file then retries connect)
reliably observe the started/ready edge. Now that iOS uses the unified
backend bundle, the behaviour rides along into the shared code path; the
existing Swift ServiceLifecycleTest "late state-IPC receives started/ready"
regression assertion continues to pass.
Android tolerates the new broadcasts: NodeJSIPC.kt's message callback
just logs received frames, so unrecognised types are no-ops.
https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
NodeJSService now matches Android's argv shape:
[node, indexPath, comapeoSocketPath, controlSocketPath, privateStorageDir]
The third positional is consumed by backend/index.js as `privateStorageDir`
and handed to createComapeo({privateStorageDir, ...}) — the analogue of
Android's getFilesDir(). AppLifecycleDelegate resolves it from
.applicationSupportDirectory + "comapeo".
Renames stateSocketPath → controlSocketPath (and stateIPC → controlIPC,
state.sock → control.sock) so iOS uses the same socket nomenclature
backend/index.js and Android already use. Local variable names like
`stateServer` in test files are left as-is — they're not API.
resolveJSEntryPoint switches from index.js → index.mjs to match the
unified rolled-up bundle (Android already uses .mjs).
https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
End-to-end smoke test for the unified iOS bundle. Asserts the three
deliverables of the task:
1. App builds — proven by the test target compiling.
2. App loads — NodeJSService reaches .started.
3. CoMapeo core manager instantiates — proven by the control socket
receiving the `ready` broadcast (which only fires after both
comapeoRpcServer.listen() and createComapeo() have completed in
backend/index.js) plus a final accept-test on the comapeo socket.
Test runs first in alphabetic order, ahead of ServiceLifecycleTest's
terminal shutdown phase. Ordering is intentional and called out in the
file's docstring.
https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
Replaces the manual "cd ios/nodejs-project && npm install --omit=dev" step (which only worked when ios/nodejs-project/ was a hand-maintained npm root) with a single "npm run backend:build" invocation. The backend build script now generates the same ios/nodejs-project/ tree from backend/ via the rollup pipeline that produces the Android assets, plus simulator-arch native prebuilds at ios/nodejs-native/. Pod install picks up both directories as resources via the updated ComapeoCore.podspec. https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
build-architecture-plan.md gains a 2026-04-27 status banner on Phase 1 pointing at this branch and the dedicated implementation plan. The phased steps themselves are unchanged; the simulator-only carve-out is called out inline on step 2. unified-js-bundle-ios-plan.md acceptance checkboxes split into three buckets: ticked items that are mechanically true after the commits land (no script_phase, no on-disk hand-edited tree, no new asset-extraction); items pending a CI run (the test suite, byte-equivalence checks); and items requiring an end-to-end manual run (device-build failure). https://claude.ai/code/session_01Da8KcufxqD5DmQduZETkDF
* main: update some native deps used in backend (#14)
…r undici
Three build-pipeline fixes that turn the rolled-up iOS bundle into one
nodejs-mobile can actually load:
1. better-sqlite3 / native module URLs. The 11.10.0 release is now what
Phase 1 fetches (prebuilds.json hosts node-108 iOS slices under that
tag). Drops the dead `-bare-make` suffix and switches to the unified
`${version}` tag for every native module. better-sqlite3 stays
`usesNapi: false` because the iOS asset is `node-108`-suffixed.
2. iOS prebuild path layout. The release tarball nests files under
`prebuilds/ios-arm64-simulator/`, but Bare's addon resolver looks at
`prebuilds/${process.platform}-${process.arch}` at runtime — `ios-arm64`
on M-series sim, `ios-x64` on Intel. Strip the `-simulator` suffix when
placing files into `ios/nodejs-native/<arch>/`. The outer `<arch>/`
directory keeps the suffix so the iOS Swift extractor can pick the
right slice for the current build.
3. undici. nodejs-mobile iOS runs V8 with `--jitless` for App Store
compliance, so the `WebAssembly` global is absent. Undici's HTTP/1.1
client (`lazyllhttp`) calls `WebAssembly.compile` at module-init,
crashing the process before the entry runs. The bundle's only direct
undici importer is `@comapeo/core/src/fastify-plugins/maps.js`; replace
that file with a no-op stub between `npm ci` and rollup so undici
never lands in the bundle. Tile fetching is out of scope for Phase 1
and will be re-introduced via a non-WASM HTTP client later.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e fetch Two iOS-side changes needed to actually start the unified backend bundle. `AppLifecycleDelegate.prepareNodeBundle()` mirrors Android's runtime asset copy (`NodeJSService.kt`'s `copyAssetFolder` + the `nodejs-native` overlay): the bundle ships `nodejs-project/` and `nodejs-native/<arch>/` as separate read-only resources, but Node's addon resolver expects them merged under `nodejs-project/node_modules/...`. Extract both into Application Support and overlay the active simulator slice on top. For Phase 1 we always re-extract on cold start — the tree is small enough (~50 files) and avoids stale files when a developer reinstalls over an older build. Compile-time `#if arch(arm64)` picks the right slice. Side fix: `Self.resolvePrivateStorageDir()` was rejected by Swift 6 (covariant Self can't be referenced from a stored-property initializer); qualify with the explicit class name. `NodeJSService.runNode` now passes `--no-experimental-fetch` to nodejs- mobile. The bundle no longer imports `undici` directly (see the maps- plugin stub), but Node's built-in `globalThis.fetch` is itself a getter that lazy-loads undici on first access. Disabling it prevents anything that calls the global fetch (e.g. member-api invite flow) from re-introducing the same WASM-at-module-init crash. Android doesn't need the flag (JIT is permitted) but the flag is harmless on both platforms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the post-`npm ci` `node_modules` mutation with a rollup-level
mechanism: a small custom resolver plugin swaps
`@comapeo/core/src/fastify-plugins/maps.js` for `backend/lib/maps-stub.js`
in the iOS bundle only. The Android bundle keeps the real plugin (and
therefore undici, which Android's nodejs-mobile runs fine since it permits
JIT). Two `RollupOptions` configs share inputs and plugins, differing only
in the output dir and the iOS-only `stubComapeoMapsPlugin()`.
`scripts/build-backend.ts` now consumes the per-platform `dist/{android,ios}/`
trees: drop the `dist` entry from `KEEP_THESE_FROM_BACKEND`, materialise
two `nodejs-project-{android,ios}/` template dirs, then flatten each
platform-specific dist into its dir. Final copy step writes to the
existing Android assets dir + iOS resource bundle paths unchanged.
Why this change: the previous approach overwrote a file in
`node_modules/@comapeo/core/src/fastify-plugins/maps.js` between `npm ci`
and rollup. That regressed Android (the same patched file ended up in the
Android bundle even though Android can run the real plugin), and the
patch only landed when rollup was driven via `build-backend.ts` —
running `npm run build` directly from `backend/` produced an
iOS-incompatible bundle. Both go away with the alias.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`CoreManagerSmokeTest` previously read `service.state` and *then* installed the `onStateChange` handler if the read returned a non-`.started` value. `transitionState(to:)` fires synchronously on the node thread, so the transition could land between the read and the handler install — the test would then wait the full 30 s timeout. Install the handler first, then check state, then fulfill if already-started. Local re-run drops the smoke-test runtime from ~0.5 s to ~0.03 s by capturing the `.started` transition immediately. Side fix: `NodeJSService.runNode()` logged a missing-asset error referring to `nodejs-project/index.js`, which has been `index.mjs` since the rollup build landed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…backlog The iOS-tests workflow installed Node 20, which can't run `scripts/build-backend.ts` (Node ≥22.6 required for native TS stripping; package.json#devEngines pins ^24). Switch `actions/setup-node@v4` to `node-version-file: package.json` so the runtime tracks the project declaration — matches the Android workflow already does the same. Plan-doc update: scratch the obsolete "no new asset-extraction logic" claim (Phase 1 added `prepareNodeBundle()` to merge `nodejs-project/` + `nodejs-native/<arch>/` at runtime), and seed §7 with the Phase 2+ backlog from the PR review — `targetEnvironment(simulator)` switch, xcframework migration, version-stamp gate, fetch polyfill, maps plugin re-introduction, mergeDirectory symlink hardening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ead ABI The iOS workflow's `Download NodeMobile` step ran with `--platform ios`, which skips Android and therefore omits `android/libnode/include/node/node_version.h`. `scripts/build-backend.ts#getNodeJsMobileNodeVersions` reads that header to derive the Node ABI (108) baked into non-NAPI prebuild URLs — currently just `better-sqlite3`. Without it, build-backend crashed with ENOENT before producing any iOS bundle. Two-platform download is ~30 s slower than iOS-only and zero risk. Cheaper than carrying the ABI as a hard-coded constant that drifts when nodejs-mobile bumps Node. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
gmaclennan
added a commit
that referenced
this pull request
Apr 28, 2026
## Summary Cleanup pass after Phase 2 (PRs #15, #16, #17) landed on `main`. - **Open follow-up issues** for everything deferred from those PRs: #19–#32 (Android JNI stdio drain, iOS device smoke test, TestFlight ritual, fetch polyfill, maps plugin re-introduction, Phase 3 smoke test, Phase 4 socket-transport shim, IPC backpressure, 16KB page alignment audit, Android lifecycle parity, `abiFilters`, blobs over UDS, web platform). - **Remove implemented plan docs** — `docs/Todos.md`, `docs/phase-2-android-jnilibs-plan.md`, `docs/phase-2-xcframework-plan.md`, `docs/unified-js-bundle-ios-plan.md`. `docs/build-architecture-plan.md` stays (Phase 3-4 still open) with its inline status banners updated to point at the merged PRs. - **Trim history-oriented comments** throughout `scripts/build-backend.ts`, `backend/`, `ios/`, and `android/`: drop "Phase 1 wrote X / Phase 2 ships Y" framing, references to the external validating harness in `digidem/nodejs-mobile-bare-prebuilds`, and lingering `state.sock` naming in favour of `control.sock`. - **Refresh `agents.md`** to describe the unified rolled-up backend, jniLibs/xcframework packaging, and the current test layout. Replace the regression-test history table with a forward-looking "Open follow-ups" list pointing at the new issues. No behaviour changes. ## Test plan - [x] `tsc --noEmit -p scripts/tsconfig.json` clean (only comment edits there) - [ ] CI Android workflow green - [ ] CI iOS workflow green (simulator + device-build) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
gmaclennan
added a commit
that referenced
this pull request
May 6, 2026
Addresses the high- and medium-priority issues from the review subagent's pass over Phase 1+2a+2b: Boot transaction lifecycle (was: review #1, #15) - applyAndEmit now closes bootTx and drains in-flight phase spans on STOPPING / STOPPED transitions too — not just STARTED / ERROR. stop()-from-STARTING transitions to STOPPING (rule 3 of deriveLifecycleState) and bypassed both terminals; destroy() forcing STOPPED-via-stopRequested did the same. Status mapped: STARTED→ok, ERROR→ internal_error, STOPPING/STOPPED→cancelled. - startBootTransaction now passes a TransactionContext carrying TracesSamplingDecision(true, 1.0). The previous TransactionOptions-only setup didn't actually force sampling, so with the SDK default tracesSampleRate=0.0 the boot transaction was dropped before reaching the wire. SentryConfig misconfig handling (was: review #3) - Both Kotlin and Swift readers used to crash on (DSN-set, environment-missing) — meant to be "fail loud" but a stale prebuild from before the validation was added would crash every cold start with no recovery. Now log loud (System.err on Android since android.util.Log isn't mocked on JVM tests; NSLog on iOS) and return null (Sentry off). Updated test renamed to assert "returns null, doesn't throw". Span op/description ordering (was: review #19) - transaction.startChild(op, description) — op is the indexed dashboard column. Was passing ("boot", "boot.<phase>"), swapped to ("boot.<phase>", human-readable description) so the dashboard groups by the phase taxonomy that matches the bench backend's boot-spans.js helper. Plugin idempotency (was: review #7) - Previously, dropping `props.sentry` from the plugin registration left stale meta-data / plist entries from a previous prebuild (with `expo prebuild --no-clean`). Plugin now passes through a no-Sentry cleanup mod that strips every key it owns; consumer-owned keys (e.g. io.sentry.* set by @sentry/react-native's plugin) are untouched. messageerror payload truncation (was: review #8) - src/sentry.ts now truncates the wrapped error message to 256 chars before forwarding to captureException. The control-frame parser surfaces offending input verbatim, which can include arbitrary bytes from a corrupted frame — truncating keeps Sentry events small and readable. IPC + SEND_ERROR_NATIVE breadcrumbs/events (was: review #9, #10) - NodeJSIPC's onConnectionStateChange callback wired in the FGS-side controlIpc construction; emits comapeo.ipc breadcrumbs at info (warning on Error). Per §7.4.5. - SEND_ERROR_NATIVE_TIMEOUT_MS firing now captures a level=warning event with timeout:errorNativeForward tag. Per §7.4.4. Logging swallowed surprises (was: review low-priority) - SentryFgsBridge's empty `catch (t: Throwable) {}` blocks now Log.w so debug builds notice swallowed bridge / SDK bugs. Post-init bridge tests (was: review #6) - New SentryFgsBridgeImplTest spins up a real Sentry hub via the cross-platform Sentry.init(SentryOptions) path with an in-memory ITransport. Covers: addBreadcrumb (no envelope on its own), captureException + captureMessage (envelope enqueued), startBootTransaction with global tracesSampleRate=0.0 (must still reach transport thanks to the TracesSamplingDecision override — regression test for the §15 bug above), boot span lifecycle, finishSpan with cancelled status, unknown level fallback to INFO. All Sentry-related tests pass: 25 cases across SentryConfigTest (8), SentryFgsBridgeTest (10), SentryFgsBridgeImplTest (7). Verified locally: - npm run lint clean - npx tsc --noEmit clean - ./gradlew :comapeo-core-react-native:testDebugUnitTest passes - ./gradlew :comapeo-core-react-native:compileDebugKotlin succeeds with sentry-android on the compile classpath
gmaclennan
added a commit
that referenced
this pull request
Jun 22, 2026
## Optic Release Automation This **draft** PR is opened by Github action [optic-release-automation-action](https://github.com/nearform-actions/optic-release-automation-action). A new **draft** GitHub release [v1.0.0-pre.2](https://github.com/digidem/comapeo-core-react-native/releases/tag/untagged-c499977757c9745e56b2) has been created. Release author: @gmaclennan #### If you want to go ahead with the release, please merge this PR. When you merge: - The GitHub release will be published - The npm package with tag pre will be published according to the publishing rules you have configured - No major or minor tags will be updated as configured #### If you close the PR - The new draft release will be deleted and nothing will change ## What's Changed * Android Testing Infrastructure & Bug Fixes by @gmaclennan in #3 * chore: prebuild example/android; harden instrumented tests by @gmaclennan in #10 * Integrate @comapeo/core via IPC over Unix sockets by @gmaclennan in #5 * chore: adjust repo setup by @achou11 in #12 * chore: minor fixes based on expo-doctor by @achou11 in #13 * Add iOS support & test infrastructure by @gmaclennan in #6 * chore: add architecture docs & plans by @gmaclennan in #11 * update some native deps used in backend by @achou11 in #14 * iOS Phase 1: unified JS bundle + smoke test (simulator-only) by @gmaclennan in #15 * iOS Phase 2: xcframework Embed & Sign for native addons by @gmaclennan in #16 * Phase 2 Android: jniLibs packaging + unified rollup loader plugin by @gmaclennan in #17 * chore: post-Phase-2 cleanup — comments, plan docs, agents.md by @gmaclennan in #33 * android: read abiFilters from reactNativeArchitectures (#30) by @gmaclennan in #35 * refactor: simplify build-backend.ts; rollup writes directly to native asset trees by @gmaclennan in #34 * chore: fix eslint configuration by @achou11 in #41 * android: audit 16 KB page alignment on every shipped .so by @gmaclennan in #43 * Add rootkey persistence and lifecycle state management by @gmaclennan in #36 * chore: move example app into apps directory by @achou11 in #18 * refactor: per-component lifecycle state with derived ComapeoState by @gmaclennan in #47 * android: fold waitForFile into connect retry loop by @gmaclennan in #52 * chore: add e2e testing app by @achou11 in #49 * fix(android): drop setUnlockedDeviceRequired from rootkey wrapper key by @gmaclennan in #57 * fix(backend): cache stopping/error frames for late joiners by @gmaclennan in #58 * fix(ios-tests): wait for STOPPING before signalling node exit by @gmaclennan in #59 * fix(android): drain JNI stdio pumps before returning from node::Start by @gmaclennan in #60 * Sentry integration: Phase 1 + Phase 2a + Phase 2b by @gmaclennan in #54 * feat(backend): polywasm-backed undici on iOS, re-enable maps plugin by @gmaclennan in #62 * ci: drop unreliable Android emulator snapshot caching by @gmaclennan in #64 * feat(sentry): land Phase 3 — backend loader + RPC tracing by @gmaclennan in #63 * fix(ios-tests): serialise STOPPING/STOPPED observers in testFullLifecycleStateTransitions by @gmaclennan in #71 * use npm list instead of custom traversal to get native module versions by @achou11 in #70 * feat(sentry): land Phases 6 + 7a — Android exit reasons & iOS MetricKit app-exit telemetry by @gmaclennan in #72 * fix(sentry): make exit telemetry lossless and stop cross-process clobbering by @gmaclennan in #84 * chore(e2e): add e2e tests on browserstack via Maestro by @achou11 in #56 * feat(sentry): migrate to @sentry/react-native v8; exit telemetry as Application Metrics by @gmaclennan in #73 * Map server integration by @gmaclennan in #86 * chore(deps): upgrade to Expo SDK 56 (React Native 0.85) by @gmaclennan in #87 * chore(ci): add release workflow by @gmaclennan in #90 * chore: fix npm script and release build script by @gmaclennan in #91 * chore(pack): don't try to package build files by @gmaclennan in #92 * fix: start fastify listening by @gmaclennan in #93 * perf(backend): switch bundler from rollup to rolldown by @gmaclennan in #94 * fix(ci): ignore-scripts in ios npm installs by @gmaclennan in #96 * fix(ci): replace --ignore-scripts with npm strict-allow-scripts allowlist by @gmaclennan in #106 * feat(config): let the consuming app supply the default project config by @gmaclennan in #95 * chore(release): merge prerelease branch. by @gmaclennan in #110 ## New Contributors * @achou11 made their first contribution in #12 **Full Changelog**: https://github.com/digidem/comapeo-core-react-native/commits/v1.0.0-pre.2 <!-- <release-meta>{"id":342868678,"version":"v1.0.0-pre.2","npmTag":"pre","opticUrl":"https://optic-zf3votdk5a-ew.a.run.app/api/generate/"}</release-meta> -->
gmaclennan
added a commit
that referenced
this pull request
Jun 22, 2026
## Optic Release Automation This **draft** PR is opened by Github action [optic-release-automation-action](https://github.com/nearform-actions/optic-release-automation-action). A new **draft** GitHub release [v1.0.0-pre.2](https://github.com/digidem/comapeo-core-react-native/releases/tag/untagged-352a6c41c12fd02dec37) has been created. Release author: @gmaclennan #### If you want to go ahead with the release, please merge this PR. When you merge: - The GitHub release will be published - The npm package with tag pre will be published according to the publishing rules you have configured - No major or minor tags will be updated as configured #### If you close the PR - The new draft release will be deleted and nothing will change <!-- Release notes generated using configuration in .github/release.yml at 7fe80b4 --> ## What's Changed ### 🚀 Features * Integrate @comapeo/core via IPC over Unix sockets by @gmaclennan in #5 * Add iOS support & test infrastructure by @gmaclennan in #6 * iOS Phase 1: unified JS bundle + smoke test (simulator-only) by @gmaclennan in #15 * iOS Phase 2: xcframework Embed & Sign for native addons by @gmaclennan in #16 * Phase 2 Android: jniLibs packaging + unified rollup loader plugin by @gmaclennan in #17 * android: read abiFilters from reactNativeArchitectures (#30) by @gmaclennan in #35 * Add rootkey persistence and lifecycle state management by @gmaclennan in #36 * Sentry integration: Phase 1 + Phase 2a + Phase 2b by @gmaclennan in #54 * feat(backend): polywasm-backed undici on iOS, re-enable maps plugin by @gmaclennan in #62 * feat(sentry): land Phase 3 — backend loader + RPC tracing by @gmaclennan in #63 * feat(sentry): land Phases 6 + 7a — Android exit reasons & iOS MetricKit app-exit telemetry by @gmaclennan in #72 * feat(sentry): migrate to @sentry/react-native v8; exit telemetry as Application Metrics by @gmaclennan in #73 * Map server integration by @gmaclennan in #86 * feat(config): let the consuming app supply the default project config by @gmaclennan in #95 ### 🐛 Bug Fixes * fix(android): drop setUnlockedDeviceRequired from rootkey wrapper key by @gmaclennan in #57 * fix(backend): cache stopping/error frames for late joiners by @gmaclennan in #58 * fix(ios-tests): wait for STOPPING before signalling node exit by @gmaclennan in #59 * fix(android): drain JNI stdio pumps before returning from node::Start by @gmaclennan in #60 * fix(ios-tests): serialise STOPPING/STOPPED observers in testFullLifecycleStateTransitions by @gmaclennan in #71 * fix(sentry): make exit telemetry lossless and stop cross-process clobbering by @gmaclennan in #84 * fix: start fastify listening by @gmaclennan in #93 * fix(ci): ignore-scripts in ios npm installs by @gmaclennan in #96 * fix(ci): replace --ignore-scripts with npm strict-allow-scripts allowlist by @gmaclennan in #106 * fix(release): stop `npm pack --dry-run` leaking dry-run into backend install by @gmaclennan in #129 ### ⚡ Performance * perf(backend): switch bundler from rollup to rolldown by @gmaclennan in #94 ### ⬆️ Dependencies * update some native deps used in backend by @achou11 in #14 * chore(deps): upgrade to Expo SDK 56 (React Native 0.85) by @gmaclennan in #87 ### 🏗️ Maintenance * Android Testing Infrastructure & Bug Fixes by @gmaclennan in #3 * chore: prebuild example/android; harden instrumented tests by @gmaclennan in #10 * chore: adjust repo setup by @achou11 in #12 * chore: minor fixes based on expo-doctor by @achou11 in #13 * chore: add architecture docs & plans by @gmaclennan in #11 * chore: post-Phase-2 cleanup — comments, plan docs, agents.md by @gmaclennan in #33 * refactor: simplify build-backend.ts; rollup writes directly to native asset trees by @gmaclennan in #34 * chore: fix eslint configuration by @achou11 in #41 * android: audit 16 KB page alignment on every shipped .so by @gmaclennan in #43 * chore: move example app into apps directory by @achou11 in #18 * refactor: per-component lifecycle state with derived ComapeoState by @gmaclennan in #47 * android: fold waitForFile into connect retry loop by @gmaclennan in #52 * chore: add e2e testing app by @achou11 in #49 * ci: drop unreliable Android emulator snapshot caching by @gmaclennan in #64 * use npm list instead of custom traversal to get native module versions by @achou11 in #70 * chore(e2e): add e2e tests on browserstack via Maestro by @achou11 in #56 * chore(ci): add release workflow by @gmaclennan in #90 * chore: fix npm script and release build script by @gmaclennan in #91 * chore(pack): don't try to package build files by @gmaclennan in #92 * chore(release): merge prerelease branch. by @gmaclennan in #110 * ci(e2e): retry BrowserStack builds on infra-class flakes by @gmaclennan in #113 ### Other Changes * ci: derive changelog labels from PR titles + add Dependabot by @gmaclennan in #114 ## New Contributors * @achou11 made their first contribution in #12 * @optic-release-automation[bot] made their first contribution in #112 **Full Changelog**: https://github.com/digidem/comapeo-core-react-native/commits/v1.0.0-pre.2 <!-- <release-meta>{"id":342970724,"version":"v1.0.0-pre.2","npmTag":"pre","opticUrl":"https://optic-zf3votdk5a-ew.a.run.app/api/generate/"}</release-meta> -->
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
Implements Phase 1 of
docs/build-architecture-plan.md: switch iOS to the same rolled-up backend bundle Android uses, plus a smoke test that verifies the app builds, loads, and creates a CoMapeo core manager. iOS simulator-only — device support arrives with the xcframework migration in Phase 2.Up through commit
e37ecc2this branch had pushed the structural pieces (build-script changes, IPC reconciliation, smoke test, CI rewire) but the bundle had never been loaded end-to-end on iOS. This PR's last few commits close that gap.What changed since the last push (commits
fee4183,3dbbee3)-bare-makesuffix in the release-tag path; the 11.10.0 better-sqlite3 release now hosts node-108 iOS slices under the unified tag. Strip the-simulatorsuffix fromprebuilds/ios-arm64-simulator/→prebuilds/ios-arm64/because Bare's addon resolver usesprocess.platform+process.archat runtime, which yieldios-arm64regardless of simulator vs. device.@comapeo/core/src/fastify-plugins/maps.jsis replaced with a no-op stub between `npm ci` and rollup. nodejs-mobile iOS runs V8 with `--jitless` (App Store compliance), so the `WebAssembly` global is absent. Undici's `lazyllhttp()` calls `WebAssembly.compile` at module-init and crashes the process. Maps was the only direct undici importer in the bundle.Test results
Local run on iPhone 16 / iOS 26.2 (Xcode 26.3):
Test plan
Known follow-ups (out of scope)
🤖 Generated with Claude Code