Skip to content

chore(scripts): update e2e-maestro.sh#368

Merged
patrickkabwe merged 13 commits intomainfrom
chore/e2e-maestro-script
Oct 11, 2025
Merged

chore(scripts): update e2e-maestro.sh#368
patrickkabwe merged 13 commits intomainfrom
chore/e2e-maestro-script

Conversation

@patrickkabwe
Copy link
Owner

@patrickkabwe patrickkabwe commented Sep 28, 2025

Update Maestro E2E script.

Summary by CodeRabbit

  • New Features

    • Introduced E2E video recording flow with artifacts output and automatic retry variants.
    • Added support for specifying Maestro version in CI setup.
    • Template generation now includes Bun-specific configuration when using Bun.
  • Tests

    • Enhanced iOS E2E performance with optional build caching.
    • Improved messaging and stability in E2E flows.
    • Expanded CI triggers to include script changes.
  • Chores

    • Updated template dependencies (React, React Native, types, and related tooling).
    • Added Bun “hoisted” linker configuration.
    • Relaxed commit message body line-length rule.

@coderabbitai
Copy link

coderabbitai bot commented Sep 28, 2025

Walkthrough

Updates e2e tooling to record Maestro flows instead of running tests, adds optional iOS ccache usage in scripts and CI, adjusts Maestro setup PATH handling, expands CI triggers to include scripts, bumps template dependencies, adds Bun hoisted linker configs, and includes bunfig.toml in generated packages when using Bun.

Changes

