fix(eas): validate session minute limits before acquiring devices

Merged
RU
9d ago
+33-3
  • Reject non-finite, negative and fractional EAS minute limits when loading config. A NaN or negative idle value previously omitted the idle safeguard instead of reporting the invalid setting.
  • Preserve zero and valid integer settings, matching the non-negative integer flags in Expo's simulator CLI.
  • Cover both options, document their contract and add a patch changeset.

Verified

Ran it locally: yes

Built all seven packages and invoked the built public mobile/EAS configuration through a real scratch consumer and e2e list.

configurationmainbranch
NaN idle, infinite duration, negative idle, fractional durationexits 0 and lists the testexits 2 with INVALID_CONFIG naming the option
zero idle or zero durationexits 0exits 0

No Expo credentials, network request or hosted simulator was used in this config-load proof. Provider API unit tests use the existing fake GraphQL API. No claim of a live EAS session test.

  • The new rejection regressions fail on main; all 38 EAS unit tests pass on this branch.
  • EAS typecheck, all seven package builds, lint, docs validation and broken-link check pass.
  • Full built-CLI testbed: 14 files passed, 71 tests passed, one skipped. Its server port was temporarily moved from 4271 to 4295 to avoid the independent benchmark lane, then restored.
  • Error-code, peer-range and install-script checks pass.
  • pnpm check stops at the mobile benchmark unused react-native-screens finding under our filtered installation, as it does on the same main installation. This is an environment limitation, not proof of a mobile source defect. Full native mobile benchmark is not run here.
  • Separate fresh-context review of source, callers, before/after proofs and the Expo CLI contract found no important or critical findings.
  • GitHub's fork workflows currently require maintainer approval; pending/unauthorized checks are not reported green.

Expo CLI reference: https://github.com/expo/eas-cli/blob/main/packages/eas-cli/src/commands/simulator/index.ts (max-duration-minutes and max-idle-time-minutes, Flags.integer({ min: 0 })).

AI assistance: implemented and independently reviewed with Codex, with local before/after verification.

Updated verification (October 6)

Kept the requested one-line minute-limit note and removed the skills/setup addition. Focused tests, package typecheck, and the rebuilt public EAS consumer pass.

Direct package typecheck and lint pass. The full monorepo check remains blocked at the same missing filtered mobile-benchmark dependency on untouched main; the current full Next benchmark was not rerun with this lean dependency environment. Hosted fork workflow authorization is reported separately; I am not marking these Ready for Human Review.