Skip to content

[No QA] Give React-Core-prebuilt a machine-independent podspec source path - #101725

Merged
inimaga merged 8 commits into
Expensify:mainfrom
software-mansion-labs:@mikolajpochec/stable-rncore-artifacts-path
Sep 25, 2026
Merged

inimaga merged 8 commits into
Expensify:mainfrom
software-mansion-labs:@mikolajpochec/stable-rncore-artifacts-path

Conversation

@mikolajpochec

@mikolajpochec mikolajpochec commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Explanation of Change

Before these changes, React-Core-prebuilt's podspec used the downloaded tarball's path under Pods as its source. CocoaPods hashes the podspec into SPEC CHECKSUMS, so the lockfile ended up different for every developer. The podspec now points at a symlink under a path that reads the same on every machine.

The same applied to HERMES_CLI_PATH, which react-native's podspec fills in with require.resolve.
It now reads ${PODS_ROOT}/../../node_modules/..., which Xcode expands before the bundling phase.

Ran pod install on the same checkout from three different directories. Both checksums came out the
same every time:

React-Core-prebuilt: df2215d5387f03898c940262af212a63f190c9fe
hermes-engine:       4749bc1144addfa799bc34648e721fc85989901d

Also built the app in Release: hermesc ran through the expanded path and produced a bytecode bundle.

Fixed Issues

$ #101728
PROPOSAL:

Tests

  1. cd ios && bundle exec pod install
  2. grep -E 'React-Core-prebuilt:|hermes-engine:' Podfile.lock and note both checksums.
  3. Move the checkout elsewhere (mv ~/dev/expensify-app ~/dev/expensify-app-moved), then drop what would be reused: rm -f "Pods/Local Podspecs/React-Core-prebuilt.podspec.json" "Pods/Local Podspecs/hermes-engine.podspec.json" && rm -rf /tmp/expensify-react-native-artifacts
  4. Repeat 1 and 2. Both checksums stay the same, the React-Core-prebuilt source reads
    file:///tmp/expensify-react-native-artifacts/... and HERMES_CLI_PATH reads
    ${PODS_ROOT}/../../node_modules/..., neither with a checkout path in it.
  5. Build the iOS app in Release and confirm it launches.

Offline tests

QA Steps

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@mateuuszzzzz mateuuszzzzz 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.

Code looks solid! Did you test it locally by building app twice from different directories? Does checksum remain stable?

@mikolajpochec

mikolajpochec commented Sep 22, 2026 •

Copy link
Copy Markdown
Member Author

Code looks solid! Did you test it locally by building app twice from different directories? Does checksum remain stable?

@mateuuszzzzz Yes, the checksum seems to be stable among different build paths

@mikolajpochec mikolajpochec changed the title Give React-Core-prebuilt a machine-independent podspec source path [No QA] Give React-Core-prebuilt a machine-independent podspec source path Sep 22, 2026
@mikolajpochec
mikolajpochec marked this pull request as ready for review September 22, 2026 12:22
@mikolajpochec
mikolajpochec requested a review from a team as a code owner September 22, 2026 12:22
@melvin-bot
melvin-bot Bot requested review from mkhutornyi and removed request for a team September 22, 2026 12:22
@melvin-bot

melvin-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

@mkhutornyi Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@mkhutornyi

mkhutornyi commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp Screenshot 2026-09-22 at 4 30 41 PM
Screen.Recording.2026-09-22.at.4.32.16.PM.mov
iOS: mWeb Safari
MacOS: Chrome / Safari

@mkhutornyi

mkhutornyi commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Looks good. React-Core-prebuilt: 16a347292accecca58aefd0fd14f74e734468ad0

Screenshot 2026-09-22 at 4 30 41 PM

Let's also update React-Core-prebuilt in Podfile.lock in both repo

@melvin-bot

melvin-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

We did not find an internal engineer to review this PR, trying to assign a random engineer to #101728 as well as to this PR... Please reach out for help on Slack if no one gets assigned!

@melvin-bot
melvin-bot Bot requested a review from inimaga September 22, 2026 15:35
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Code review

The approach is sound — the tarball basename (reactnative-core-<rnVersion>-<config>.tar.gz) carries nothing machine-specific, so pinning the podspec source to /tmp/<pkg>/<basename> really does stabilize SPEC CHECKSUMS. Comparing by inode via File.identical? is the right call given download_rncore_tarball uses FileUtils.cp (inode preserved), and the new empty-source assert is a real improvement — react-native swallows the hook's exception and returns nil, so without it you'd get a bare CocoaPods failure.

