Repository navigation
test(e2e): fake Codex answers the --no-daemon --help probe without a spawn - #24440
Conversation
…spawn Since #23933 Orca runs `codex --help` before a path-named Codex launch. The fakes logged it as an agent spawn and held the probe for its 5 s timeout. Move the app-server refusal and --help answer into one shared FAKE_CODEX_LAUNCH_PROBES_SOURCE used by every fake Codex.
…rker no longer has #23994 stopped minting the per-dispatch capability, so capability_hash is null. The --help spawn failure used to stop this test before it got here.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Test-only E2E fixture fix. Nothing here changes production behavior; the PR makes the fake Codex binaries answer the --help support probe that planCodexNoDaemonLaunch runs before an absolute-path launch, so a spec that asserts exactly one spawn no longer sees the probe recorded as a second one.
- Shared probe snippet — new
tests/e2e/helpers/fake-codex-launch-probes.tsrefusesapp-server(exit 2) and answers--helpwith exit 0 and a usage line that omits--no-daemon, keeping the fakes' launch argv unchanged. - Six fakes wired to the helper —
live-background-terminal-mount-authority,orchestration-legacy-worker-restart-recovery,orchestration-legacy-worker-missing-terminal-recovery,orchestration-worker-terminal-visibility,orchestration-worker-settlement-release-cli, andhelpers/completed-worker-retirement-fixtureall replace their inlineapp-serverblock with the interpolation. - Capability-column assertion dropped —
assertDispatchRemainsCurrentno longer selects or expectscapability_hash, consistent with the local-dispatch-null behavior after #23994 and withmarkAssignmentAsPreUpdateLegacyin the same file.
I verified the snippet's behavior directly (--help → exit 0 with no --no-daemon; app-server → exit 2; a normal invocation falls through), confirmed every fake that records spawn events is covered while the two absolute-codex fakes that don't assert spawn counts are correctly left alone, and confirmed oxlint is clean on the touched files. The one uncovered edge is the --no-daemon-supported branch (all fakes omit the flag), which is the pre-existing, deliberate #24033 choice rather than something this PR introduces.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe e2e fake Codex scripts now use a shared launch-probe source for Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The test-only change standardizes fake Codex launch probes and removes a stale recovery assertion. No actionable merge-blocking risk is established; merge after normal checks, including the targeted E2E run. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…-codex-help-probe

ELI5
Some E2E tests launch a fake Codex program and count how many times it starts. Orca now asks Codex
--helponce before each launch, to check a feature, and the fake counted that question as a second start. This makes every fake Codex answer the question without counting it.What Changed
Test-only; users see no difference.
tests/e2e/helpers/fake-codex-launch-probes.tsexportsFAKE_CODEX_LAUNCH_PROBES_SOURCE. It refusescodex app-server, as every fake already did inline, and answerscodex --helpwith exit 0 and a usage line that doesn't mention--no-daemon.app-serverblocks:live-background-terminal-mount-authority,orchestration-legacy-worker-restart-recovery,orchestration-legacy-worker-missing-terminal-recovery,orchestration-worker-terminal-visibility,orchestration-worker-settlement-release-cli, andhelpers/completed-worker-retirement-fixture.Why
Since #23933, before launching a Codex binary named by an absolute path, Orca runs
<path> --helpto learn whether it supports--no-daemon(src/main/pty/codex-no-daemon-launch-command.ts). The fakes didn't handle--help. They wrote a "spawn" entry, printed their ready banner, and sat until the 5 s probe timeout. Tests that expect exactly one spawn then failed:live-background-terminal-mount-authorityandorchestration-legacy-worker-restart-recoveryfail this way every night (10-01 run). #24033 already fixed the same thing in one fixture with an inline guard. This PR puts that guard in one place so the remaining fakes, and new ones, can't drift. The three fakes that weren't failing today have the same gap, and their worker tests appeared in earlier nightly reds.The help text deliberately omits
--no-daemon, so Orca keeps launching the fakes with unchanged arguments. That keeps the tests' argv assertions valid, same as #24033. Skipping the probe under E2E was the other option, but the probe is real launch behavior; the fakes should model a real Codex.A second stale assertion this exposes. The "current worker" case of
orchestration-legacy-worker-restart-recoveryused to fail at the spawn count before reaching its last check. That check expects the dispatch row'scapability_hashto be a string, but #23994 stopped minting the per-dispatch capability token, so the column is nownull. #23994's own rule is that tests assert dispatch state, not the capability column, so this PR dropscapability_hashfrom that query and its expectation.Moving the guard into the helper also keeps
live-background-terminal-mount-authority.spec.tsunder the 800-line lint limit; an inline copy pushed it to 803.Testing
Targeted E2E dispatch for all seven specs that use these fakes: 36909447979: 9 of 10 pass, including both restart-recovery cases and every other worker spec.
Still red, not caused or fixed here:
live-background-terminal-mount-authoritynow gets past the spawn count, then fails its main check: on first mount, the three background terminals should be adopted into their tabs without duplicates. This run gotterminal_surface_ownership_unavailable; the PR-check run got the same terminal adopted into extra tabs. The same check failed on the 09-28 and 09-29 nightlies (line 659), before fix(terminal): run Orca's cmd.exe, path-named and setup-gated Codex launches without the shared server #23933 added the--helpcheck, so it is an older, separate problem that the--helpfailure had been hiding. It passed once, in a combined run on an oldermain, so it is intermittent. It needs its own investigation.Ran the snippet directly under Node:
--helpexits 0 with the usage line,app-serverexits 2 with the refusal, and a normal launch falls through to the fake agent.oxfmtandoxlintare clean on the touched files.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Linked Issue
N/A (maintainer fix for the red nightly E2E run on
main)Visual Proof
N/A: test-only change, no UI or behavior change.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Test-only. No SSH, mobile, wire, or cross-version impact.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)