Cohort / File(s) Summary
E2E script: recording + ccache
scripts/e2e-maestro.sh
Switches from maestro test to maestro record with artifact outputs; introduces optional iOS ccache setup; refines iOS build flags; adjusts messages from tests to recording; ensures return-to-root behavior; creates e2e-artifacts and retry variants.
CI workflow: iOS ccache and triggers
.github/workflows/ci-packages.yml
Adds scripts/** to triggers; inserts iOS ccache install/config/cache/usage and stats steps; runs E2E with USE_CCACHE=1 and CCACHE_DIR; preserves existing steps.
Maestro setup action
.github/actions/setup-maestro/action.yml
Sets MAESTRO_VERSION; explicitly exports PATH with $HOME/.maestro/bin and appends to GITHUB_PATH; retains verification.
Template deps bump
assets/template/package.json
Updates devDependencies: @types/react, nitrogen, react, react-native, react-native-nitro-modules.
Bun config (repo + template)
bunfig.toml, assets/template/bunfig.toml
Adds [install] linker = "hoisted" configuration.
Generator: Bun template file
src/generate-nitro-package.ts
Conditionally copies bunfig.toml into new packages when package manager is Bun.
Commit lint rule
commitlint.config.cjs
Adds body-max-line-length: [0, 'always'] to exported rules.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer/CI
  participant Script as e2e-maestro.sh
  participant iOS as Xcode Build
  participant Android as Gradle Build
  participant CCache as ccache (optional)
  participant Maestro as Maestro CLI
  participant Artifacts as e2e-artifacts/

  Dev->>Script: Invoke E2E workflow
  Script->>Script: Determine project root, flow file, platform
  alt iOS build
    opt USE_CCACHE=1
      Script->>CCache: Configure env, show status
    end
    Script->>iOS: Build with refined arch settings
    iOS-->>Script: Build output
  else Android build
    Script->>Android: Build app
    Android-->>Script: Build output
  end
  Script->>Artifacts: Ensure directories (incl. -retry)
  Script->>Maestro: record flow -> output to artifacts
  Maestro-->>Script: Recording results
  Script-->>Dev: Exit with status
Loading
sequenceDiagram
  autonumber
  actor GH as GitHub Actions
  participant WF as ci-packages.yml (iOS E2E)
  participant Homebrew as brew
  participant Cache as actions/cache
  participant CCache as ccache
  participant Tests as E2E run (USE_CCACHE=1)

  GH->>WF: On push/PR (including scripts/**)
  WF->>Homebrew: Install ccache
  WF->>CCache: Zero/Configure (size, compression)
  WF->>Cache: Restore ccache dir (key, restore-keys)
  WF->>Tests: Run E2E with USE_CCACHE=1 and CCACHE_DIR
  Tests-->>WF: Completed
  WF->>CCache: Print statistics
  WF->>Cache: Save updated cache
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A rabbit taps the record key—hop!
Caches warmed, the builds don’t stop.
Maestro’s path is set just right,
Flows get saved by day and night.
Bun hops in with hoisted cheer,
Templates fresh—new burrows near. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title concisely and accurately identifies the primary change—updating the e2e-maestro.sh script—and follows conventional commit style without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/e2e-maestro-script

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f55f409 and f2852ef.

📒 Files selected for processing (1)
  • src/generate-nitro-package.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/generate-nitro-package.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: iOS E2E Test (view, Release, bun)
  • GitHub Check: Test Android Build - yarn - module (Debug)
  • GitHub Check: Test iOS Build - bun - view (Release)
  • GitHub Check: Test iOS Build - bun - view (Debug)
  • GitHub Check: Test iOS Build - bun - module (Debug)
  • GitHub Check: Android E2E Test (module, Release, bun)
  • GitHub Check: Android E2E Test (view, Release, bun)
  • GitHub Check: iOS E2E Test (module, Release, bun)
  • GitHub Check: Test Android Build - yarn - view (Release)
  • GitHub Check: Test Android Build - bun - module (Debug)
  • GitHub Check: Test Android Build - yarn - view (Debug)
  • GitHub Check: Test Android Build - bun - module (Release)
  • GitHub Check: Test Android Build - bun - view (Release)
  • GitHub Check: Test Android Build - yarn - module (Release)
  • GitHub Check: Test Android Build - bun - view (Debug)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df2a987 and 1140ac8.

📒 Files selected for processing (1)
  • scripts/e2e-maestro.sh (2 hunks)

Comment on lines 135 to 147
recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local"
echo "🎯 Recording test video: $recordCmd"
echo "📱 APP_ID: $APP_ID"


if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then
echo "Test ${test_file} failed. Retrying in 30 seconds..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE.mp4"; then
echo "Recording ${test_file} failed. Retrying in 30 seconds..."
sleep 30
if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then
echo "Test ${test_file} failed again. Retrying for the last time in 120 seconds..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-1.mp4"; then
echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..."
sleep 120
if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then
echo "Test ${test_file} failed again. Exiting..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-2.mp4"; then
echo "Recording ${test_file} failed again. Exiting..."
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Include Maestro’s --output flag so the recording runs

maestro record expects the target file to be provided via --output. Passing a bare path (e.g. e2e-artifacts/module.mp4) is interpreted as an unexpected positional argument, so the command exits immediately and every attempt falls into the retry branches without ever producing a video. Add the flag before appending the path so the CLI accepts the argument and writes the MP4.

-recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local"
+recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local --output"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local"
echo "🎯 Recording test video: $recordCmd"
echo "📱 APP_ID: $APP_ID"
if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then
echo "Test ${test_file} failed. Retrying in 30 seconds..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE.mp4"; then
echo "Recording ${test_file} failed. Retrying in 30 seconds..."
sleep 30
if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then
echo "Test ${test_file} failed again. Retrying for the last time in 120 seconds..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-1.mp4"; then
echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..."
sleep 120
if ! eval "$testCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then
echo "Test ${test_file} failed again. Exiting..."
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-2.mp4"; then
echo "Recording ${test_file} failed again. Exiting..."
recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local --output"
echo "🎯 Recording test video: $recordCmd"
echo "📱 APP_ID: $APP_ID"
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE.mp4"; then
echo "Recording ${test_file} failed. Retrying in 30 seconds..."
sleep 30
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-1.mp4"; then
echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..."
sleep 120
if ! eval "$recordCmd e2e-artifacts/$PACKAGE_TYPE-retry-2.mp4"; then
echo "Recording ${test_file} failed again. Exiting..."
🤖 Prompt for AI Agents
In scripts/e2e-maestro.sh around lines 135 to 147, the maestro record invocation
supplies the target MP4 path as a bare positional argument (causing the CLI to
treat it as unexpected), so update the three eval invocations to pass the path
with the --output flag (e.g. eval "$recordCmd --output
e2e-artifacts/$PACKAGE_TYPE.mp4" and likewise for the retry filenames) so
maestro accepts the destination and actually writes the recordings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
scripts/e2e-maestro.sh (1)

48-49: Simulator UUID grep misses lowercase hex; ID may be empty.

simctl emits lowercase UUIDs; pattern [0-9A-F-]{36} rejects them, yielding an empty $iphone16Id and failing xcodebuild/install.

-  iphone16Id=$(xcrun simctl list devices | grep "iPhone 16 (" | grep -E '\(Booted\)|\(Shutdown\)' | head -1 | grep -E -o '\([0-9A-F-]{36}\)' | tr -d '()')
+  iphone16Id=$(xcrun simctl list devices | grep "iPhone 16 (" | grep -E '\(Booted\)|\(Shutdown\)' | head -1 | grep -E -o '\([0-9A-Fa-f-]{36}\)' | tr -d '()')

Also guard against empty IDs:

[[ -z "$iphone16Id" ]] && { echo "❌ No matching simulator found"; exit 1; }
♻️ Duplicate comments (1)
scripts/e2e-maestro.sh (1)

154-156: Recording never writes an MP4 — missing --output argument.

maestro record requires --output <file.mp4>. Without it, no video is produced and retries loop. Add --output and pass retry file names.

 # Create output directory for videos
 mkdir -p e2e-artifacts
 
-recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID"
-echo "🎯 Recording test video: $recordCmd"
+output_base="e2e-artifacts/$PACKAGE_TYPE"
+recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --output"
+echo "🎯 Recording test video: $recordCmd ${output_base}.mp4"
 echo "📱 APP_ID: $APP_ID"
 
-if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then
+if ! eval "$recordCmd \"${output_base}.mp4\" --debug-output \"${output_base}\""; then
     echo "Recording ${test_file} failed. Retrying in 30 seconds..."
     sleep 30
-    if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then
+    if ! eval "$recordCmd \"${output_base}-retry-1.mp4\" --debug-output \"${output_base}-retry-1\""; then
         echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..."
         sleep 120
-        if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then
+        if ! eval "$recordCmd \"${output_base}-retry-2.mp4\" --debug-output \"${output_base}-retry-2\""; then
             echo "Recording ${test_file} failed again. Exiting..."
             exit 1
         fi
     fi
 fi
#!/bin/bash
# Verify Maestro supports --output and that an MP4 is actually produced
maestro record --help | rg -n '\b--output\b' || { echo "--output not found in help"; exit 1; }
test -f "e2e-artifacts/$PACKAGE_TYPE.mp4" && echo "✅ MP4 present" || { echo "❌ MP4 missing"; exit 1; }

Also applies to: 159-166

🧹 Nitpick comments (4)
scripts/e2e-maestro.sh (4)

112-113: Harden directory changes with || exit and quoting.

Prevents silent failures per ShellCheck SC2164.

-  cd "$SCRIPT_DIR"
+  cd "$SCRIPT_DIR" || exit 1
...
-  cd "$SCRIPT_DIR"
+  cd "$SCRIPT_DIR" || exit 1

Also applies to: 135-135


53-63: ccache block likely not effective without Xcode integration; at least surface stats.

Xcode won’t use ccache just by exporting env vars. Keep the optional block, but print stats to validate usage.

     echo "📦 ccache directory: $CCACHE_DIR"
-    ccache --max-size=2G 2>/dev/null || true
+    ccache --max-size=2G 2>/dev/null || true
+    ccache -s 2>/dev/null || true

Follow‑up: if you want real hits, consider compiler wrappers or Xcode build setting integration.


106-110: Check that a .app was built before installing.

Avoids a confusing install error when the build fails or paths differ.

   APP_PATH=$(find build/Build/Products/Release-iphonesimulator -name "*.app" | head -1)
   echo "📲 Installing app from: $APP_PATH"
-  xcrun simctl install $iphone16Id "$APP_PATH"
+  if [[ -z "$APP_PATH" ]]; then
+    echo "❌ Built app not found under build/Build/Products/Release-iphonesimulator"
+    exit 1
+  fi
+  xcrun simctl install "$iphone16Id" "$APP_PATH"

45-46: Quote and guard directory changes to example apps.

Prevents path breakage when EXAMPLE_DIR contains spaces or is unset.

-  cd $EXAMPLE_DIR/ios
+  cd "$EXAMPLE_DIR/ios" || exit 1
...
-  cd $EXAMPLE_DIR/android
+  cd "$EXAMPLE_DIR/android" || exit 1

Also applies to: 114-116

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ff06e4e and 98d771a.

📒 Files selected for processing (2)
  • .github/workflows/ci-packages.yml (3 hunks)
  • scripts/e2e-maestro.sh (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-packages.yml
🧰 Additional context used
🪛 Shellcheck (0.11.0)
scripts/e2e-maestro.sh

[warning] 112-112: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 135-135: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Test iOS Build - yarn - view (Debug)
  • GitHub Check: Test iOS Build - bun - view (Debug)
  • GitHub Check: Test iOS Build - bun - module (Release)
  • GitHub Check: Test Android Build - yarn - view (Debug)
  • GitHub Check: Test iOS Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - yarn - view (Release)
  • GitHub Check: Test Android Build - yarn - module (Release)
  • GitHub Check: Test Android Build - bun - view (Debug)
  • GitHub Check: Android E2E Test (module, Release, bun)
  • GitHub Check: Test Android Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - bun - view (Release)
  • GitHub Check: Android E2E Test (view, Release, bun)
  • GitHub Check: Test Android Build - bun - module (Debug)
  • GitHub Check: Test Android Build - bun - module (Release)
  • GitHub Check: iOS E2E Test (module, Release, bun)

Comment on lines +68 to 76
-configuration Release \
-destination id=$iphone16Id \
-parallelizeTargets \
-derivedDataPath build \
-jobs $(sysctl -n hw.ncpu) \
ONLY_ACTIVE_ARCH=YES \
ARCHS=arm64 \
VALID_ARCHS=arm64 \
EXCLUDED_ARCHS=x86_64 \
CODE_SIGNING_ALLOWED=NO"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

iOS build arch overrides are non‑portable; VALID_ARCHS is deprecated.

Hard‑forcing ARCHS=arm64 and EXCLUDED_ARCHS=x86_64 breaks Intel runners; VALID_ARCHS no longer respected in modern Xcode. Prefer letting the simulator SDK resolve archs or gate by host CPU.

-    -configuration Release \
+    -configuration Release -sdk iphonesimulator \
     -destination id=$iphone16Id \
     -derivedDataPath build \
     -jobs $(sysctl -n hw.ncpu) \
-    ONLY_ACTIVE_ARCH=YES \
-    ARCHS=arm64 \
-    VALID_ARCHS=arm64 \
-    EXCLUDED_ARCHS=x86_64 \
     CODE_SIGNING_ALLOWED=NO"

Optionally gate EXCLUDED_ARCHS by host:

if [[ "$(uname -m)" == "x86_64" ]]; then EXCLUDED=""; else EXCLUDED="EXCLUDED_ARCHS=x86_64"; fi

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d2e5fd and 13a6965.

📒 Files selected for processing (7)
  • .github/workflows/ci-packages.yml (5 hunks)
  • .github/workflows/deploy.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • assets/template/.github/workflows/android-build.yml (1 hunks)
  • assets/template/.github/workflows/ios-build.yml (1 hunks)
  • assets/template/.github/workflows/release.yml (1 hunks)
  • test-local.sh (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • assets/template/.github/workflows/android-build.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-packages.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Test Android Build - yarn - module (Release)
  • GitHub Check: Test iOS Build - bun - view (Release)
  • GitHub Check: Test iOS Build - bun - module (Debug)
  • GitHub Check: Test iOS Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - bun - view (Release)
  • GitHub Check: Test Android Build - yarn - view (Debug)
  • GitHub Check: Test Android Build - yarn - view (Release)
  • GitHub Check: Test Android Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - bun - view (Debug)
  • GitHub Check: Test Android Build - bun - module (Debug)
  • GitHub Check: Test Android Build - bun - module (Release)
  • GitHub Check: Android E2E Test (module, Release, bun)
  • GitHub Check: Android E2E Test (view, Release, bun)
  • GitHub Check: iOS E2E Test (view, Release, bun)
  • GitHub Check: iOS E2E Test (module, Release, bun)

Comment on lines 35 to 37
- name: Install npm dependencies (bun)
run: bun install
run: bun install --linker=hoisted

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Keep --frozen-lockfile for reproducible releases

Dropping --frozen-lockfile means this release job can silently upgrade dependencies if bun.lock is stale, which undermines reproducibility and can push unvetted versions to prod. Please restore the flag while retaining the hoisted linker.

-            - name: Install npm dependencies (bun)
-              run: bun install --linker=hoisted
+            - name: Install npm dependencies (bun)
+              run: bun install --linker=hoisted --frozen-lockfile
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install npm dependencies (bun)
run: bun install
run: bun install --linker=hoisted
- name: Install npm dependencies (bun)
run: bun install --linker=hoisted --frozen-lockfile
🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 35 to 37, the bun install
invocation removed the --frozen-lockfile flag which allows silent dependency
upgrades; restore reproducible installs by adding --frozen-lockfile back to the
command while keeping --linker=hoisted (i.e., run bun install --linker=hoisted
--frozen-lockfile) so the job fails if bun.lock is out of sync.

Comment on lines 40 to 42
- name: Install npm dependencies (bun)
run: bun install
run: bun install --linker=hoisted

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Restore lockfile enforcement in the template

Templates should keep --frozen-lockfile so downstream projects inherit reproducible release builds. Without it, installs may mutate bun.lock during CI.

-      - name: Install npm dependencies (bun)
-        run: bun install --linker=hoisted
+      - name: Install npm dependencies (bun)
+        run: bun install --linker=hoisted --frozen-lockfile
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install npm dependencies (bun)
run: bun install
run: bun install --linker=hoisted
- name: Install npm dependencies (bun)
run: bun install --linker=hoisted --frozen-lockfile
🤖 Prompt for AI Agents
In assets/template/.github/workflows/release.yml around lines 40 to 42, the bun
install step omits lockfile enforcement which allows bun.lock to be mutated
during CI; update the run command to include the frozen lockfile flag (e.g., add
--frozen-lockfile alongside --linker=hoisted) so installs fail if the lockfile
is out of sync and downstream projects inherit reproducible release builds.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
scripts/e2e-maestro.sh (2)

68-75: Remove the hard-coded arm64 simulator arch overrides.

Forcing ONLY_ACTIVE_ARCH=YES, ARCHS=arm64, VALID_ARCHS=arm64, and EXCLUDED_ARCHS=x86_64 breaks Recorder runs on Intel hosts where the simulator toolchain needs x86_64. Modern Xcode ignores VALID_ARCHS, so this block just prevents the build from ever succeeding off Apple Silicon. Please drop these overrides (or gate them by host CPU).

-    -configuration Release \
-    -destination id=$iphone16Id \
-    -derivedDataPath build \
-    -jobs $(sysctl -n hw.ncpu) \
-    ONLY_ACTIVE_ARCH=YES \
-    ARCHS=arm64 \
-    VALID_ARCHS=arm64 \
-    EXCLUDED_ARCHS=x86_64 \
+    -configuration Release \
+    -destination id=$iphone16Id \
+    -derivedDataPath build \
+    -jobs $(sysctl -n hw.ncpu) \

154-166: Pass the MP4 path with --output on every Maestro recording.

maestro record needs the target file behind --output; otherwise it writes to the default maestro.mp4 (or exits on older CLI builds), so nothing lands in e2e-artifacts/$PACKAGE_TYPE*.mp4. Add --output <path> to the initial and retry invocations.

-recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local"
+recordCmd="maestro record \"$test_file\" -e APP_ID=$APP_ID --local"
+recordOutput="e2e-artifacts/$PACKAGE_TYPE.mp4"
+recordDebugBase="e2e-artifacts/$PACKAGE_TYPE-debug"
 echo "🎯 Recording test video: $recordCmd"
 ...
-if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE"; then
+if ! eval "$recordCmd --output \"$recordOutput\" --debug-output \"$recordDebugBase\""; then
     echo "Recording ${test_file} failed. Retrying in 30 seconds..."
     sleep 30
-    if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-1"; then
+    if ! eval "$recordCmd --output \"${recordOutput/.mp4/-retry-1.mp4}\" --debug-output \"${recordDebugBase}-retry-1\""; then
         echo "Recording ${test_file} failed again. Retrying for the last time in 120 seconds..."
         sleep 120
-        if ! eval "$recordCmd --debug-output e2e-artifacts/$PACKAGE_TYPE-retry-2"; then
+        if ! eval "$recordCmd --output \"${recordOutput/.mp4/-retry-2.mp4}\" --debug-output \"${recordDebugBase}-retry-2\""; then
             echo "Recording ${test_file} failed again. Exiting..."
             exit 1
         fi
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6eb26 and d654c74.

📒 Files selected for processing (1)
  • scripts/e2e-maestro.sh (4 hunks)
🧰 Additional context used
🪛 Shellcheck (0.11.0)
scripts/e2e-maestro.sh

[warning] 112-112: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 135-135: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Test Android Build - yarn - view (Release)
  • GitHub Check: Test Android Build - yarn - view (Debug)
  • GitHub Check: Test Android Build - bun - view (Release)
  • GitHub Check: Test Android Build - yarn - module (Release)
  • GitHub Check: Test Android Build - bun - view (Debug)
  • GitHub Check: Test Android Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - bun - module (Release)
  • GitHub Check: Test Android Build - bun - module (Debug)
  • GitHub Check: Android E2E Test (view, Release, bun)
  • GitHub Check: Android E2E Test (module, Release, bun)
  • GitHub Check: Test iOS Build - yarn - module (Debug)
  • GitHub Check: Test iOS Build - bun - module (Debug)
  • GitHub Check: Test iOS Build - bun - module (Release)
  • GitHub Check: iOS E2E Test (view, Release, bun)


cd ../../..
# Return to project root
cd "$SCRIPT_DIR"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Fail fast if returning to the project root fails.

Both cd "$SCRIPT_DIR" calls should guard against failure; otherwise the script keeps running from the wrong directory and the rest of the flow breaks. Add || exit 1.

-  cd "$SCRIPT_DIR"
+  cd "$SCRIPT_DIR" || exit 1
-  cd "$SCRIPT_DIR"
+  cd "$SCRIPT_DIR" || exit 1

Also applies to: 135-135

🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 112-112: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🤖 Prompt for AI Agents
In scripts/e2e-maestro.sh around lines 112 and 135, the two cd "$SCRIPT_DIR"
invocations do not check for failure; if changing directories fails the script
will continue running from the wrong location. Update both cd commands to guard
against errors by exiting on failure (i.e., append a conditional exit such as ||
exit 1) so the script fails fast if returning to the project root fails.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d654c74 and f55f409.

📒 Files selected for processing (4)
  • .github/workflows/ci-packages.yml (3 hunks)
  • assets/template/bunfig.toml (1 hunks)
  • bunfig.toml (1 hunks)
  • src/generate-nitro-package.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • bunfig.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-packages.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Test Android Build - yarn - view (Release)
  • GitHub Check: Test iOS Build - yarn - view (Debug)
  • GitHub Check: Test iOS Build - bun - view (Release)
  • GitHub Check: Test iOS Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - yarn - module (Debug)
  • GitHub Check: Test Android Build - yarn - module (Release)
  • GitHub Check: Test Android Build - bun - view (Debug)
  • GitHub Check: Test Android Build - bun - module (Debug)
  • GitHub Check: Test Android Build - yarn - view (Debug)
  • GitHub Check: Test Android Build - bun - module (Release)
  • GitHub Check: Test iOS Build - bun - module (Debug)
  • GitHub Check: Test Android Build - bun - view (Release)
  • GitHub Check: iOS E2E Test (module, Release, bun)
  • GitHub Check: Android E2E Test (module, Release, bun)
  • GitHub Check: Android E2E Test (view, Release, bun)
🔇 Additional comments (1)
assets/template/bunfig.toml (1)

1-2: PR title/description doesn't match the actual changes.

The PR title mentions "update e2e-maestro.sh" and the description says "Update Maestro E2E script", but the files under review add Bun configuration via bunfig.toml. There's no e2e-maestro.sh file in this review.

The configuration itself is valid for Bun's hoisted linker mode.

@patrickkabwe patrickkabwe merged commit caaca86 into main Oct 11, 2025
50 of 51 checks passed
@patrickkabwe patrickkabwe deleted the chore/e2e-maestro-script branch October 11, 2025 18:25
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