Four things below. Only the first is worth blocking on.

1. A second user on the same Mac hard-fails pod install, with no fallback

SOURCE_LINK_ROOT is a fixed path in world-writable, sticky /tmp. Whoever runs pod install first creates /tmp/expensify-react-native-artifacts/<packageName> with umask perms (0755, owned by them). Any other account on that machine — a second dev account, a self-hosted runner that switches users, or one accidental sudo pod install — then gets Errno::EACCES from File.symlink, react-native swallows it, and the install dies at the assert telling them to go fix ownership by hand.

Same property is a supply-chain surface on a shared machine: a local user can pre-create the root (or own the parent of <packageName>) and swap what the link points at between your rename and CocoaPods reading the file:// source, so an attacker-supplied tarball gets extracted and linked into the app.

Using /tmp rather than Dir.tmpdir is correct for the goal (macOS TMPDIR is per-user, which would reintroduce the churn). The cheap fix is to not make this fatal — everything else in this file degrades gracefully rather than failing:

def self.stable_source_link(tarball)
    ...
rescue => e
    log("Could not write the stable source link (#{e.message}); falling back to the tarball path. " \
        'Podfile.lock will show a machine-specific React-Core-prebuilt checksum.', :error)
    tarball
end

A noisy warning plus a dirty lockfile beats a dead pod install. If you'd rather keep it strict, at least verify File.lstat(SOURCE_LINK_ROOT).uid == Process.uid before using the path, so a foreign-owned root is named as the cause instead of surfacing as a permissions error.

2. mkhutornyi's Podfile.lock ask is still open

The diff only touches the .rb file, so the committed lockfile still carries the old React-Core-prebuilt checksum and everyone's next pod install will produce a dirty tree. Worth knowing: verifyPodfile.sh only validates the PODFILE CHECKSUM, not SPEC CHECKSUMS, so CI won't flag this — it'll just quietly bite each dev.

On "both repo": ios/Podfile.lock in this repo has no React-Core-prebuilt entry at all, because the standalone ios/Podfile never requires patched_ios_artifacts.rb. So unless I'm missing a second entry point, only the hybrid lockfile needs regenerating here.

3. The staging link leaks, and can wedge a later run

staging = "#{link}.#{Process.pid}" is never cleaned up if File.rename raises, and File.symlink raises Errno::EEXIST on an existing path. A crashed run leaves the staging symlink in /tmp forever, and a later run that draws the same pid fails on the File.symlink line instead of on anything meaningful. FileUtils.rm_f(staging) before creating it (and in an ensure) closes both.

4. Nits

  • The comment on line 78 says a directory "would make ln_s create the link inside it" — the code uses File.symlink + File.rename, where the actual failure is Errno::ENOTEMPTY/EISDIR from the rename. The guard is still needed; just the reason is different now.
  • return if target.nil? preserves the old silent behavior, but this only runs when @using_prebuilt is true, and a missing React-Core-prebuilt pod target in that state is already broken. Intentional, or should it raise too?

Worth noting (not a change request)

Two checkouts of the same package on one machine now share a single link, where previously the checkout path made the URL unique. A parallel pod install can repoint the link between your rename and CocoaPods reading it. I traced the blast radius and it's small: sync-prebuilt-rncore.sh + replace-rncore-version.js re-extract at build time from this checkout's Pods/ReactNativeCore-artifacts tarball, so the shipped content self-heals. The only residual is that s.source_files globs the wrong extraction at install time, which matters only if the two artifacts have different header sets. Probably fine — flagging it so it's a known trade-off rather than a surprise.


I reviewed this statically only. This is an iOS CocoaPods path so I couldn't execute pod install, and browser verification wasn't available in this run either — the POSIX claims above (File.symlink → EEXIST, rename over a non-empty dir → ENOTEMPTY, mkdir_p → umask perms) are from the documented semantics, not from a run I performed.


view run

@mikolajpochec

Copy link
Copy Markdown
Member Author

@mkhutornyi I will push commit regarding review in a moment – I’m investigating one possible problem which arised just now

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

@mikolajpochec

Copy link
Copy Markdown
Member Author

@mkhutornyi Just pushed changes regarding Melvin's comments and regenerated standalone's Podfile.lock. I also found that HERMES_CLI_PATH had the same problem, since react-native's podspec fills it in with an absolute path. I changed it to read ${PODS_ROOT}/../../node_modules/....
You may notice that React-Core-prebuilt's checksum is different now. It's correct, there are two Podfile.locks and I decided to include standalone's one, since it's a PR in Expensify/App repo.

