Repository navigation
Description
Goal
Capture a fresh HITL terminal recording that reproduces #655 Symptom A (✔ #5loop mid-string char drop + U+FFFD overlay), under the post-#664 / post-#667 baseline. The previous capture (2026-05-17) is no longer diagnostic because both known wire-amplifiers have been removed since.
Why a fresh capture is needed
Two amplifiers that polluted the 2026-05-17 terminal.typescript have since been fixed:
| Fix | What it changed |
|---|---|
| #664 / PR #665 | SEQUANT_DEBUG_RENDERER now writes to a file sink (.sequant/debug-renderer.jsonl), not stderr. The 2026-05-17 capture's 2,171 spurious SEQUANT WORKFLOW · lines were the stderr instrumentation co-writing to the pty — they're gone now. |
| #647 / PR #667 | All 10 unbracketed console.log sites in phase-executor.ts retry paths + 2 batch-boundary sites in RunOrchestrator.run now route through PhasePauseHandle.appendNotice. Mechanism #2-class duplicate-header leaks from those callsites are eliminated. |
Net: any Symptom A signal in a fresh capture is now isolated from the duplicate-header noise that drowned it out before. Synthetic-harness work (PR #657, #663) confirmed the symptom is NOT reproducible without real-terminal byte semantics — only an HITL capture can move this.
Capture command
DAY=$(date +%Y-%m-%d)
DIR=docs/incidents/655/captures/$DAY
mkdir -p "$DIR"
# Absolute path so the override survives the subprocess's cwd.
DEBUG_FILE="$(pwd)/$DIR/debug-renderer.jsonl"
SEQUANT_DEBUG_RENDERER=1 \
SEQUANT_DEBUG_RENDERER_FILE="$DEBUG_FILE" \
script -q "$DIR/terminal.typescript" \
npx sequant run <issue-or-pair> --max-iterations 1Flag notes:
-qis now--quiet(fix(cli): -q is short for --quality-loop, not --quiet — silently bypasses quiet-mode rendering #658). Omit-qunless specifically testing quiet-mode rendering — Symptom A appears in non-quiet runs too.--max-iterations 1only applies under-Q/--quality-loop. Drop it for a single-pass run.- Debug output goes to the file sink (no longer
2> debug.jsonl).
Target scenarios (in order of fidelity)
Symptom A's signature is a complete event line and a failed event line for the same issue+phase overlaid on the same row. Need a run where:
- An issue completes a phase then fails the next iteration of the same phase — closest fit to the original transcript (e.g.,
loopphase that succeeds then fails on retry). Cost: ~10–20 min real time. - Resize-stress version of (1) — same scenario, resize the terminal mid-run to trigger SIGWINCH redraw races.
- Parallel pair with one issue retrying — broader stress, lower fidelity to the specific symptom shape.
Capture metadata (fill in after the run)
| Field | Value |
|---|---|
| Date / time UTC | <YYYY-MM-DDTHH:MM:SSZ> |
| Terminal app | <iTerm2 / Terminal.app / VS Code / Warp / …> |
$COLUMNS × $LINES at run start |
<cols> × <rows> |
Node version (node --version) |
<vXX.X.X> |
sequant version (npx sequant --version) |
<x.y.z> |
| Run command (exact) | <paste> |
| Issues fed | <#NNN[, #MMM]> |
| Wall-clock duration | <Xm Ys> |
wc -l terminal.typescript |
<lines> |
wc -l debug-renderer.jsonl |
<lines> |
grep -c "SEQUANT_DEBUG_RENDERER" terminal.typescript |
should be 0 (sanity: file sink active) |
| Symptom A observed? | yes / no / inconclusive |
Acceptance criteria
-
terminal.typescript,debug-renderer.jsonl, and a populatednotes.md(template above) committed todocs/incidents/655/captures/<DAY>/. - If symptom fires: at least one row in
terminal.typescriptcontains both a✔-marker substring and anerror resultsubstring (the Symptom A signature, machine-detectable viagrep '✔.*error result' terminal.typescript). - If symptom does not fire after 3 attempts: document the non-reproducing conditions in
notes.mdso the next attempt can vary the right axis (terminal, width, parallelism, phase mix).
What this unblocks
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 AC-1 (mechanism diagnosis): byte-level pattern from the capture identifies the actual writer race (post-amplifier-fix).
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 AC-2 (regression test): if reproducible, the capture becomes the fixture for a deterministic VT-replay test.
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 AC-3 (harness extension): new VT-replay harness pattern to drive future renderer bugs.
- investigate(cli): #652 renderer corruption — column-mismatch hypothesis refuted, real cause unknown #655 AC-4 (fix): mechanism-targeted fix once AC-1 lands.
Out of scope
- The duplicate-header regression (closed by fix(#647): AC-3 — route retry/fallback messages through renderer's appendNotice #667).
- Symptom B (U+FFFD in summary table) — already bundled into fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647 and addressed by the AC-3 + file-sink combo.
- Fixing anything in this issue — this is evidence-gathering only.
Parent: #655. Do not run /fullsolve on #655 until a capture lands here — autonomous loops without new evidence reproduce the negative-result pattern from #657.
Activity
admarble commentedon May 30, 2026
Capture delivered:
docs/incidents/655/captures/2026-05-28/(PR #673), run on two emulators (stale VS Code + fresh iTerm2). Byte stream clean on both → renderer exonerated. Full diagnosis on #655 (#655#issuecomment-4583151994). Robustness follow-up: #672.admarble commentedon May 30, 2026
QA Review — PR #673 (closes #668, satisfies #655 AC-1)
Type: Documentation / forensic-evidence landing (5 files, +9,440, −0). No code paths touched. Branch in sync with origin, 0 behind main.
AC Coverage
notes.mdcommitted underdocs/incidents/655/captures/<DAY>/notes.md.✔anderror resultgrep '✔.*error result'= 0/0 — symptom absent from byte stream.notes.mdidentifies the cause with byte evidence + a concrete confirming test.SEQUANT_DEBUG_RENDERER=1trace from a corrupted runsequant run 593 627on hostmatcha-maps; live corruption on VS Code; trace captured.Evidence Verification (independently reproduced)
Every quantitative claim in
notes.mdre-run against the committed artifacts — all match exactly:(no commi─/coatchaoverlay(no commit… │)ESC[1A/ESC[2KESC[?2026h/lsync pairsrendererCols != stdoutColslogicalLines > rendererRowslogicalLinesExtra checks: #668 file-sink sanity —
SEQUANT_DEBUG_RENDERERlines interminal.typescript= 0/0 (post-#664 file sink confirmed active). Secret scan (sk-ant-/ghp_/github_pat_/AKIA/Bearer/api_key) — clean across all 4 capture files; safe to publish.CI Status
build (22.x),typecheck,validate-skills,validate-plugin→ SUCCESS.build (20.x)IN_PROGRESS — informational only: this is a.md/.jsonl/.typescript-only diff (nopackage.json/lockfile/tsconfig/config/workflow), so it cannot affect the build matrix, andbuild (22.x)already passed. Not gating (markdown-only CI relaxation).Review
Strengths: Exemplary forensic rigor — every assertion is a reproducible byte/grep count, all verified with zero discrepancies. Correctly scoped: lands evidence + diagnosis, defers robustness work to #672, does not prematurely close #655. The "environmental, not a code bug" conclusion is appropriately hedged with an explicit pending cold-restart confirming test.
Minor (non-blocking, being addressed):
notes.mdomitted a few #668 metadata-table fields (UTC,sequant --version, wall-clock,wc -l) — added in a follow-up commit. AC-3's literal "after 3 attempts" superseded by a definitive byte-level cause identification.Risk Assessment
notes.mdguards against this explicitly.Verdict: READY_FOR_MERGE
All applicable ACs MET; conditional AC-2 correctly N/A; every diagnostic claim independently reproduces; bytes are secret-free. Only pending CI check is an informational redundant build-matrix entry on a docs-only diff.
Next: After merge, run the pending cold-restart-VS-Code confirming test → close #655 as environmental or reopen; track robustness via #672.
docs(#668): add capture metadata table to notes.md
docs(#655): HITL capture — renderer emits clean bytes, corruption is …