Skip to content

ci: always run pod install in the contract job, even on a Pods cache hit (#98) - #99

Merged
thiagobrez merged 2 commits into
mainfrom
t3code/fix-main-pipeline-pods
Sep 6, 2026
Merged

thiagobrez merged 2 commits into
mainfrom
t3code/fix-main-pipeline-pods

Conversation

@thiagobrez

@thiagobrez thiagobrez commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Fixes #98.

Root cause

#97 added a Pods cache to the Exact package candidate contract job with two structural defects:

1. pod install was skipped on an exact cache hit. React Native codegen runs inside pod install and writes its generated sources to example/ios/build/generated/ios/ — outside the cached example/ios/Pods path — so a cache hit restores a Pods project whose ReactCodegen target references sources that were never generated. All three iOS contract jobs (ios27.native, ios27.fallback, ios26.auto-fallback) then fail in ~1 minute with Build input file cannot be found: .../ReactCodegen/.... The first run after #97 passed because the cache was empty; every run since (push f3b11c7, run 34016165910, and the nightly 34020531106) hit the key on the unchanged Podfile.lock and failed deterministically.

2. The cache key collides with ci.yml's cocoapods cache. Both workflows cached example/ios/Pods under macOS-cocoapods-<Podfile.lock hash>, but the contract job installs the packed candidate tarball and pod-installs for Release Detox builds, while ci.yml's build-ios builds Debug with RCT_USE_PREBUILT_RNCORE=1. The 580b7f2 push run saved the Release-flavored tree on refs/heads/main; this PR's first build-ios run restored it, pod install saw an in-sync sandbox (only Reorderable was reinstalled), and the Debug app linked against Release prebuilt React core binaries — failing on debug-only symbols (facebook::react::Props::getDebugProps, DebugStringConvertible vtable, …).

Fix

  • Run bundle install + bundle exec pod install unconditionally in the contract job, keeping the cache purely as a speedup for the Pods checkout — mirroring the convention ci.yml already documents ("Always run the Gemfile-pinned pod install, even on a Pods cache hit") and restoring the pre-ci: make the exact package candidate the sole push-to-main gate (#74) #97 install behavior.
  • Prefix the contract job's cache key (macOS-contract-cocoapods-…) so the two configuration flavors can never alias.
  • The poisoned macOS-cocoapods-… entry on refs/heads/main (cache id 7372072759) has been deleted from the Actions cache.

Note on the fourth failed job

android.fallback on run 34016165910 failed differently: the scoped-drop case recorded a correct contract outcome, then Detox's internal adb reverse --remove tcp:37184 teardown threw ("listener not found") and the case was classified contract (so no retained retry). The same job passed on the nightly run — a transient Detox teardown flake, tracked separately in #100.

🤖 Generated with Claude Code

…hit (#98)

React Native codegen runs inside pod install and writes its generated
sources to example/ios/build/generated, outside the cached Pods path, so
skipping pod install on an exact cache hit leaves the ReactCodegen pod
target pointing at files that do not exist and every iOS contract build
fails within a minute. Keep the cache as a warm-checkout speedup only,
mirroring the convention already documented in ci.yml.

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

Copy link
Copy Markdown
Owner Author

No changeset needed

The contract job installs the packed candidate tarball and pod-installs
for Release Detox builds, but saved that Pods tree under the same
macOS-cocoapods-<Podfile.lock> key ci.yml uses for its Debug build. When
build-ios restored the contract job's entry from main, pod install saw
an in-sync sandbox (only Reorderable was reinstalled) and the Debug app
linked against Release prebuilt React core binaries, failing on
debug-only symbols such as Props::getDebugProps. Prefix the contract
key so the two flavors can never alias; the poisoned main entry has
been deleted from the Actions cache.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thiagobrez
thiagobrez merged commit d187e98 into main Sep 6, 2026
9 checks passed
@thiagobrez
thiagobrez deleted the t3code/fix-main-pipeline-pods branch September 6, 2026 10:02
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.

Exact package candidate iOS contract jobs fail on every Pods cache hit: pod install skip leaves ReactCodegen sources ungenerated

1 participant