@mkhutornyi mkhutornyi 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.

Revert all unrelated changes.
Only hermes-engine and React-Core-prebuilt

Comment thread ios/Podfile.lock Resolved
Comment thread ios/Podfile.lock Resolved
Comment thread ios/Podfile.lock Resolved
Comment thread ios/Podfile.lock Resolved
Comment thread ios/Podfile.lock Resolved
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Code review

The Ruby side is in good shape now — the staging symlink is cleaned up on both paths, the stale comment about ln_s is gone, and assert_ours is the strict variant I suggested, so a foreign-owned /tmp entry gets named instead of surfacing as a bare EACCES. The HERMES_CLI_PATH find is a real one: node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec:92-96 resolves the compiler with require.resolve and drops the absolute result straight into user_target_xcconfig, which CocoaPods hashes.

Three things. The first is the one I'd hold on.

1. The regenerated lockfile carries changes this PR doesn't explain

Only React-Core-prebuilt and hermes-engine should move. The diff also changes React-Core, React-perflogger, React-rendererconsistency, and ReactNativeDependencies checksums, and adds a React-rendererconsistency dependency to React-Core and all 14 of its subspecs.

I can't reproduce that dependency from this branch. node_modules/react-native/React-Core.podspec declares React-cxxreact, React-perflogger, React-jsi, React-jsiexecutor, React-featureflags, React-runtimescheduler, Yoga, then depend_on_js_engine / add_rn_third_party_dependencies / add_rncore_dependency — none of which add React-rendererconsistency. No patch under patches/react-native/ mentions it either, and main's lockfile doesn't have it. The React-perflogger checksum change points the same way: its source_files come from podspec_sources, which branches on ReactNativeCoreUtils.build_rncore_from_source(), so that checksum moving suggests the install ran in a different prebuilt/source state than the one that produced main's lockfile.

Most likely the regeneration ran against a node_modules that had drifted from the branch. Worth redoing it on a clean install and confirming only the two intended checksums move — verifyPodfile.sh:30 only validates PODFILE CHECKSUM, never SPEC CHECKSUMS, so CI will happily merge a lockfile built from local drift. Given the PR exists to make this file reproducible, it should land byte-for-byte reproducible.

2. File.exist? turns a working install into a hard failure

pods_root_relative_path returns nil unless the path exists, and rewrite_hermes_cli_path raises on nil. Two problems:

  • Existence is irrelevant to rewriting a string. If hermes-compiler ever ships the binary lazily, moves hermesc/osx-bin/hermesc, or the file is just missing at pod-install time, pod install now dies where it previously succeeded with an absolute path.
  • relative_path_from between two absolute POSIX paths always succeeds, so the "cannot place relative to the Pods root" message is the one branch that effectively can't fire — whoever hits this raise gets told the wrong cause.

Dropping the File.exist? check makes the guard match what it actually protects.

3. A skipped rewrite degrades to silent churn

store_podspec only rewrites when podspec.is_a?(Pod::Specification). Sandbox#store_podspec also accepts a String, and if hermes-engine ever arrives that way the rewrite is skipped silently — HERMES_CLI_PATH stays absolute, and force_hermes_podspec_reevaluation then drops the stored podspec on every subsequent pod install, forever, with a machine-specific checksum and no warning. Everything else in this file fails loudly; this one path fails quiet. A log(..., :error) on the else branch is enough.

Nits

  • HERMES_OVERRIDE_HERMESC_PATH is a deliberate absolute-path escape hatch. The rewrite converts it into a ../.. chain that is still machine-specific but no longer looks it, so the reproducibility check passes while the checksum stays unstable. Requiring the relative path not to escape the repo root would keep the invariant honest.
  • A second account on the same Mac still can't pod install at all until someone clears SOURCE_LINK_ROOT. Fine as a deliberate trade — just worth knowing it bites a persistent self-hosted runner that switches users between jobs, not only the shared-dev-machine case.
  • mkhutornyi's "both repo" ask: agreed that the standalone lockfile belongs here, but the Mobile-Expensify one goes stale the moment this merges. Worth a companion PR so the hybrid side doesn't produce a dirty tree.

I reviewed this statically. This is an iOS CocoaPods path, so I couldn't run pod install to confirm the checksums — the lockfile finding comes from reading the podspecs and patches on this branch, not from a run I performed.

@mikolajpochec

