Skip to content

test(prompt): the omo routes wait until their stand-in process runs - #3728

Merged
devswha merged 1 commit into
mainfrom
test/prompt-omo-child-ready
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
test/prompt-omo-child-ready

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Change

server/prompt.test.ts's OMO prompt-route fixtures (withOmo) let the route find OMO through an inert child process's OMO_CODING_AGENT_DIR, read from /proc/<pid>/environ. The child was spawned and the route asked at once. Until the child has exec'd, /proc shows the parent's environment, without the variable, and the route took the pane for pi: #3722's Fast checks (run 43161162746, job 130992611922) failed "an answer and the menu it was made for > discovers the real 5.1.30 one-question wide widget through the prompt route" with "agent": "pi" where "omo" was expected, on a PR that changed only a Windows browser script.

The child now writes ready once it runs (stdout piped), and the fixture waits for that line before the route is asked. Test-only; no sleep.

Validation

  • server/prompt.test.ts: 3 full runs, 467 pass, 0 fail each.
  • bun run typecheck: pass. bun run check fast on the branch rebased onto 98be242: pass (16185 pass, 0 fail).

The prompt-route fixtures find OMO through an inert child's
OMO_CODING_AGENT_DIR, read from /proc/<pid>/environ. Until the child has
exec'd, /proc shows the parent's environment without it, and the route took
the pane for pi (Fast checks of #3722, run 43161162746: "agent": "pi" where
"omo" was expected). The child now writes a line once it runs, and the
fixture waits for it before the route is asked.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Improved test setup reliability by waiting for the spawned process to signal readiness before continuing.

The OmO route test fixture now waits for its spawned child to print a readiness line to stdout before it records the child PID and continues.

Changes: OmO route fixture

Layer / File(s) Summary
Child readiness synchronization
server/prompt.test.ts
The child prints ready to stdout. The fixture waits for that line before continuing.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: haeminway1, jpcarranza94

Merge Risk: Minimal · up to 8fa57

This is a test-only change that removes a race in the prompt route fixture. It does not alter production behavior and carries no identified merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the test fixture change (the OMO prompt routes now wait until their stand-in process runs), which matches the single-file change in server/prompt.test.ts. It is specific and concise, a…
Description check Passed The description follows the template. The Change section explains the race condition (route asked before the child has exec'd, so /proc shows the parent environment) and the resulting behavior (wrong …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the test fixture change (the OMO prompt routes now wait until their stand-in process runs), which matches the single-file change in server/prompt.test.ts. It is specific and concise, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the template. The Change section explains the race condition (route asked before the child has exec'd, so /proc shows the parent environment) and the resulting behavior (wrong agent 'pi' instead of 'omo'), and it states the fix. The Validation section lists the checks run and their results. It does not mention contract-test coverage or the changelog, but those apply only to HTTP/WS changes or to a non-test change, and this is test-only.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3e83412 and 8fa5745.

Files selected for processing: 1

  • server/prompt.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@devswha
devswha merged commit d9c7fd4 into main Nov 12, 2026
21 checks passed
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head 8fa5745e0e31 as d9c7fd48c0d8 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only PR (server/prompt.test.ts).

Test-only PR (server/prompt.test.ts), so one reviewer: Codex Terra, CLEAR with no findings.

A flake from #3722's first Fast checks run: the omo route fixture read its stand-in child's environment from /proc before the child had exec'd, so the test discovers the real 5.1.30 one-question wide widget saw agent "pi" for "omo". The child now writes a line once it runs and the fixture waits for that line. The author ran prompt.test three times: 467 pass, 0 fail each.

@devswha
devswha deleted the test/prompt-omo-child-ready branch November 12, 2026 06:40
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