test(mobile): allow a locally built CLI in the E2E remote-cli harness - #4786
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe opt-in Files Reviewed (1 files)
Reviewed by claude-sonnet-5 · Input: 18 · Output: 7.3K · Cached: 355.4K Review guidance: REVIEW.md from base branch |
|
(bot) Standin review — round 1: The standin reviewer (reviewer-bot substitute per the workflow override) statically traced the full diff against plan §5, Residual testing risks recorded (no action): the new branches' first live exercise is the orchestrator-run on-device E2E by design; a symlinked The on-device E2E for the companion fix (Kilo-Org/kilocode#12545) exercises this harness end to end; results will be posted here and there as |
|
(bot) Harness exercised end to end by the companion on-device E2E: PASS. The acceptance run for Kilo-Org/kilocode#12545 used this branch's The full E2E matrix (11/11: |
What
apps/mobile/e2e/remote-cli.shgains an opt-inKILO_CLI_BINmode: when set to a locally built kilo binary,prepare_envskips the npm install of@kilocode/cli, prepends the binary's own directory to thePATHexported into.cli-env(the built CLI keeps sibling assets next to the executable), and fails loudly if the path is not an executable file.Under the same opt-in, the generated
.cli-envnow also carries the flags the session-tail E2E depends on:KILO_NO_DAEMON=1— the TUI must not attach to a machine daemon, so the embedded worker owns the ingest queue (otherwise the verification is a false pass/fail);KILO_DEBUG_SESSION_INGEST=true— theingest sync/ingest flush oklines are the primary evidence channel;KILO_REMOTE=1— without it the session never mirrors live to the device.They must be emitted:
prepare_envrewrites.cli-envon everyprepare/start, silently discarding anything hand-appended (hit for real during bug reproduction). WithKILO_CLI_BINunset, behaviour and the generated env file are byte-for-byte identical to before.Why this PR exists at all
The fix under verification is CLI-side: Kilo-Org/kilocode#12545 (flush the session ingest tail on shutdown). A CLI-side fix cannot be exercised on device while the harness can only ever install a published CLI — this harness change is the smallest thing that makes that verification reachable, and the only reason this cloud PR exists. The batch instruction said one PR from this worktree; the two-PR deviation is deliberate and stated in both PR bodies.
Checks
pnpm format && pnpm typecheck && pnpm lint && pnpm check:unusedinapps/mobile, plusgit diff --check— all green. The script was additionally validated by dry-running the emitted-env branch with a stubKILO_CLI_BIN(default path unchanged). Live verification against the stack runs with the companion CLI PR's on-device E2E; results will be posted as a follow-up comment.