Files
orca/src
Neil 9be71d0b6d test: retire native-chat cases their fixtures or predicates neutralize (#23968)
* test: retire native-chat and sidebar cases their fixtures or predicates neutralize

Semantic sweep of renderer sidebar, right-sidebar and native-chat. 10 cases
removed across 6 files; one test-only production re-export removed.

Two new shapes here, both of which make a case unable to fail:

A fixture that neutralizes its own variation. `NativeChatNoticeRow`'s
`old-reader compatibility` table had six rows, but the test's own
`oldStatusSchema.omit({tone, presentation})` strips the metadata being varied, so
all six render the identical body `{kind:'status', text:'…'}`. Its
schema-acceptance half is owned case-for-case at
`agent-session-journal-schemas.test.ts:310-318`.

A fixture that makes the distinction its name claims impossible. "Counts a new
turn from its stamp, not a row held open by background work" set `turnStartedAt`
and `mainAgent.stateStartedAt` to the same `now - 5_000`, so it could not tell the
two links apart; `native-chat-terminal-turn.test.ts:75` owns the real version.

Also removed: two cases varying `stateHistory`, which no native-chat production
file reads (`NativeChatHookTurnEntry` omits it); the `agent-session` row of a
transport table whose guard is `valueSource === 'dispatched' && transport ===
'catalog'`, so under `reported` the transport is never consulted — the `catalog`
row stays as the only test of the non-dispatched arm; `openclaude` from an
`it.each` where the only agent test on that path is `args.agent === 'codex'`, so
both agents take the identical arm.

Production change: `NativeChatMessageList.tsx` no longer re-exports
`ProviderFrameRow`. That export existed only for
`NativeChatMessageList.provider-frame.test.tsx`; both production callers
(`NativeChatNoticeRow.tsx:9`, `NativeChatMessageRow.tsx:24`) already import it
from `NativeChatTranscriptChrome` directly, so the test now does too.

Kept where the call site differs though the assertions match: a dispatched-pill
tooltip case and a transport-hedge case hit `NativeChatSessionOptionPickers.tsx:278`
(model pill) versus `:302` (options pill). Kept as live branches: the
`lifecycle === null || lifecycle === 'published'` disjuncts, the four distinct
wirings in `native-chat-reader-scroll-input.ts:33-46`, and a ring case that is the
only one reaching the module's own keydown listener, because the sibling's click
path already runs `dropPendingHover`.

* test: delete the assembler/id-merge differential, which cannot fail

Reverses my own restore of `native-chat-assembler-merge-parity.test.ts`. I kept it
believing it was a live cross-implementation differential oracle; it is not.

`native-chat-session-assembler.ts:233` documents the gate: the `turnKey` fallback
"only merges a candidate against an existing message of a DIFFERENT source (#10)".
The test passes `sources: { transcript }` — a single source — so that fallback is
gated off, the assembler reduces to id-dedup-and-append, and it equals the mobile
id-only merge by construction. The assertion is identity === identity.

Both contracts it nominally covered are owned directly, by tests asserting concrete
values rather than comparing two implementations that degenerate to the same
operation: identical same-source prompts surviving at
`native-chat-session-assembler.test.ts:328` and `:354` (both citing #10), and
id-append order at `mobile/src/session/mobile-native-chat-merge.test.ts:18`.

The lesson generalizes: a differential is only worth keeping if the two
implementations can actually diverge on the fixture used. Check that the fixture
reaches the code that differs.
2026-09-29 18:59:45 -07:00
..