Skip to content

test(chat): drop tests that only guarded removed omp start-screen paths - #1739

Merged
devswha merged 1 commit into
mainfrom
test/model-before-first-message-coverage
Oct 23, 2026
Merged

devswha merged 1 commit into
mainfrom
test/model-before-first-message-coverage

Conversation

@devswha

@devswha devswha commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Change

Item 1 of #1428: tests left from #1374 that only guarded a removed path and passed on main are trimmed. In server/omp.test.ts, server/start-screen.test.ts and server/start-screen.contract.test.ts the removed omp catalog/start-screen assertions and their fake-process setup go (about 10 s of herdr setup in the contract file that checked nothing new). The live Codex footer assertions and omp's transcript model and effort coverage stay.

Items 2-4 (a client test in ChatView, a Codex footer read from scrolled history in files other open PRs hold, and DESIGN.md) stay open.

Refs #1428

Validation

  • The three files on an isolated herdr session: 32 pass.
  • bun run check fast: pass.

Remove assertions that only guard the retired omp screen reader and its fake process setup. Preserve transcript model and effort coverage in the existing omp unit test, and keep the live Codex footer contract.

Refs #1428
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 2210494 and 0c959a7.

📒 Files selected for processing: 3
  • server/omp.test.ts
  • server/start-screen.contract.test.ts
  • server/start-screen.test.ts
  • 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

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 23, 2026

Copy link
Copy Markdown
Owner Author

Merging without a CodeRabbit review: CodeRabbit hit its review limit, so no review ran. The merge pass reviewed it instead. A gate reviewer on a different model than the author's confirmed the deleted tests only guarded omp screen/catalog code that has been removed. The live Codex footer and omp model/effort coverage remain, and 31 unit tests pass. All required checks are green and no review thread is open.

@devswha
devswha merged commit c9b8dbb into main Oct 23, 2026
17 checks passed
@devswha
devswha deleted the test/model-before-first-message-coverage branch October 23, 2026 08:24
devswha added a commit that referenced this pull request Oct 28, 2026
…, not a scrolled view (#2163)

## Problem

Follow-ups left open in #1428 after #1374 (item 1 was done in #1739):

- **Stale footer model (Codex MEDIUM).** Before its first message, an
agent's model is read off its own screen: a session-less Codex's footer,
or a launched Claude's banner. That read used herdr's viewport
(`visible`), which follows the pane's scroll. If the terminal was
scrolled up to an earlier frame, on this device or another, the chat
named that frame's model as the current one.
- **No client coverage** for what #1374 changed in ChatView: a
scrollback answer forwards its metadata, and an answer read off the
screen is re-read on terminal output.
- **Stale DESIGN.md sentence** left over from the catalog design.

Refs #1428

## Fix

- `server/conversation.ts` adds `bottomViewport()`: the pane's viewport,
read while herdr reports it at the bottom with the same history before
and after the read, else nothing.
- **When herdr reports no scroll** (the field is optional), or a scroll
lookup fails, no model is named.
- This drops main's text-comparison fallback for a herdr that omits
scroll; `viewportShowsLive` keeps it for its own use.
- Without scroll, `pane.get` gives no geometry. A viewport scrolled up
into the blank rows under a short screen then reads the same as the live
one, so that fallback could name an older model (Codex review,
reproduced).
- No supported herdr is known to omit scroll. Every start-screen read
goes through it:
- the model of a conversation not begun (`screenMetadata`: Claude,
Codex, gjc);
  - the session-less Codex fallback's model;
  - that fallback's greeting decision (`codexFreshSession`).
- **While a device has the terminal scrolled up, no model is named**
until it is back at the bottom: the pill disappears rather than naming
one the agent no longer runs.
- herdr's `detection` read is deliberately not used. On herdr 0.9.5 a
detection read of a short screen reaches up into the history above it
(after a clear, a 7-line frame read as 34 lines). An earlier version of
this PR used it and was caught by the reviews:
  - **Codex:** older output there denied a fresh Codex its greeting.
- **The merge pass:** an older Claude banner above a live trust prompt,
or an older Codex footer above a cleared screen, still named the model.
- **Stricter than main:** a viewport scrolled up to an old, unused start
frame can no longer make a live, used Codex session look fresh.
- `DESIGN.md`: documents the live-screen rule and restates the "no pill"
rule without the removed catalog.

## Tests

- `server/start-screen.contract.test.ts` (isolated herdr): draws an old
Codex frame (GPT-6-Luna medium), pushes it into the history under a live
frame (GPT-6.1-Sol low) and scrolls the pane to the top.
- **Scrolled up:** `/api/pane/conversation` names no model, and the read
leaves the scroll where it was.
  - **Scrolled back to the bottom:** it names gpt-6.1-sol/low.
  - **On main it fails:** it names gpt-6-luna/medium.
- `server/conversation.test.ts`:
- From the merge pass's review, two cases that fail on the PR's previous
head: an older Claude banner above a live trust prompt, and an older
Codex footer above a cleared live screen.
  - A scrolled pane names no model and offers no greeting.
- With no scroll reported, launched Claude, Codex and gjc and a terminal
Codex name no model; the same frames name it once a scroll is reported.
  - A failed scroll lookup names none.
- A fresh Codex whose detection read carries older output above it is
still greeted.
- `scripts/chat-fallback-browser-qa.ts` with its fixture: a real
ChatView on a page whose clock is paused, with pushes on, so neither the
2s poll nor the 10s backstop stands in for the re-read.
- A scrollback answer and a not-begun `codex-transcript` answer marked
`screen` forward their model and listen to the terminal. Terminal output
re-reads each exactly once and forwards the new model.
  - A transcript answer stops listening.
- Each of three ChatView breaks fails a new assertion: metadata not
forwarded for scrollback, screen answers not listening, and the listener
not invalidating.

## Validation

- `bun run check run bun test ./server/start-screen.contract.test.ts`:
fails on main, passes on this branch.
- `bun run check run --build bun scripts/chat-fallback-browser-qa.ts`:
pass.
- `bun run check fast`: pass.
- Reviews:
  - **omo-native-code-reviewer:** PASS on every round.
- **Codex gpt-6.1-sol (fast, xhigh):** round 1 found the greeting MEDIUM
(reproduced and fixed); round 2: PASS.
  - **Merge pass (0e361bf):** found the model MEDIUM, fixed here.
  - **Delta 0e361bf..4345422:** omo PASS, Codex PASS.
- **Final delta 29bc376..1d53c8c:** omo PASS (LOWs), Codex PASS with
no findings.
  - **Review LOWs taken:**
- A test that moves the scroll around the read: dropping the before
check, the after check or the history-size comparison now each fails it.
- The helper is renamed `bottomViewport`, away from the opposite
`liveScreen` in `server/dialogs/live.ts`.
- **No-scroll round:** the merge pass found that a herdr omitting scroll
lost the model. The text-comparison fix for that was then blocked by
Codex (a stationary collision). Dori chose to name no model when no
scroll is reported.
- **Known limit:** the scroll is sampled, not read atomically with the
text. A device that scrolls up and back between the two checks, with no
row added, can still pass one frame.

`server/conversation.ts` is in the remote PC bundle; per
docs/development.md only the release PR raises `REMOTE_BUNDLE_VERSION`
(release guards check it), so this PR leaves it at 38.
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