Skip to content

Day 3b complete: Android worker finishes the three-platform pipeline#8

Merged
dadachi merged 1 commit intomainfrom
feat/day3b-android-worker
Apr 21, 2026
Merged

Day 3b complete: Android worker finishes the three-platform pipeline#8
dadachi merged 1 commit intomainfrom
feat/day3b-android-worker

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 21, 2026

Summary

Closes Day 3b. Three workers now run end-to-end in parallel against real substrates.

  • src/agents/workers/android.ts — real implementation. Copies \$NATEMPLATE_ANDROID./out/<slug>/android, runs rename.rb, git init -q -b main.
  • scripts/ruby/rename.rb:
    • TEXT_EXTS += .kt .kts .xml .gradle .pro .toml .properties .cfg
    • TEXT_BASENAMES += gradlew gradlew.bat gradle.properties local.properties
    • SKIP_DIR_SEGMENTS += build .gradle .idea .kotlin captures

Tricky bit worth flagging

Android has nested build/ dirs in every module (app/build, model/build, datastore-proto/build). The Rails/iOS worker's startsWith("/build/") path-prefix skip would miss those and copy ~hundreds of MB of KSP/Hilt generated files into ./out/. Switched Android's filter to segment-based skiprel.split("/").some(seg => SKIP_SEGMENTS.has(seg)). Catches build anywhere in the path.

Verified end-to-end (both specs, both operation paths)

Real planner (claude-opus-4-7, ~5s/$0.08) + all three real workers in parallel (~1s each via Promise.all):

Spec Platform Files scanned Content changes Substitutions File renames Leftovers
clinic-queue (adapt) rails 305 134 2,459 49 0
ios 252 101 2,227 44 0
android 271 116 1,854 49 0
task-tracker (replace) rails 305 139 3,110 65 0
ios 252 120 2,950 77 0
android 271 131 2,828 89 0

Leftover audit = grep -rln for [Ss]hop, [Ss]hopkeeper, ItemTag across *.rb .swift .kt .xml .kts .pbxproj .gradle .pro — empty in all cases.

Spot checks (clinic-queue/android):

  • model/src/main/kotlin/.../model/Clinic.kt — exists (was Shop.kt)
  • data/clinic/ClinicApi.kt — dir AND file renamed in one pass
  • No generated files under output build/ dirs (copy filter working)

What remains

  • Day 4: reviewer sub-agent (OpenAPI contract diff), any planner prompt refinement if workers need more structure.
  • Day 5 Layer 2: actual bin/dev / xcodebuild / ./gradlew assembleDebug verification. Compile errors will surface real semantic issues (e.g., acts_as_tenant wiring, Hilt module registration) that lexical renaming can't fix.

Test plan

  • npm run ci — 5/5 under stub mode
  • clinic-queue spec, real planner + all 3 real workers — zero leftovers, all three parallel wall-time ~1s
  • task-tracker spec, real planner + all 3 real workers — zero leftovers across all platforms
  • Segment-skip verified on Android: find out/clinic-queue/android -path '*/build/*' | wc -l returns 0
  • Full build verification — Day 5 Layer 2

- src/agents/workers/android.ts: copies $NATEMPLATE_ANDROID ->
  ./out/<slug>/android, runs rename.rb, git init. Uses
  segment-based skip (Set-membership over each path segment) rather
  than startsWith, because Android has nested build/ dirs in every
  module (app/build, model/build, datastore-proto/build) that
  startsWith("/build/") wouldn't catch.
- scripts/ruby/rename.rb:
  - TEXT_EXTS += .kt .kts .xml .gradle .pro .toml .properties .cfg
  - TEXT_BASENAMES += gradlew gradlew.bat gradle.properties
    local.properties
  - SKIP_DIR_SEGMENTS += build .gradle .idea .kotlin captures

Verified — all three workers running in parallel via dispatch's
Promise.all:

  clinic-queue (adapt, 2-pair rename):
    rails:   305 scanned, 134 changed, 2459 subs, 49 renames
    ios:     252 scanned, 101 changed, 2227 subs, 44 renames
    android: 271 scanned, 116 changed, 1854 subs, 49 renames

  task-tracker (replace, 3-pair rename, ItemTag->Task):
    rails:   305 scanned, 139 changed, 3110 subs, 65 renames
    ios:     252 scanned, 120 changed, 2950 subs, 77 renames
    android: 271 scanned, 131 changed, 2828 subs, 89 renames

Zero [Ss]hop / [Ss]hopkeeper / ItemTag leftovers across all platforms
in both specs (content + filename grep). Parallel wall time ~1s per
worker.

Build green-check (gradlew / xcodebuild / bin/dev) deferred to
Day 5 Layer 2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 94e58a8 into main Apr 21, 2026
1 check passed
@dadachi dadachi deleted the feat/day3b-android-worker branch April 21, 2026 08:31
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