Copy link
Copy Markdown
Member Author

@mkhutornyi Reverted those. We'll also need to regenerate Mobile-Expensify's Podfile.lock as a separate PR after we merge this.

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Code review

All three findings from the last round are addressed. The lockfile is down to exactly the two intended checksums, pods_root_relative_path dropped the File.exist? guard and now raises a message that matches the condition it checks, and store_podspec logs instead of skipping silently.

One regression in the newest commit.

HERMES_OVERRIDE_HERMESC_PATH now aborts pod install, and gains nothing by doing it

The new guard raises on any compiler path outside NEW_DOT_ROOT. In hermes-engine.podspec the from-source branch reads:

hermesc_path = "${PODS_ROOT}/hermes-engine/build_host_hermesc"
if ENV.has_key?('HERMES_OVERRIDE_HERMESC_PATH') && File.exist?(ENV['HERMES_OVERRIDE_HERMESC_PATH'])
  hermesc_path = ENV['HERMES_OVERRIDE_HERMESC_PATH']
end
spec.user_target_xcconfig = { 'HERMES_CLI_PATH' => "#{hermesc_path}/bin/hermesc" }

Point that override at /opt/hermes and pod install now dies. It previously worked. It needs BUILD_RN_FROM_SOURCE=1 or a patch-hash miss to reach that branch — and a patch-hash miss silently forces a source build, so a developer who keeps the override exported hits this without changing anything.

The part that makes it a bad trade: the same hermesc_path is interpolated into the podspec's prepare_command, script_phases, input_files, and output_files a few lines down. Those are hashed into SPEC CHECKSUMS too, and this PR doesn't touch them. So with the override set, hermes-engine's checksum is machine-specific no matter what — the raise blocks the install without buying the reproducibility it's defending. Warn and leave the path alone, the way prefetch and resolve already degrade rather than abort.

Worth noting the asymmetry, too: React-Core-prebuilt's source is deliberately moved outside the checkout into /tmp for stability, while hermes' path is now rejected for being outside it.

What I checked and found clean

  • Nothing reads the raw HERMES_CLI_PATH at pod-install time. The only consumer is react-native-xcode.sh:81-87,179, which runs as an Xcode build phase, so ${PODS_ROOT} is already expanded. No repo script, CI job, or .sh outside node_modules touches it.
  • The prebuilt branch has no other absolute path. prepare_command and the hermesc script phases only exist in the from-source branch, so for App's actual config user_target_xcconfig was the only machine-specific field — which is consistent with your three-directory checksum measurement.
  • BUILD_RN_FROM_SOURCE=1 alone doesn't regress. That branch defaults to ${PODS_ROOT}/hermes-engine/build_host_hermesc, which fails the start_with?('/') test, so the rewrite is skipped entirely.
  • No symlink mismatch between the three paths. __dir__ canonicalizes, Dir.pwd (behind project_pods_root) returns the physical path, and require.resolve returns a realpath — so the start_with? comparison and relative_path_from are all operating on canonical paths.

Still open

  • HybridApp is unverified. Mobile-Expensify isn't checked out here, so I couldn't confirm the Pods root sits at App/Mobile-Expensify/iOS/Pods and that the relative path resolves from there. The github-actions bot already flagged this PR as native-code-changing — an AdHoc hybrid build is the right way to close this, and it's the only remaining unknown I'd gate on.
  • Carried over: require.resolve returning a realpath means a symlinked node_modules/hermes-compiler (bun install, npm link, a hoisted workspace) resolves outside the checkout and trips the new raise. Low risk since package-lock.json makes npm the sanctioned path and it installs a real directory, but it's the same hard-fail shape as above.
  • Carried over: two checkouts of the same package now share one /tmp link, so a parallel pod install can repoint it mid-install. Blast radius is still small — sync-prebuilt-rncore.sh re-extracts from this checkout's own tarball at build time — just a known trade-off rather than a surprise.

I reviewed this statically. This is an iOS CocoaPods path, so I couldn't run pod install to confirm the checksums, and the regression above comes from reading hermes-engine.podspec on this branch, not from a run I performed. I also skipped browser testing deliberately: scripts/artifacts-utils/ios/*.rb and ios/Podfile.lock are only read by CocoaPods at iOS pod-install time and never enter the web bundle, so a web smoke test would produce no evidence either way.

@inimaga
inimaga merged commit eb28c92 into Expensify:main Sep 25, 2026
26 of 28 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 inimaga has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/inimaga in version: 9.4.94-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.94-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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.

6 participants