Skip to content

P5 O7 M10 follow-up: a thinking block measured from its own start, no figure under a second - #482

Merged
SSFSKIM merged 6 commits into
masterfrom
p5-o7-m10-thinking
Nov 5, 2026
Merged

SSFSKIM merged 6 commits into
masterfrom
p5-o7-m10-thinking

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Nov 5, 2026

Copy link
Copy Markdown
Owner

P5 O7 M10's follow-up, C at the re-check: the owner's MAWS-run session showed "Thought for 0s" under Internal activity, after the swap to master 01c0b23. A thinking block is now measured from its own start, and no figure is shown under a second.

The cause

On claude-opus-5-5, a thinking block's content_block_start arrives 0.2 to 2.9 s before its text. The text then comes as one delta, or a burst of them, just before content_block_stop. In 10 of the 15 opus-5-5 thinking blocks in spikes/protocol-probe/fixtures/, the burst falls within 1 to 23 ms of the stop.

The engine host's normaliser emitted nothing at content_block_start, so a thinking row's marker and at were its first delta. derive.ts (completedAt - at) therefore measured only the burst, and duration() floored it to "0s". The live row appeared only at that first delta.

Two other explanations were ruled out:

  • Replay. RL2 carries B's engine-host at unchanged. Disk and reseeded history have no deltas, so their rows read "Thought".
  • A W1 gap. The rows had text: CellLine always draws its chevron.

The fix (the architect's ruling)

  1. The engine host marks the block's start. The normaliser (streamEvent, content_block_start) emits a thinking block's start as an assistant.block.delta with thinkingDelta: ''. That is the existing shape, so the wire and RL2 are unchanged.
    • A redacted_thinking block, and every other kind, starts silently.
    • Hook-made and reseeded messages are skipped, as their deltas are.
    • The row is drawn and measured from the block's own start, as the CLI's timer is.
    • A textless block shows a plain live label while it streams and has no row once it closes (W1).
    • The digest reads Thinking from the block's start.
  2. No figure under a second. thinkingLabel reads "Thought" under 1 s. It uses one threshold, SHORTEST_FIGURE_MS, shared with the turn divider's "Working". This covers peers on older engine hosts, and lane A.

The re-check rides on a later swap, since the MacBook's and the mini's engine hosts get part 1 only from a new build.

Validation Evidence

  • Red first, on the owner's path. src/renderer/src/transcript/model/thinking-duration.test.ts runs the recorded opus-5-5 frames (MAWS-run, lane B) through the normaliser (journalToEvents), the reducer and derive. Run alone with npx vitest run --project renderer <file>.
    • Before the fix: 3 of 3 failed. p4-tool-summaries-thinking-edits read Thought for 0s where Thought for 2s is expected; p4-r7-loss-stages read Thought for 0s where Thought is expected; the textless block's live row was missing.
    • After the fix: Tests 4 passed (4). This adds the case that the block keeps its place before the answer.
    • With part 2 alone (before part 1): 2 still failed. The no-"0s" case passed.
  • src/engine-host/normalizer.test.ts (--project node): red with 2 failed (the new case, and the existing pairing case's delta count); green with Tests 71 passed (71).
  • src/services/sessions/digest.test.ts (--project node), on p4-r7-loss-stages: against master's normaliser, Thinking wasn't read at seq 194 (1 failed | 45 passed). With the fix, Tests 46 passed (46).
  • src/renderer/src/transcript/model/copy.test.ts: red with 1 failed | 45 passed (46); green with 46 passed (46). The divider's "Working" is unchanged.
  • Regenerated after the deliberate change. Every diff was inspected: thinking rows start a few ms earlier, "Thought for 0s" reads "Thought", there is one empty thinking delta per streamed thinking block, and agents-cron's synthesised times and ids shift.
    • The presentation snapshots (snapshots.test.ts -u, 16 files).
    • The agents and panel-child event fixtures (MAWS_WRITE_AGENTS_FIXTURES=1, MAWS_WRITE_PANEL_CHILD=1).
  • The journal-paging case in session-stream.test.ts now asserts that each row is read at most once. Its old exact count assumed where the ring boundary falls, and that boundary moves with the events a row yields.
  • eslint is clean on each touched source file, one at a time.
  • CI:
    • --gates all on 7091212: run 42013363487. 53 jobs succeeded with no flaky passes, e2e:remote, e2e:transcript and e2e:lane-a among them. Two failed:

      • unit 3/4: the agents-cron presentation snapshot, which follows its regenerated fixture. It was regenerated in f25855c.
      • packaged 2/2: presentations-comments.spec.ts:248 (the pin popover's reply focus).
    • --gates static,unit,packaged on f25855c: run 42022352182. Static and all four unit shards succeeded, as did packaged 1/2. Packaged 2/2 failed on a different spec, render-host.spec.ts:442 (a drag's held button), which had passed in the run before.

      Neither packaged spec touches the transcript or thinking. Each failed in one run and passed in the other.

    • --gates packaged on f25855c: run 42026197040, success: both packaged shards green.

  • Review. reviewer-medium on b7e7d95..cf74053 found it correct, with no material findings.

Residue

  • Lane A's live thinking label starts at the bridge's first thinking chunk. Exit: the engine's hook contract types a block's start. The hook contract hands content_block_start to a hook as an opaque engine chunk with no block type (sminos's TurnStepEngineChunk), so the bridge first sees a thinking block at its first thinking_delta. Lane A gets part 2 only.
  • Hosted packaged e2e failures on a tree that touches only the transcript and the normaliser, each green in the other run: presentations-comments.spec.ts:248 (the reply field not focused) and render-host.spec.ts:442 (a drag's moves without the held left button). They belong with the hosted-Mac flake row (docs/tech-debt-tracker.md, 2026-10-28, CI-opt).

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

…ght", no figure, by the turn divider's threshold (SHORTEST_FIGURE_MS); "Thought for 0s" said nothing (P5 O7 M10's follow-up, C at the re-check, part 2)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ts content_block_start, so MAWS draws and measures it from the block's own start; on claude-opus-5-5 the text arrives in one burst just before the block's end, seconds later, and a row measured from its first delta read "Thought for 0s" (P5 O7 M10's follow-up, C at the re-check, part 1; proved on the recorded opus-5-5 frames through the normaliser, reducer and derive)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…he proofs in the spec's Decision Log

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…the agents and panel-child event fixtures regenerated (thinking rows start at their block's start, a few ms earlier; "Thought for 0s" reads "Thought"; one empty thinking delta per streamed thinking block); the digest's proof moves to the node project (static: the renderer project can't import services); the journal-paging case reads each row at most once, its ring boundary moving with the events a row yields

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…the review

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…ture (times and ids shift with the inserted thinking starts)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T12:50:23.179063Z f25855c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

SSFSKIM added a commit that referenced this pull request Nov 5, 2026
…s start) landed (DL 222); O7's Outcomes addendum, two tracker rows

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
@SSFSKIM
SSFSKIM merged commit 5c22d0c into master Nov 5, 2026
@SSFSKIM
SSFSKIM deleted the p5-o7-m10-thinking branch November 5, 2026 12:56
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