Repository navigation
fix(server): keep a held pane held when herdr answers late, and stop taking a shell's startup for OmO - #243
Merged
Merged
Conversation
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
devswha
force-pushed
the
fix/flaky-contract-tests
branch
from
October 1, 2026 08:37
9387486 to
f46ff44
Compare
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
Release v0.3.39: moves the Unreleased notes under 0.3.39 and bumps `package.json` and `herdr-plugin.toml`. In this release, all fixes: a password sent right after a reconnect (#244), typing and keys outliving their connection (#235), panning a terminal whose grid is not the browser's own on a phone (#241), omo's question form in the chat (#237 by @nahwan-kim), and a held pane resumed by a late herdr answer plus a new shell taken for OmO (#243). No remote bundle change: `REMOTE_BUNDLE_VERSION` stays 9. Changelog housekeeping that was waiting for a release: - Compare links at the bottom now cover 0.3.31 to 0.3.39 (they stopped at 0.3.30), and `[Unreleased]` compares from v0.3.39. - Five references that were a bare `#N` are full PR links with their author: #164 is the issue PR #199 fixed, #154 the issue PR #155 closed, and #45 and #6 are PRs. No other wording of released entries changed. `bun scripts/release-notes.ts 0.3.39` prints the notes and exits 0.
This was referenced Oct 1, 2026
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
…ent that names it (#249) ## Change `isOmoProcess` took a foreground process for omo when any word of its argv was an omo path, so `grep -q …/omo-ai/x`, `cat …/bin/omo` or `node watch.js …/omo-ai/plugin` counted as omo. The sidebar then named the pane `omo`, the transcript lookup counted it as a second omo in the cwd, and `startShellAgent` could report a start. Now only the program counts: `argv[0]`, or, when `argv[0]` is `node`/`nodejs`/`bun`, the script it runs (the first word after it that is not a flag). The word must still be one path (no `:`), as #243 required. Shapes kept, the first two exactly as herdr 0.9.0's `pane.process_info` reported them for omo 5.1.7 in a test pane: - `/home/u/.bun/bin/bun …/omo-ai/node_modules/@code-yeongyu/senpi/dist/bundle/cli.js --extension …/omo-ai/plugin` - `/home/u/.bun/bin/bun …/omo-ai/plugin/runtime/ast-grep-mcp/cli.js mcp` (omo's MCP child, same process group) - `node …/bin/omo`, `node --flag …/omo-ai/bin/omo.js`, a native `omo`, and the SDK child `…/omo-ai/…/claude` The change is confined to `isOmoProcess` and one regex above it in `server/omo.ts`; Windows paths (#234) are untouched. Closes #248 ## Also checked: the omo question cards against real omo 5.1.7 (no defect found, no code change) In the isolated `herdr-web-ui-test` session (herdr 0.9.0), a server from this branch, and a real omo asked for a two-question `ask_user_question` form: - The card appeared with the form's title, options and step chips (`Question 1 of 2`, Red/Green/Blue, chips Color/Fruits), identical at 120, 60 and 40 columns. - Single choice, multiple choice, a typed answer, reopening an answer from the review, and Submit each moved omo on; omo reported `2 answered; 0 unanswered` with the answers sent. A stale answer got 409 `prompt_changed`. - The footer was 2 lines under exactly one rule at all three widths. - Backspace cleared an earlier multiple choice (Apple, Cherry -> Banana) and an earlier typed answer (Purple -> Teal). - Options 10 and above cannot occur in omo 5.1.7: its tool refuses with `options must contain 2 to 4 items when present`. - herdr reported the pane as `pi` before the first turn and `claude` with status `idle` (not `blocked`) while the form showed; the card still came from the session's pending call. ## Validation - `bun run typecheck` passes. - `bun run test:unit`: 673 pass, 0 fail (two new tests in `server/omo.test.ts`, one per direction). - `bun test ./server/omo.contract.test.ts ./server/omo-prompt.contract.test.ts ./server/prompt.contract.test.ts`: 10 pass.
This was referenced Oct 1, 2026
devswha
added a commit
that referenced
this pull request
Oct 1, 2026
Fixes #256. Raises `REMOTE_BUNDLE_VERSION` from 9 to 10, so that remote PCs (Windows PCs included) get the bridge-side fixes merged since `remote-v9`: #235, #243, #249, #251, #264, #265, #267, #278, #281 and the rest of `git log remote-v9..main -- server shared`. `server/machines.test.ts` named the `remote-v9` directory literally and failed on the new number; it now reads the constant. ## Order, from docs/remote-pcs.md 1. Merge this. 2. Push the `remote-v10` tag on `main`: the Remote PC bundles workflow builds, smoke-tests and publishes the five archives and `manifest.json`. 3. Only then release the app: an app that carries the new number finds no `remote-v10` manifest before step 2, and every connected PC's bridge counts as incompatible until it is updated. ## Checked `bun run typecheck`, `bun run test:unit` (734 pass). The bundle build and smoke run in this PR's Remote PC bundles checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #239, closes #240.
Two contract tests failed now and then on a Linux workstation. Both turned out to be product bugs that the tests caught by chance, so the assertions stay as they are.
1. A held pane was resumed and held again (#240)
server/attach-held.contract.test.tsgotattach_heldone time too many (2 instead of 1 at line 130, or 3 instead of 2 at line 148).The bridge holds an attach's first bytes for 100 ms and, if herdr's refusal is not there by then, decides the attach took. The timer started at the first byte, but the first bytes are terminal mode changes (
ESC[?1006l ...,ESC[?1049h) that theherdr terminal attachCLI writes itself before herdr has answered. On 400 refused attaches in a row on a busy machine, the refusal came more than 100 ms after the first byte 4 times (up to 218 ms). Each time the pane was resumed, and held again when the refusal arrived; in between, keys and input from the waiting bridge could reach a pane the other bridge holds.Fix: mode changes alone no longer start the hold. Counting from the first byte that is not a mode change, the refusal was at most 1 ms away in the same 400 attaches, because herdr writes it together with that byte.
New test: a scripted
herdrprints the mode changes, waits 0.4 s, then refuses. On main the client gets["attach_held", "attach_held"]; with the fix it gets one.2. A new shell was taken for OmO while its startup files ran (#239)
server/omo.contract.test.tsfailed in different tests on different runs.isOmoProcessmatched any argv word containing/omo-ai/. A zsh startup file on this machine runsprintf %s\n "$PATH", and thatPATHcontains omo-ai'snode_modules/.bin. Pollingpane.process_infoon 12 fresh shells with nothing typed into them, 9 matchedisOmoProcessduring startup, each time on thatprintf. The test helper returned on that match, before the stand-in omo was running. In the product the same match could mark a new shell as OmO for a moment and let New session report omo started too early.Fix: an argv word with a
:in it is a path list, not a program, and no longer counts (0 of 12 fresh shells match now). The test helper also waits for the stand-in by its own path. A unit test covers thePATHargument.Failure rates
Each file alone, in a loop, on the same machine (32 cores, herdr 0.9.3, Bun 1.4.2, other work running):
server/attach-held.contract.test.tsserver/omo.contract.test.tsChecks
bun run typecheck: cleanbun run test:unit: 654 pass, 0 fail (before the added unit assertions were the only change to that suite)bun run test:integration: 153 pass, 1 fail. The failure isweb push > reports a Codex unknown after work as done over WS and HTTP and delivers its completion pushinserver/api.contract.test.ts("not received within 5000ms"), a test this PR does not touch; see the comment below for how it behaves alone on main and on this branch.Not covered
isOmoProcessstill matches a single path intoomo-aigiven as an argument to another program (grep -q /.../omo-ai/x). I have not seen a shell startup do that.