Skip to content

Capture fidelity states in every theme, measure a long transcript, and fix what they found (CF-8) - #301

Merged
BunsDev merged 5 commits into
mainfrom
cf8-machine-rows
Oct 18, 2026
Merged

BunsDev merged 5 commits into
mainfrom
cf8-machine-rows

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

CF-8's machine-only rows for tracker #273 (#281): reference captures in every theme at two sizes, and a long-transcript and log-stream measurement on a named Mac. The new checks found three defects, and this PR fixes each one, failing test first.

What it adds

  • Reference captures. e2e/conversation-fidelity.spec.ts captures the waiting, live, failed, completed and restored states in Graphite, Jev and OpenCoven, at 900×600 and 1440×900, and checks that none scrolls sideways. e2e/typed-turns.spec.ts captures its typed turn in each theme. The 33 images are in docs/screenshots/conversation-fidelity/, with a manifest of state, theme, viewport, scale, source commit and hash. They are fixture references, not provider screenshots or pixel baselines.
  • Measurement. e2e/transcript-measure.spec.ts opens a saved 200-turn, 1,400-item transcript and streams a 3 MiB command log from a fixture Codex app-server through the real backend, runner and IPC. MODEX_MEASURE=<file> writes the numbers. It asserts only bounds that hold on any machine: no streamed event exceeds the 256 KB preview, and opening a saved thread resends none of its items.

Defects found and fixed

Defect Owner Red Fix
Every thread resent all its items on first load, and main rewrote its file. Main compared settled items with a second parse of the same file, so every item looked changed. A 1,400-item cold open took 115–141 ms instead of ~70 ms. Bisected to #285 (8e26534 69–75 ms, fb76aac 122–128 ms). CF-6 #279 conversation-migration.test.ts: 7 item_updates with empty or unchanged patches for a thread with nothing to settle, and 10 instead of 3 for the dead-process case Compare against the parse the items came from
At 900×600 with the Review pane open, an approval card's long path and action row pushed Deny 160 px out of view CF-3 surface #276 waiting-graphite-900x600: no sideways scroll, received 160 (same in the live state) The question wraps anywhere; the actions wrap
The typed-turns theme test checked Graphite three times: settings:update saves the theme but the window applies it only on a refresh CF-4 #277 asserting the theme applied: expected jev, received graphite setTheme switches through Settings → Save and waits for the window

The fidelity fixture CLI also answers the thread-naming turn with a title. Before, it took the deny path and named the thread "Left the file as it was".

Measurements (MacBook Pro Mac15,9, M3 Max, 48 GB, macOS 26.7.1; 5 interleaved runs each; load average 52–58)

Before (89c98f2) After
Cold open of a 1,400-item transcript, median 69 ms 73 ms (115–141 ms on main before the settle fix)
Bytes sent to the window for a 3 MiB log 80.2 MB 0.66 MB
Main CPU during that stream, median 344 ms 240 ms

The full tables are in the acceptance review.

Checks

On 0fa93d3 (code) and 85489c2 (plus docs and captures), macOS 26.7.1, Node v24.18.1, pnpm 10.34.5:

  • pnpm build at the root: passed.
  • pnpm typecheck in apps/desktop: passed.
  • pnpm test in apps/desktop: 1,524 passed, 16 skipped, 0 failed; second stage 21 of 21.
  • e2e conversation-fidelity, typed-turns, transcript-measure: 11 of 11 passed (the captures came from this run).
  • e2e approvals, layout, event-journal, companion, conversation-evidence, task-to-notes, approval-policy: 31 of 31 passed.
  • Not run locally: the rest of pnpm test:e2e. CI runs it.

