Restarting or taking over a Metro on 8081 could accept the old server's
/status answer and keep its soon-deleted log, ending in BUNDLE_NOT_SEEN.
Readiness now needs the ownership record to name a new process whose log
exists.
A booted device pointed at a port outside the scanned 8081-8086 range
looked idle; the device's actual port is now probed, and a failed probe
counts as busy.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Agents had to chain boot, Metro, rebuild and whoami themselves, and after
one step failed they kept reporting the phone app as unbuildable. The new
command picks a device without disturbing other tasks (several candidates
make it ask instead of guessing), boots it, reuses or starts this
worktree's Metro (on a free port when 8081 belongs to another task),
installs the matching native app, launches it, waits for the bundle,
brings it back to the foreground when the system pushed it behind after
boot, and checks identity. It reads the Metro log sim-start records and
keeps its own output in the system temp directory, never in the worktree.
It can be rerun after the device idles off, and always ends with one JSON
line giving a code and the next step.
The root AGENTS.md module table now routes "seeing changes on the phone"
to the Mobile docs; the command and the rule that only a fresh run's code
counts as evidence live in docs/dev-rules/mobile-development.md.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Each Metro launch writes its log in a fresh mkdtemp directory recorded in the
port owner record, so logcheck only reads that launch's log and never a
predictable path. Short writes discard the log like failed ones. device-link
warnings are no longer known: relay errors can hide auth failures.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
The raw output may carry credentials and logcheck already rejects a stopped
Metro, so sim-start removes the log on child exit and on spawn errors.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Metro output can carry credentials, so the captured log now lives under the
system temp directory, one folder per worktree, instead of apps/mobile/logs.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
When a write fails and the directory forbids deleting, the truncated log has
no launch header, so logcheck reports unknown instead of passing on a
partial log.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
sim-start writes a launch id into the log header and the Metro owner record
(null when the log could not be created). logcheck reports unknown unless
they match, so an old log that could be neither replaced nor deleted cannot
pass.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
A Metro log that lost output (disk full, cannot open, cannot be recreated)
is deleted so logcheck reports unknown instead of passing on partial
content. quietDevLogs no longer installs on import, so its test loads the
module once as the test hygiene guard requires.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
sim:start now writes Metro output to apps/mobile/logs/metro-<port>.log, and
mobile:sim:logcheck reports what happened after the latest entry bundle: ERROR
and failed bundles fail, unlisted warnings must be reported, and an unknown
state is not a pass. Add the check to the simulator verification rules.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(mobile): keep simulator tests on Cindy's simulator while it is available
An idle Cindy simulator made whoami and rebuild silently pick a system device,
so a task could run on the wrong backend without any signal. Stay on Cindy until
the plugin is unavailable or a --udid names another device, report the reason
and reusable devices, and flag the system simulator while Cindy's is available.
Stop reporting native-missing when no exact target was probed, and align the
test workflow: occupied Cindy devices are not a reason to fall back, parallel
devices stay in the selected backend, and handoffs name the backend and model.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(mobile): fail closed when Cindy's simulator cannot be listed
A failed device listing was read as an empty one: whoami reported cindy-idle,
while rebuild and open silently moved on to a system device. Keep the failure
and stop without choosing a backend unless an exact UDID may live elsewhere.
Treat the Cindy devices directory given as an absolute path as Cindy's
simulator so it gets the same notices as CINDY_MOBILE_SIMULATOR=cindy.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
---------
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* Migrated from makecindy/cindy-temp#598
Transplanted onto the open-source root; diff identical to the original PR.
* fix(mobile): add spaces in selfhost validation error messages
Improve readability of error messages by adding spaces after colons
and between list items and parenthetical explanations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(mobile): rename missingSelfhostBakeFields → missingSelfHostBakeFields
Align casing with existing SelfHost naming convention in the module
(resolveSelfHostRegion, formatSelfHostReleaseCommand, etc.).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>