Skip to content

feat(cli): replace start/complete event journal with in-place phase-matrix (#672) - #682

Merged
admarble merged 3 commits into
mainfrom
feature/672-feat-cli-replace-start-complete-event-journal-with
May 31, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/672-feat-cli-replace-start-complete-event-journal-with

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Drops the TTYRenderer ▸ #N phase start scrollback line that duplicated the live-zone "running" cell; only terminal transitions (✔ complete / ✘ failed) remain.
  • Seeds planned phases as in-place cells (name –) at registration via a new IssueRegistration.plannedPhases field and RunRenderer.setPhasePlan(issue, phases) method, wired from batch-executor after the final pipeline is resolved.
  • NonTTYRenderer journal unchanged; CI scrollback stays the durable run record.

Acceptance criteria

  • AC-1 Drop ▸ start journal line from TTYRenderer — TTYRenderer.appendEventLine returns early on start.
  • AC-2 Show full phase pipeline upfront via plannedPhases + setPhasePlan; new PhasePlanCallback plumbed run.ts → orchestrator → batch-executor.
  • AC-3 Per-issue cells transition pending → running → ✔/✘ in statusSubLines; failed state also renders cells.
  • AC-4 Run log (.sequant/logs/run-*.json) is the system-of-record for ordered phase history (integration test covers TTY/CI parity, ms precision, failures, and concurrent writers).
  • AC-5 NonTTYRenderer journal unchanged.
  • AC-6 clearCalls reduced by 50% vs the captured baseline of 12 (well above the ≥30% target), measured via TTYTestStub.clearCalls.

Test plan

  • npm test -- src/lib/cli-ui/run-renderer-672.test.ts — 20 new unit tests covering AC-1/2/3/5/6.
  • npm test -- __tests__/integration/run-log-phase-history-672.integration.test.ts — 6 integration tests covering AC-4.
  • npm run build, npm run lint, npx vitest run src/lib/cli-ui/ — all green; existing feat(cli): run renderer follow-ups — frame stability, attempt counter, summary teardown (#618 follow-up) #624 tests updated to surface (attempt N/M) via failure lines / live-frame loop N/M (the dropped ▸ start line previously carried it).
  • Side-effect: the #647 scrollback-harness AC-2 it.fails regression now passes (fewer redraws = smaller blast radius for paint corruption) and was flipped to a permanent regression guard.

Closes #672

…atrix (#672)

Drop the TTYRenderer `▸ start` scrollback line and seed planned phases as
in-place cells that transition pending → running → ✔/✘. The live zone now
shows the full pipeline upfront instead of streaming each phase as it begins.

AC-1: TTYRenderer.appendEventLine returns early for start events.
AC-2: IssueRegistration.plannedPhases + RunRenderer.setPhasePlan; wired from
      batch-executor via a new PhasePlanCallback fired after phase resolution.
AC-3: statusSubLines renders pending cells as `name –` and includes failed
      state so the failing cell shows ✘ in place rather than collapsing.
AC-4: Run log (.sequant/logs/run-*.json) is the system-of-record for ordered
      phase history with start/end timestamps — integration test covers both
      TTY and non-TTY paths, concurrent runs, failures, and ms precision.
AC-5: NonTTYRenderer unchanged — CI scrollback is the durable run record.
AC-6: clearCalls reduced ≥30% vs baseline (8 events × 1 clear → 4 clears for
      the same 2-issue scenario). Side-effect: the #647 scrollback-harness
      AC-2 regression is now green and `it.fails` flips to a permanent guard.

Existing #624 tests that asserted on `(attempt N/M)` in the TTY `▸ start`
journal line surface the counter via the live frame `loop N/M` header or
the still-emitted `✘ failed (attempt N/M)` line instead.

Entire-Checkpoint: 1dd882f474c5
admarble added 2 commits May 30, 2026 13:32
Resolves QA §10a gate that demoted the PR to AC_MET_BUT_NOT_A_PLUS.
Uses the QA-drafted entry verbatim.

Entire-Checkpoint: 8b862eada978
QA follow-up addressing two gaps found in second-look review:

- AC-6 test was tautological: BASELINE was inflated to 12, making the
  threshold floor(12*0.7)=8 equal to the true pre-#672 value (8), so the
  assertion passed even on un-refactored code. Use the real baseline (8),
  threshold floor(8*0.7)=5 (observed=4), plus a guard asserting the
  threshold sits strictly below baseline so a regression to 8 fails.

- plannedPhases registration path was dead from production: the only
  registerIssue call site never passed it, so AC-2's upfront roadmap only
  appeared for the active issue (queued issues stayed blank until they
  ran). Wire resolved.config.phases through buildProgressWiring so explicit
  -phase mode seeds every issue's roadmap at registration, matching the
  multi-row matrix mock-up. Auto-detect mode still defers to setPhasePlan.
@admarble
admarble merged commit cf60623 into main May 31, 2026
4 checks passed
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): replace start/complete event journal with in-place phase-matrix

1 participant