Commit Graph

6 Commits

Author SHA1 Message Date
Dash
1065df1bc5 fix(mobile): per-launch private Metro log, full writes, no device-link allowlist
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>
2026-11-03 20:48:00 +13:00
Dash
1f09a5bb3d fix(mobile): delete the Metro log when its Metro exits
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>
2026-11-03 20:09:59 +13:00
Dash
390775ba70 fix(mobile): keep raw Metro logs out of the worktree
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>
2026-11-03 19:57:26 +13:00
Dash
88e2fb9cb0 fix(mobile): reject Metro logs not written for the running launch
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>
2026-11-03 19:30:52 +13:00
Dash
6445c56a14 fix(mobile): drop incomplete Metro logs and load quietDevLogs once in tests
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>
2026-11-03 18:07:57 +13:00
Dash
eb865b7f92 feat(mobile): check Metro logs after simulator verification
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>
2026-11-03 17:37:40 +13:00