Repository navigation
Description
Summary
A separate corruption class from #655's complete[0:8] + failed[9:] byte-math overlay (Symptom A). Captured in the #647 AC-1 production replay (docs/incidents/647/captures/2026-05-17/terminal.typescript).
The renderer's repeated SEQUANT WORKFLOW · #N · Xs elapsed header line — written once per second by the 1Hz redraw — intermittently lands in scrollback with characters elided mid-string or replaced by U+FFFD (�). Pattern is non-deterministic across the 2,181 header lines in the capture but consistent in shape.
Evidence
From docs/incidents/647/captures/2026-05-17/terminal.typescript, sampled across the 36m run:
SEQUANT WORKFLOW · #658 · 31s elapsed # "28m" elided from cols ~25-27
SEQUANT WORKFLOW · 8 · 29m 19s elapsed # "#65" elided
SEQUANT WORW · #658 · 35m 7s elapsed # "KFLO" elided mid-WORKFLOW
SEQUANT WORKFLW · #658 · 34m 43s elapsed # "O" elided
SEQUANT WORKFLOW · #658 · 32m 41s eled # "aps" elided from "elapsed"
SEQUANT WORKFLOW · #658 · 33m 5s eed # "elaps" elided
SEQUANT WORKFLOW · #65 34m 19s elapsed # "8 ·" elided
SEQUANT WORKFLOW �#658 · 28m 55s elapsed # U+FFFD where "·" should be
SEQUANT WORKFLOW · #658 · 31m 50s elapUANT WORKFLOW · #658 · 31m 55s elapsed # two header lines smashed together
Differences from #655 Symptom A
| #655 Symptom A | This issue (Symptom 2) | |
|---|---|---|
| Byte math | complete[0:8] + failed[col 9+] overlay |
Single-char or short-run mid-string drops; U+FFFD substitution |
| Source events | Two distinct event-line writes (complete then failed) | Single event-line write that lands corrupted |
| Glyph | ✔ (from complete) followed by error text (from failed) |
The string itself loses bytes |
| Reproduction | Not in the #647 AC-1 capture | Confirmed reproducing in the #647 AC-1 capture |
Likely shared root cause with #647 Mechanism #1
Both symptoms share the property "renderer output corrupted under the redraw + scrollback regime." Plausible mechanisms:
- UTF-8 byte truncation at non-codepoint boundaries when
log-update'seraseLinesruns against a partially-flushed prior frame. - Terminal-emulator-side rendering glitch when the 1Hz redraw races with the OS-level pty buffer flushing.
- Stderr co-writer interleaving (the AC-1 instrumentation writes to stderr; under
script(1)both streams merge, creating opportunities for races — though the corruption was already present in pre-instrumentation transcripts).
Discriminating these requires a capture without script(1) wrapping, so the stderr stream can be isolated. See docs/incidents/647/captures/2026-05-17/notes.md "Caveat — script wrapper interference".
Acceptance criteria
- Reproduce Symptom 2 without
script(1)wrapping — confirm whether stderr co-writer is required for it to fire. - Identify the responsible code path with byte-level evidence (likely shared with fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647 Mechanism feat: Complete remaining v1.0 features (AC-10, AC-13, AC-14) #1, but verify).
- Regression test that fires on the current corruption mechanism and passes after the fix.
- Fix — either bundled with fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647 AC-3 if shared root cause, or independent.
Out of scope
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 Symptom A (
complete[0:8] + failed[9:]byte-math overlay) — distinct. - The pause/resume dead-code path — fixed in fix(#656): wire renderer pause/resume into phase execution #659 / fix(cli): renderer pause/resume is dead code — batch-executor never passes spinner argument #656.
Related
- fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647 — duplicate-header bug. Mechanism feat: Complete remaining v1.0 features (AC-10, AC-13, AC-14) #1 confirmed in the same capture. Symptom 2 likely shares root cause.
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 — byte-math Symptom A. Distinct symptom, possibly same renderer-corruption family.
- fix(cli): renderer bottom-output corruption — ✔ #5loop missing chars + U+FFFD in summary separator #652 — closed (umbrella superseded by fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647/investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655/this).
Activity
admarble commentedon May 17, 2026
Bundling with #647 — both Mechanism #1 (duplicate headers in scrollback) and Symptom 2 (mid-string char drops + U+FFFD on header redraws) appear in the same
docs/incidents/647/captures/2026-05-17/terminal.typescriptcapture and most likely share a single root cause (renderer redraw race + log-update scrollback erasure semantics under continuous 1Hz repaint).If AC-3 of #647 lands and Symptom 2 persists, this can be reopened with the post-fix capture as evidence.
test(#647): AC-1 re-analysed — Mechanism #1 was wire traffic, not scr…