Skip to content

test(opencode): name other FIFO waiters by process name only, never their arguments - #3787

Merged
devswha merged 1 commit into
mainfrom
test/opencode-waiter-names
Nov 12, 2026
Merged

devswha merged 1 commit into
mainfrom
test/opencode-waiter-names

Conversation

@devswha

@devswha devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

Follows up #3783, from the merge pass's Codex review (LOW).

On a failure, the stand-in diagnostic's waiting list scans every process on the machine for one blocked on a FIFO, and printed each match's full command line. In CI the container only holds the test's own processes. In a local run on a shared machine, though, an unrelated program that happens to wait on a pipe would have its arguments printed into the log, and arguments can carry a secret.

Change (diagnostic only, test file)

waiting entries now carry only the process name (/proc/<pid>/comm), its pid and its wait channel, never its arguments.

The pane's own processes (pane_processes) keep their argv: they come from pane.process_info for the test's own pane, which is the stand-in.

Validation

  • HERDR_TEST_MODE=integration bun test ./server/opencode-first-message.contract.test.ts (herdr 0.9.3): 6 pass, 0 fail.
  • bun run check fast: pass.

No changelog fragment: this changes a test only.

@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
    • Updated process-check test reporting to capture process identity and wait-channel details instead of command-line arguments. Existing process matching and wait-channel checks remain unchanged.
    • No user-facing behavior changes are included in this update.

The contract test now records each matching process’s command name instead of its command-line arguments. It continues to record the PID and wait channel, and its process matching and wait-channel checks remain unchanged.

Changes: Process details

Layer / File(s) Summary
Record process command names
server/opencode-first-message.contract.test.ts
paneProcesses records the process command name instead of its command-line arguments. It still records each matching process’s PID and wait channel.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: Minimal · up to 3cbc7

This is a test-only diagnostic change with no production behavior impact. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the test diagnostic now identifies other FIFO waiters by process name only, not by arguments. It is specific and matches the raw summary and objectives. It is 83 chara…
Description check Passed The description explains the problem (the waiting list printed full command lines, which can expose secrets), the change (waiting entries carry only process name, pid, and wait channel), and validatio…
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 main change: the test diagnostic now identifies other FIFO waiters by process name only, not by arguments. It is specific and matches the raw summary and objectives. It is 83 characters, slightly long but within reason.

Full details: Description check

Explanation

The description explains the problem (the waiting list printed full command lines, which can expose secrets), the change (waiting entries carry only process name, pid, and wait channel), and validation (bun test run with 6 passes and bun run check fast). It does not fill the template's Change heading exactly, but the required content is present. It also states no changelog fragment is needed, which matches the template's changelog pointer. It does not link an issue, but this is a test-only follow-up, so the template's feature-link requirement does not apply.

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 68da73d and 3cbc711.

Files selected for processing: 1

  • server/opencode-first-message.contract.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 commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate: PASS

Local merge gate: PASS #3787 merge=22ed527f2620 head=3cbc711ead8e main=68da73d7e878 on herdr-ci-runner:local on devswha-ThinkStation-P620 CPUs 64-127 in 588s, reruns=1

The Linux suites of the required checks (Fast checks, Integration and browser), run on main 68da73d with this PR's head 3cbc711 merged in (local merge 22ed527f2620, not pushed), as groups side by side in the self-hosted CI runner image on herdr-ci-runner:local on devswha-ThinkStation-P620 CPUs 64-127 (26% busy before the start, host load 50.16; shards=4 unit_workers=8 browser_main_workers=2 browser_other_workers=16). Scope: full. Native Windows install and the macOS checks are not part of this gate.

Step Command Result Seconds Counts
fast-install bun install --frozen-lockfile pass 0 -
release-guards bun scripts/release-guards.ts --base 68da73d7e878 pass 0 -
fast bun run check fast pass 192 tests 16713 pass / 0 fail; check steps 6 ok / 0 failed
integration-install bun install --frozen-lockfile pass 0 -
integration bun run check integration pass 209 tests 1431 pass / 0 fail; check steps 3 ok / 0 failed
browser-main-install bun install --frozen-lockfile pass 0 -
browser-main-build bun run build pass 10 -
browser-main BROWSER_SCRIPTS=ui-regression,ui-contexts-regression bun run check run -- bun scripts/ci-browser-parallel.ts pass 383 browser scripts 2/2 passed
browser-other-install bun install --frozen-lockfile pass 0 -
browser-other-build bun run build && bun run build:shell pass 14 -
browser-other BROWSER_EXCLUDE=<those two> bun run check run -- bun scripts/ci-browser-parallel.ts pass 564 browser scripts 207/207 passed

Reruns:

  • browser scripts/terminal-cjk-punctuation-regression.ts failed, then passed on its automatic second run

Total 588s.

@devswha
devswha merged commit dda4939 into main Nov 12, 2026
20 checks passed
@devswha
devswha deleted the test/opencode-waiter-names branch November 12, 2026 17:33
@devswha

devswha commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head 3cbc711ead8e as dda493926324 on the local merge gate, with no unresolved review threads.

Reviewer Verdict Note
codex CLEAR

One reviewer: test-only PR (server/opencode-first-message.contract.test.ts).

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

From the review of #3783: the diagnostic's scan for processes waiting on a FIFO reads every process on the machine, so its entries now carry the process name, pid and kernel wait only, never arguments; the pane's own processes (the test's stand-ins) keep theirs. Two lines.

The merge pass gated this head with the local merge gate (its comment has the result). The VM merge gate ran beside it for comparison only.

devswha added a commit that referenced this pull request Nov 12, 2026
## Summary

`scripts/newtab-typeahead-regression.ts:149` (via
`ui-contexts-regression`) timed out twice on the merge pass's mesh VM
gate (4 vCPU) for #3787's tree:

> dialog: the page's frames for the new tab are all heard; expected
"echo ahead-dialog\r", heard "echo ahead-dialog\r"

The text heard equals the text expected, but `heard.count >= sentByPage`
never held.

## Cause

The page-side counter, added in #3713, raised `sentByPage` on every
`WebSocket.send()` of an `input` or `keys` frame, before `send` ran.

`src/lib/ws.ts` `rawSend()` calls `socket.send` with no `readyState`
check. Input goes through it directly (`ws.ts` 1043, 1136), and `send()`
gates on `this.connected`, which can still be true while the socket is
closing.

The browser discards a frame sent on a `CLOSING`/`CLOSED` socket, and a
send on a `CONNECTING` one throws, so neither fires Playwright's
`framesent`. The page counted a frame the listener could never hear, and
the wait could not end.

## Fix (test only, no sleeps)

The page counts a frame only when its socket was `OPEN` and `send`
returned. The wait still covers every frame that actually left, an
unexpected extra one included.

## Validation

- `HERDR_TEST_MODE=integration bun
scripts/newtab-typeahead-regression.ts` (after `bun run build`): 3/3
pass at load 61-64.
- `bun run check fast`: pass.

No changelog fragment: this changes a test only.

Not in this PR: `ws.ts` handing input to a socket that is no longer open
may lose a key. Reported to the lead as a product question.
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