Skip to content

fix(stage2): Android sign-in 401, iOS springboard relaunch, npm run cost dir - #145

Merged
dadachi merged 1 commit into
mainfrom
fix/stage2-android-signup-newline
Oct 17, 2026
Merged

dadachi merged 1 commit into
mainfrom
fix/stage2-android-signup-newline

Conversation

@dadachi

@dadachi dadachi commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Summary

I found these while running a paid-edition NATIVEAPPTEMPLATE_VISUAL=2 generation of the Orange Baton spec. Before the fixes, two runs failed Stage 2 on both mobile platforms. After them, the run passed: iOS 46/46, Android 48/48, 7m 12s, $0.223.

  • Android sign-in 401 (scenarios/queue.ts): mobile-mcp sends submit: true as a literal "\n". The Sign Up step therefore registered the password as "ValidPassword1!\n", which I confirmed in the Rails DB, and the later sign-in got 401. The password step now submits only on iOS.
  • iOS springboard (stage2-judge.ts): one run judged the springboard instead of the app, because a launch error was swallowed by a silent catch {}. foregroundApp() now traces launch errors. If the screen still shows home-screen icons, it relaunches once. In the passing run the relaunch never fired, so the root cause is still unconfirmed; the next time it happens, the trace will show why.
  • npm run cost read the wrong directory (scripts/cost.sh): the agent writes traces to tmp/trace/ under the directory it ran in, but the script defaulted to this repo's tmp/trace/. Run from an app workspace, it printed a stale total with only a planner row. It now defaults to ${INIT_CWD:-$PWD}/tmp/trace.
  • README: added the measured VISUAL=2 time and cost (with the per-agent breakdown), fixed the "Check your own spend" instructions, and replaced the validation report screenshot with the passing Orange Baton report (the image grew from 485KB to 959KB).

Tests

Each fix has a regression test in tests/smoke.test.ts. I watched each test fail against the original code, then pass with the fix:

  • buildQueueScenario never submits a typed password on Android
  • runStage2Visual relaunches the app when the first launch leaves the iOS springboard up
  • cost.sh with no argument reads tmp/trace/ of the directory npm run cost was invoked from

npm test: 160/160 pass. npm run build and tsc -p tsconfig.test.json are clean. npm --prefix <repo> run cost, run from the workspace, matches the hand-computed $0.2231.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr

…ost dir

- Android: the Sign Up password step no longer submits. mobile-mcp types
  submit as a literal "\n", so the account was registered with
  "ValidPassword1!\n" and the later sign-in got 401.
- iOS: foregroundApp() traces launch errors instead of swallowing them and
  relaunches once if the screen still looks like the springboard.
- npm run cost: default to tmp/trace/ of the invoking directory (INIT_CWD),
  where the agent writes its traces, not this repo's tmp/trace/. Run from
  an app workspace it silently reported a stale planner-only total.
- README: measured VISUAL=2 time/cost from a passing Orange Baton run
  (7m 12s, $0.223) and a new validation report screenshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
@dadachi
dadachi merged commit 52c9530 into main Oct 17, 2026
1 check passed
@dadachi
dadachi deleted the fix/stage2-android-signup-newline branch October 17, 2026 20:49
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