Skip to content

feat(cli): wire live phase-matrix renderer into sequant ready (#697) - #698

Merged
admarble merged 1 commit into
mainfrom
feature/697-feat-cli-sequant-ready-wire-live-phase-matrix-rend
Jun 2, 2026
Merged

admarble merged 1 commit into
mainfrom
feature/697-feat-cli-sequant-ready-wire-live-phase-matrix-rend

Conversation

@admarble

@admarble admarble commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

sequant ready previously printed a static header, ran the full-weight qa → loop → qa gate in silence, then printed the final report — no live feedback while a multi-minute gate ran. This wires run's shared RunRenderer (#618) into ready via buildProgressWiring, so ready now shows the same in-place phase cells + spinner as sequant run.

What changed

  • --json-safe — the renderer is only built on the non-JSON path, so piped JSON output is never corrupted.
  • Dynamic phase streaming (no fixed seed) — the gate's pipeline is 1–N qa/loop passes, so a seeded plan would leave a stuck-pending loop cell when the gate stops after the first qa.
  • ready-gate emits optional onProgress (start/complete/failed) around each phase, carrying the 1-based QA-pass iteration so the renderer shows loop N/M. Optional, so injected unit tests are unaffected.
  • Clean teardown on every exit path (happy / error / before report print) + a SIGINT handler mirroring run.ts.
  • --verbose streaming pauses/resumes the live zone (renderer as PhasePauseHandle) instead of double-rendering.

Verification

  • tsc --noEmit clean
  • vitest run src/commands/ready.test.ts src/lib/workflow/ready-gate.test.ts → 38 passed (211 new lines of ready tests, 81 new lines of gate tests)

Follow-up

A separate issue tracks upgrading ready to the boxed Ink TUI (--experimental-tui style) and hardening that TUI for large batches (row cap, frame-height clamp, scrollback transcript) before it can become the sequant run default.

Closes #697

🤖 Generated with Claude Code

`sequant ready` previously printed a static header, ran the full-weight
qa → loop → qa gate in silence, then printed the final report — no live
feedback while a multi-minute gate ran. Reuse `run`'s shared RunRenderer
(#618) via `buildProgressWiring` so `ready` shows the same in-place phase
cells + spinner as `sequant run`.

- `--json`-safe: the renderer is only built on the non-JSON path, so piped
  JSON output is never corrupted.
- Dynamic phase streaming (no fixed seed): the gate's pipeline length is
  1–N qa/loop passes, so a seeded plan would leave a stuck-pending `loop`
  cell when the gate stops after the first qa.
- ready-gate emits optional `onProgress` (start/complete/failed) around each
  phase, carrying the 1-based QA-pass iteration so the renderer shows
  `loop N/M`. Optional — injected unit tests are unaffected.
- Clean teardown on every exit path (happy / error / before report print),
  plus a SIGINT handler mirroring run.ts.
- `--verbose` streaming pauses/resumes the live zone via the renderer as
  PhasePauseHandle instead of double-rendering.

Entire-Checkpoint: 4d40a837b383
@admarble
admarble merged commit 88e235d into main Jun 2, 2026
4 checks passed
admarble added a commit that referenced this pull request Sep 9, 2026
#699's TTY path supersedes #698's plain-renderer wiring in ready.ts.
Bringing in the onProgress hook (RunReadyGateOptions.onProgress) that
ready.ts/ready-gate.ts need before swapping the plain RunRenderer for the Ink TUI.
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.

feat(cli): sequant ready — wire live phase-matrix renderer (parity with sequant run)

1 participant