After rebasing onto ce75495 (#297, which also touched typed-turns.spec.ts), at 314749c: pnpm build passed, and e2e typed-turns, conversation-evidence, conversation-fidelity and transcript-measure passed 15 of 15.

Red first, as recorded in the table above: each new assertion failed for the reason stated before its fix.

Refs #281, #279, #277, #276. Tracker #273.

@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 18, 2026 3:45pm UTC

Request Review

…ange

Since CF-6's first half (#285), the first load of every thread compared its settled items
against a second parse of the same file. Objects from two parses are never identical, so every
item looked changed: main rewrote the thread file and sent one item_update per item to the
window, the journal and paired clients. On a 1,400-item transcript that made the first open
about 55 ms slower and wrote 1,400 journal rows when the journal was on.

Compare against the parse the items came from. Only items that a previous process left running
are saved and sent, with only the fields that changed.

Refs #279

Coven-Harness: Claude Code / claude-opus-5-5
…checked

The typed-turns theme test set each theme with settings:update over IPC. That saves the theme
but the window applies it only when its state refreshes, so the test checked Graphite three
times. Asserting that the theme applied failed on Jev ("graphite" received).

setTheme picks the theme in Settings → General, saves, and waits for the window to show it.
The three captures now differ, and they are taken at 1× CSS scale with animations stopped.

Refs #277

Coven-Harness: Claude Code / claude-opus-5-5
…arrow approval card

The fidelity spec now captures the waiting, completed, restored, failed and live states in
Graphite, Jev and OpenCoven, at the 900×600 minimum and at 1440×900, and checks that none
scrolls sideways. MODEX_SCREENSHOTS=<dir> keeps the images.

The check failed at 900×600 with the Review pane open: the transcript column is 319 px, and the
approval card's long path and action row pushed Deny 160 px off to the side. The card's question
now wraps anywhere and its actions wrap to a second line.

The fixture CLI also answers the thread-naming turn with a title, instead of taking the deny path
and naming the thread "Left the file as it was".

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
e2e/transcript-measure.spec.ts opens a saved 200-turn, 1,400-item transcript and times its first
(cold) and repeated opens in the renderer, and streams a 3 MiB command log from a fixture Codex
app-server through the real backend, runner and IPC. It counts the bytes main sends the window,
main's CPU time, and the renderer's long tasks. MODEX_MEASURE=<file> writes the numbers with the
machine's description.

It asserts only bounds that hold on any machine: no streamed event carries more than the 256 KB
preview, and opening a saved thread resends none of its items.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
… measurement

docs/screenshots/conversation-fidelity/ holds 33 captures from the two specs, with a manifest
that records each one's state, theme, viewport, scale, source commit and hash. They are fixture
references, not provider screenshots or pixel baselines.

The acceptance review records the measurement on a named Mac (M3 Max, macOS 26.7.1), before
the tracker (89c98f2) and after, and the three defects the new checks found. The two matrix rows
for themes and for long transcripts move from open to verified on this machine. The stray shell
lines at the end of the review are gone.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main f6976df cf8-machine-rows 314749c +/-
63% 63% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@BunsDev
BunsDev merged commit 844ae04 into main Oct 18, 2026
13 checks passed
@BunsDev
BunsDev deleted the cf8-machine-rows branch October 18, 2026 16:09
BunsDev added a commit that referenced this pull request Oct 18, 2026
Brings in #301 (CF-8) so #300 is up to date with main.

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
The merge is clean. #301's runner change reads stored items once when
settling on load; it is separate from CF-2's stop, drain and
withdrawal code.

Refs #275

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 18, 2026
Four cases in e2e/conversation-fidelity.spec.ts, through the real app:

- A native withdrawal: the Claude fixture takes its own request back (control_cancel_request).
  The card closes as withdrawn, no answer reaches the CLI, a late answer is refused, and the file
  is unchanged.
- The desktop and the phone answer at once, over the bridge and the companion's HTTPS. Exactly one
  is accepted, the CLI reads one decision, the card names who gave it, and the file matches the
  winner.
- With the journal on, a phone that loaded the open card reconnects after the desktop's decision.
  Its delta shows the card answered by the desktop and sent, its late answer is a 409, and every
  count stays at one.
- A clarifying question inside the path, from a codex-cli 0.163.0-shaped fixture: answered on its
  card, heard once, followed by a real edit and check, saved to Notes, and inert after a restart
  that re-runs nothing.

The fixture now counts every decision the CLI reads, so the earlier cases assert that too. The
golden path is marked slow: since #301 it also takes 18 reference captures and relaunches, and it
ran past 90 s on a Mac at load average 100.

These cases found the companion's 404 for threads started on the Mac, fixed in the CF-6 branch.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 19, 2026
Four cases in e2e/conversation-fidelity.spec.ts, through the real app:

- A native withdrawal: the Claude fixture takes its own request back (control_cancel_request).
  The card closes as withdrawn, no answer reaches the CLI, a late answer is refused, and the file
  is unchanged.
- The desktop and the phone answer at once, over the bridge and the companion's HTTPS. Exactly one
  is accepted, the CLI reads one decision, the card names who gave it, and the file matches the
  winner.
- With the journal on, a phone that loaded the open card reconnects after the desktop's decision.
  Its delta shows the card answered by the desktop and sent, its late answer is a 409, and every
  count stays at one.
- A clarifying question inside the path, from a codex-cli 0.163.0-shaped fixture: answered on its
  card, heard once, followed by a real edit and check, saved to Notes, and inert after a restart
  that re-runs nothing.

The fixture now counts every decision the CLI reads, so the earlier cases assert that too. The
golden path is marked slow: since #301 it also takes 18 reference captures and relaunches, and it
ran past 90 s on a Mac at load average 100.

These cases found the companion's 404 for threads started on the Mac, fixed in the CF-6 branch.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 19, 2026
…nts at once, reconnect, a clarifying question (CF-8) (#313)

* Add the request variants to the fidelity path

Four cases in e2e/conversation-fidelity.spec.ts, through the real app:

- A native withdrawal: the Claude fixture takes its own request back (control_cancel_request).
  The card closes as withdrawn, no answer reaches the CLI, a late answer is refused, and the file
  is unchanged.
- The desktop and the phone answer at once, over the bridge and the companion's HTTPS. Exactly one
  is accepted, the CLI reads one decision, the card names who gave it, and the file matches the
  winner.
- With the journal on, a phone that loaded the open card reconnects after the desktop's decision.
  Its delta shows the card answered by the desktop and sent, its late answer is a 409, and every
  count stays at one.
- A clarifying question inside the path, from a codex-cli 0.163.0-shaped fixture: answered on its
  card, heard once, followed by a real edit and check, saved to Notes, and inert after a restart
  that re-runs nothing.

The fixture now counts every decision the CLI reads, so the earlier cases assert that too. The
golden path is marked slow: since #301 it also takes 18 reference captures and relaunches, and it
ran past 90 s on a Mac at load average 100.

These cases found the companion's 404 for threads started on the Mac, fixed in the CF-6 branch.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5

* Record the request variants in the acceptance receipt

The matrix rows for a clarifying question, a native withdrawal, simultaneous answers and a
reconnect after a decision move from open to verified with a fixture, with what each case asserts.
The defects list adds the companion's 404 for threads started on the Mac. The fidelity summary gains
rows for questions and approvals.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5

* Record CF-8's request variants in status

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5

* Record the landed children in the acceptance receipt

CF-2 (#286), CF-3 (#293), CF-4's Markdown slice (#283), CF-6's request half (#308) and CF-7's
clarifications (#312) are on main, with their merge commits. The candidate note says the fixture
rows now run on main, and no candidate is pinned while the live-provider and human gates stay open.

Refs #281

Coven-Harness: Claude Code / claude-opus-5-5
BunsDev added a commit that referenced this pull request Oct 20, 2026
…, lands #295) (#333)

* Preserve typed conversation fidelity and streaming reader state (CF-4)

Lands #295, which another session wrote, onto current main. It was
stacked on #283's pre-squash history and had sat for a day with
conflicts. This applies #295's own net change, 74833f7..dad15cd (its
commits cce0a40, 00576be, c974d0f and dad15cd), and resolves the
conflicts against what has landed since.

From #295: typed records take their final answer only from the CLI's
own final phase, never by position; failed, denied, stopped and unknown
messages and reasoning stay visible, including after a retry; reasoning
summaries keep their label while streaming; a streaming reply keeps its
code controls, focus and selection; and returning to a thread restores
its expansion and scroll position for the session. Its verification
record is in docs/reviews/2026-10-18-cf4-completion/.

Resolutions:
- TurnContent keeps main's footer and #295's remembered expansion.
- ThreadView keeps both import additions.
- turn-layout keeps both new tests.
- typed-turns.spec keeps main's version (setTheme, and the
  expanded-turn check from #301). #295's selectTheme duplicated
  setTheme, so conversation-rendering.spec now uses setTheme and the
  duplicate is gone.
- status.md takes #295's corrected streaming sentence and lists the
  change under On main, unreleased, not In flight.

Supersedes #295. Part of #277, tracker #273.

Coven-Harness: Claude Code / claude-opus-5-5

* Keep Claude's last reply as its answer; only a phase-typed turn needs an explicit final

#295 made every typed turn answer only with an explicit final message.
That fixed a real case: a Codex turn of partial answers
(codex-cli 0.163.0's partial_answer, stored as unspecified) could make
its last partial the final answer by position. It also removed CF-1's
documented fallback for a CLI that reports no message phase at all.
Claude Code then never showed a final answer, and CF-8's golden path
failed waiting for one.

finalAnswerIndex now treats a turn as typed when any message carries a
final or commentary phase, or any native phase the CLI sent. Such a
turn answers only with an explicit final. A turn whose CLI reports no
phase (Claude, old history, older Codex models) keeps the last reply,
and layoutTurn uses this rule again for the latest attempt.

Tests: a Claude turn answers with its last reply (red against #295's
rule: final -1, expected 2), and a Codex partial-answer turn never
invents one. turn-layout and conversation-events pass 39/39. The golden
path, typed-turns, conversation-rendering and conversation-continuity
specs pass 22/22.

Coven-Harness: Claude Code / claude-opus-5-5

* Restore main's fold expectations for the phase-less offline mock

#295 rewrote app, approvals, layout and routines specs for its
explicit-final-only rule. For example: "The scripted adapter reports an
unspecified phase. Do not invent a final answer by position: its
successful work remains visible." The offline mock reports no message
phase, so with CF-1's fallback restored (0532b8b) its last reply is the
answer again and its finished work folds, as on main. CI failed nine of
these tests on 0532b8b ("Expected: 0, Received: 1" final answers).

These four specs are main's versions again. Locally, app, approvals,
layout, routines, conversation-fidelity and typed-turns pass 50/50.

Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — 314749c2 Deployed Oct 18, 2026 by vercel[bot]
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