Skip to content

Day 5 slice: Layer 2 iOS + Android (fast structural checks)#13

Merged
dadachi merged 1 commit intomainfrom
feat/day5-layer2-ios-android
Apr 21, 2026
Merged

Day 5 slice: Layer 2 iOS + Android (fast structural checks)#13
dadachi merged 1 commit intomainfrom
feat/day5-layer2-ios-android

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 21, 2026

Summary

Extends Layer 2 runtime validation to iOS and Android with platform-keyed dispatch. Each platform's check mirrors Rails' spirit — "does the project even load?" — with the cheapest command that exercises the whole toolchain without booting servers or building full artifacts.

Signature change

// before
runLayer2({ railsDir: "..." })

// after
runLayer2({ platform: "rails" | "ios" | "android", outDir: "...", timeoutMs? })

Only consumer was the smoke test; updated alongside.

Platform strategies

Platform Check What it validates
Rails mise exec -- bundle checkbundle install (if needed) → bin/rails routes Gem resolution, whole class graph loads, routes compile
iOS xcodebuild -list -project <*.xcodeproj> pbxproj parses, SPM dependency graph resolves
Android ./gradlew --version Gradle wrapper works, build script parses

Perf on freshly-generated clinic-queue

Platform Duration Note
Rails (cold) 24.6s Full bundle install
Rails (warm) 1.3s bundle check short-circuits
iOS 2.1s Includes SPM fetch
Android 0.7s Wrapper check

What's not in this PR

  • Full builds (xcodebuild build, ./gradlew assembleDebug) — next slice. Adds real compile validation but increases runtime to 60-90s+ per platform.
  • Judge integrationrunJudge still stubs all three layers; wiring Layer 2 into the pipeline is a separate concern.

Test plan

  • npm run ci — 7/7 green
  • Real Rails Layer 2 → pass: true, exit 0, 24.6s cold / 1.3s warm
  • Real iOS Layer 2 → pass: true, exit 0, 2.1s
  • Real Android Layer 2 → pass: true, exit 0, 0.7s
  • Missing xcodeproj / missing gradle wrapper → pass: false with informative stderrTail

Platform-keyed dispatch: runLayer2({platform, outDir, timeoutMs?}).
Each platform runs its own fast structural check mirroring the
"does the project even load?" spirit of Rails' bin/rails routes.

- Rails: unchanged — bundle check -> bundle install (if needed) ->
  bin/rails routes, all via mise exec when available.
- iOS: discover .xcodeproj in outDir, xcodebuild -list -project <x>.
  Loads project + resolves SPM dependencies; fails if pbxproj is
  corrupt or SPM graph broken.
- Android: ./gradlew --version. Validates the gradle wrapper +
  build script parse without downloading the full dep graph.

Perf on freshly-generated clinic-queue:
  rails   24.6s (cold, gems need install; warms to ~1.3s)
  ios      2.1s
  android  0.7s

Full builds (xcodebuild build, ./gradlew assembleDebug) deferred —
they're slow first runs and the storyboard's Layer 2 caption will
include them as a Sat-morning extension on top of this base.

Smoke tests updated: 7/7 green; new coverage for platform
dispatch with missing xcodeproj / gradle wrapper paths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 1348290 into main Apr 21, 2026
1 check passed
@dadachi dadachi deleted the feat/day5-layer2-ios-android branch April 21, 2026 23:48
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