Skip to content

fix(ci): unbreak the kilo-app release preflight - #5454

Merged
iscekic merged 1 commit into
mainfrom
fix/eas-preflight-appsflyer-config-plugins
Aug 24, 2026
Merged

fix(ci): unbreak the kilo-app release preflight#5454
iscekic merged 1 commit into
mainfrom
fix/eas-preflight-appsflyer-config-plugins

Conversation

@iscekic

@iscekic iscekic commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes the preflight job in kilo-app Release run 32768868183.

Failure 1: Verify EAS production environment

The log showed only Error: env:list command failed. The real reason went to eas-cli's stdout, which the step captured into $ENV_OUTPUT.

The reason: eas-cli spawns node_modules/.pnpm/expo@.../expo/bin/cli config --json directly, so it bypasses the pnpm bin shim that exports NODE_PATH. react-native-appsflyer/expo/withAppsFlyerIos.js requires @expo/config-plugins and deep paths under it, but the package declares no dependencies at all. Without the shim the require fails, so every eas-cli command that reads the app config fails.

The fix declares the dep through packageExtensions, next to the identical entries for @sentry/react-native and expo-share-intent. It resolves to @expo/config-plugins@57.0.6 — the same instance the SDK 57 graph already uses, so no duplicate copy.

Failure 2: Assert production config contract

This step would have failed next, for a different reason. EAS_BUILD_PROFILE=production applied to the eas-cli process itself, and eas-cli evaluates app.config.ts to resolve the project before it injects any environment. Under the production profile that evaluation throws on the missing env, and it also throws on the missing SENTRY_AUTH_TOKEN, which is a SECRET variable only EAS builders can read.

The variable now sits inside the quoted command, so it applies to pnpm assert:config and not to eas-cli. The run gets a placeholder SENTRY_AUTH_TOKEN; step 8 already proves the real secret exists in the EAS production environment.

Verification

Both steps ran locally against the real EAS project, with the CI environment (GITHUB_ACTIONS=1, no .env loading):

Command main this branch
expo config --json outside the pnpm shim exit 1, Cannot find module '@expo/config-plugins' exit 0
eas env:list --environment production --format long exit 1 exit 0, all 12 required names present
eas env:exec production ... assert:config exit 1 exit 0, Expo config contract OK

pnpm install --frozen-lockfile passes on the updated lockfile.

Not in scope

No CI job evaluates the app config outside the pnpm shim, so nothing catches a repeat of failure 1 before the nightly release. A guard is a separate change.

The preflight job failed at "Verify EAS production environment". eas-cli
spawns `expo/bin/cli config --json` directly, so it bypasses the pnpm bin
shim that exports NODE_PATH. react-native-appsflyer's Expo plugin requires
`@expo/config-plugins` without declaring it, so the config evaluation threw
`Cannot find module '@expo/config-plugins'` and every eas-cli command that
reads the app config failed. Declare the dep through packageExtensions, the
same way @sentry/react-native and expo-share-intent already do.

The next step, "Assert production config contract", failed for a second
reason: EAS_BUILD_PROFILE=production applied to eas-cli itself, so eas-cli's
own config evaluation threw on env vars it never injects. Move the variable
into the quoted command, and give the run a placeholder SENTRY_AUTH_TOKEN,
because that variable is SECRET and only EAS builders can read it.

Also print the eas-cli output when env:list fails. The command substitution
swallowed stdout, where eas-cli writes the real reason.
@iscekic iscekic self-assigned this Aug 24, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .github/workflows/kilo-app-release.yml
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Reviewed by grok-4.6 · Input: 53.4K · Output: 9.1K · Cached: 376.1K

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic enabled auto-merge (squash) August 24, 2026 21:03
@iscekic
iscekic merged commit a4e5dad into main Aug 24, 2026
71 checks passed
@iscekic
iscekic deleted the fix/eas-preflight-appsflyer-config-plugins branch August 24, 2026 21:32
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.

2 participants