sim-start now handles SIGINT/SIGTERM/SIGHUP by forwarding them to Metro, so
the launcher stays alive for Metro's exit callback instead of dying first.
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>
On Windows the spawned child is only the pnpm/cmd wrapper. Reuse the
tree-aware terminateMetro path and wait for it before exiting.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Only the three observed missing-listener events are known warnings. sim-start
registers log cleanup before writing the owner record, and stops Metro and
removes its log when that write fails.
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>
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>
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>
The simulator guide claimed the iOS debug app only ever loads Metro on 8081,
so agents concluded two worktrees could not run on two simulators at once.
React Native first reads the per-device RCT_jsLocation default and only
falls back to 8081 when that Metro does not answer.
Document how the app picks Metro, the two silent fallbacks, the parallel
device recipe (rebuild --udid, start --port, point the device, verify with
whoami --udid --port and the build label, clean up), and what is still
unverified on Android. Align the dev rules and sim-start comments.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Keep --takeover fail-closed for foreign Metro processes, allow restarting a stale current-worktree Metro, and keep whoami --json compatible with the exact Simulator target added on main.
Signed-off-by: Dash <dashhuang@gmail.com>