Repository navigation
Closed
Labels
cliCLI commands and interfaceenhancementNew feature or requestplannedImplementation plan approvedready-for-reviewReady for code review
Description
Problem
In -q mode, the gap between ▸ #551 exec and ✔ #551 exec 17m 20s is a single 17-minute silent window. During that window there is no way to distinguish "agent is working" from "process is hung" without ps/lsof/state.json archaeology.
Motivating session (real, 2026-05-03)
$ npx sequant run 551 559 -q
SEQUANT WORKFLOW
...
▸ #551 spec
▸ #559 spec
✔ #559 spec 3m 48s
▸ #559 exec
✔ #551 spec 4m 3s
▸ #551 exec
✖ #551 exec
▸ #551 loop
✔ #551 loop 1m 3s
▸ #551 exec ← 17 minutes of silence here
✔ #559 exec 10m 18s
▸ #559 qa
✔ #559 qa 3m 29s
✔ Branch rebased onto origin/main
✔ #551 exec 17m 20s ← finally
▸ #551 qa
Mid-run, the user had to inspect ps, state.json, and lsof to determine the run wasn't hung. It wasn't — but the experience of "is it dead?" with no answer is the gap.
Why current surfaces don't cover this
| Surface | Live in -q non-TTY? |
|---|---|
--tui |
No — gated off in -q |
MCP sequant_status |
Only if you're an MCP client |
SEQUANT_PROGRESS: lines |
Phase boundaries only |
state.json |
Updated at phase boundaries (~1/phase) |
sequant dashboard |
Browser, not terminal |
sequant logs |
Post-hoc |
-q users (log capture, piping, basic terminal use) have no live signal at all.
Relationship to existing architecture work
- arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 (typed workflow event system) is the correct architectural foundation — but was deliberately descoped in April 2026 (1 maintainer, 0 external users, framework tax). This issue does not require arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 and uses primitives that already exist (
run-*.jsonmtime,state.json). - feat(tui): enrich
nowLinewith per-file / log-tail activity #543 covers TUI-side activity enrichment. Adjacent but TUI-only. This issue targets the non-TTY/-qcase feat(tui): enrichnowLinewith per-file / log-tail activity #543 doesn't touch. - If arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 ever lands, the heartbeat in this issue migrates from mtime-polling to event-subscription as a small refactor.
Proposed design
Read what already exists: the live .sequant/logs/run-*.json file is rewritten throughout the run; its mtime is a free liveness proxy.
AC-1: TTY-detected liveness heartbeat in -q
- When
process.stdout.isTTY === true, every 30s rewrite the active phase line via\r:▸ #551 exec (12m elapsed, last log update 8s ago) - When non-TTY (CI logs, piped output), produce no heartbeat — preserves current behavior for log capture, no scroll spam.
- Reads
mtimeof the active run's log file. No new emitter, no new event types, no driver changes.
AC-2: One-shot stall warning at threshold
- Independently of TTY: when
now - log mtime > 5 minfor an in-progress phase, emit a single line (not periodic):⚠ #551 exec no log activity for 5m 12s (phase timeout in 24m 48s) - Fires once per stall window, not per poll. Reset state when activity resumes.
- Works in both TTY and non-TTY — this is information valuable enough to surface even in CI logs.
AC-3: Cadence and overhead
- Polling interval ≤ 30s. Single
fs.statper poll. No background timers when not in-q(the TUI handles its own animation).
AC-4: Tests
- Unit: heartbeat rewriter respects
isTTY, formats elapsed correctly, no-ops when phase boundary fires within the interval. - Integration: simulated run with stalled mtime triggers the AC-2 warning exactly once; resumed mtime resets the warning state.
Non-goals / follow-ups
- Per-tool action streaming ("Edit src/foo.ts") — requires arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 or feat(tui): enrich
nowLinewith per-file / log-tail activity #543's option (c). Out of scope here; mtime delta is sufficient signal for "is it alive". sequant watchcompanion command — separate terminal viewer. Worth considering as a follow-up once heartbeat lands; same primitives.- Hard kill on stall — out of scope. AC-2 is informational; user decides whether to intervene.
Why this is the right size
- Zero new infrastructure. Reads existing
run-*.jsonmtime + the existing per-phase elapsed clock. - Compatible with the arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 descoping decision — if arch: typed workflow event system for decoupled progress, logging, and MCP streaming #504 ever revives, the heartbeat data source swaps cleanly.
- Directly resolves the motivating session above.
Metadata
Metadata
Assignees
Labels
cliCLI commands and interfaceenhancementNew feature or requestplannedImplementation plan approvedready-for-reviewReady for code review
Activity
admarble commentedon May 4, 2026
Assessment
→ PROCEED —
-qliveness heartbeat + stall warning, clear ACs and zero new infrastructure (reads existingrun-*.jsonmtime)Workflow:
spec → exec → qawith-q⚠ Touches
-qnon-TTY path — TUI-gated; verify no regression with--tuimodeadmarble commentedon May 7, 2026
Complexity: Standard (4 ACs, ~3 directories)
AC Quality Check
run.timeout: 1800(30m global), but skill-level timeouts may differ. Resolve: read the same timeout the phase-executor uses, or omit the "in N min" suffix when no per-phase ceiling is in scope.Scope Assessment
Non-Goals (from issue): per-tool action streaming,
sequant watchcompanion, hard-kill on stall. ✅ explicit.src/lib/,src/commands/run.ts, tests)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: TTY-detected liveness heartbeat in
-qVerification: Unit Test
Scenario: Given a phase running with
process.stdout.isTTY === trueandoptions.quiet === true→ When 30s elapses inside the phase → Then a single line is rewritten via\rshowing▸ #N <phase> (Xm elapsed, last log update Ys ago). Given non-TTY → no heartbeat is emitted.Assumptions: ⚠ The issue body says "the live
run-*.jsonfile is rewritten throughout the run; its mtime is a free liveness proxy." This is incorrect.LogWriter.finalize()(src/lib/workflow/log-writer.ts:239) is the only writer —run-*.jsonis written once, at run end. The continuously-updated file on disk is.sequant/state.json, written byStateManager.saveState()at ~3–10 points per phase. Recommendation: pollstate.jsonmtime, notrun-*.json. Alternative: add aLogWriter.flushSnapshot()that writes the current run log incrementally.AC-2: One-shot stall warning at threshold
Verification: Unit Test
Scenario: Given a tracker watching
state.jsonmtime → Whennow - mtime > 5mfor the first time during the active phase → Then emit⚠ #N <phase> no log activity for Xm Ysexactly once. Given mtime advances after firing → Then warning state resets so the next stall window can fire again.Assumptions: Same liveness-source correction as AC-1. The "phase timeout in N min" suffix needs a real source — see AC Quality Check note.
AC-3: Cadence and overhead
Verification: Unit Test
Scenario: Given heartbeat enabled → When polling occurs → Then interval ≤ 30s, exactly one
fs.statper poll per active phase, and the timer is fully suppressed when not running in-qnon-TUI path. Given parallel mode with N concurrent phases → Then a single shared timer drives all per-phase rewrites (no N timers).Assumptions: PhaseSpinner already updates every 5s in non-quiet mode (
src/lib/phase-spinner.ts:30); heartbeat must not stack on top of it.AC-4: Tests
Verification: Unit + Integration
Scenario: Unit covers TTY branch, formatting, and one-shot reset. Integration: a simulated run with stalled state.json mtime triggers AC-2 exactly once; resumed mtime resets the warning. Tests must not rely on real timers — use
vi.useFakeTimers().Implementation Plan
Phase 1: Liveness primitive
src/lib/workflow/heartbeat.tsexporting a classLivenessHeartbeatwithstart(phase, issueNumber),stop(), and atick()driven bysetInterval. It readsmtimeof a configurable target file (default.sequant/state.json) viafs.statSync.formatElapsedTimefromsrc/lib/phase-spinner.ts:56for both phase-elapsed and "last activity Ns ago".Phase 2: Wire into run command
src/commands/run.ts:95–113, whenoptions.quietis true, instantiateLivenessHeartbeatand register start/stop callbacks alongside the existingonProgressevent flow. Heartbeat output uses\rrewrite only whenprocess.stdout.isTTY; stall warning is unconditional.ShutdownManager(mirrorPhaseSpinnerpattern atphase-spinner.ts:152–156).Phase 3: Tests
src/lib/workflow/heartbeat.test.ts— unit tests with fake timers and mockedfs.statSync. Cover: TTY vs non-TTY, stall fire-once, stall reset on mtime advance, no heartbeat when not quiet.npx sequant run <issue> -qend-to-end against a stubbed long-phase scenario (manual verification, since automating a multi-minute integration test is too slow).Decision: liveness source. Two options:
state.jsonmtime — recommended. Zero new infra. State is written 3–10× per phase already.LogWriter.flushSnapshot()incremental writer — closer to issue's stated intent but adds a new write path and requires tests for partial logs being valid JSON. Reject unless (a) proves insufficient.Design Review
src/lib/workflow/heartbeat.ts(peer ofphase-spinner.ts). It's CLI-presentation glue, not orchestration — keep it out ofrun-orchestrator.ts.setIntervalpollingstate.jsonmtime; emit on tick. Reject: per-phase timers (multiplies overhead in parallel mode).PhaseSpinner(src/lib/phase-spinner.ts) — same shape: start/stop, ShutdownManager cleanup, format helpers. Heartbeat is the-q-mode counterpart.Feature Quality Planning
All standard checks pass. Notable items:
\rrewrite assumes the heartbeat line is the last line printed. IfonProgress(when not quiet) interleaves a▸/✔between heartbeat ticks, the rewrite corrupts. Mitigation: only enable heartbeat whenoptions.quiet === true, whereonProgressisundefined.Open Questions
state.json(recommended) vs adding an incrementalrun-*.jsonwriter? Recommendation:state.json. Impact if wrong: heartbeat may appear stale during phases that don't triggersaveStatefor >5m (none observed in current code, but worth confirming).settings.run.timeoutand subtract elapsed; if absent, omit the "in N min" suffix. Impact: cosmetic — warning still fires correctly.--tui? Recommendation: no — TUI has its own activity panel (feat(tui): enrichnowLinewith per-file / log-tail activity #543 territory). Heartbeat lives in the!options.quiet === false && !tuiEnabledpath only.Recommended Workflow
Phases: spec → testgen → exec → qa
Quality Loop: enabled (matches
/assessrecommendation)Reasoning: AC-1/AC-2/AC-3 are Unit Test ACs — testgen will produce stubs before exec. Adds testgen on top of
/assess'sspec → exec → qa(documented override).Label Review
Current:
enhancement,cliRecommended:
enhancement,cli,no-browser-testReason: No UI surface; explicit
no-browser-testprevents the test phase auto-enabling oncliheuristics.Quality Loop: Will auto-enable from
/assessmarker (<!-- assess:quality-loop=true -->).→
gh issue edit 574 --add-label no-browser-test--- DRAFT GITHUB ISSUE COMMENT (PLAN) ---
Plan
Workflow:
spec → testgen → exec → qa(quality loop on)Acceptance Criteria
\rshowing(Xm elapsed, last log update Ys ago)whenisTTY. Non-TTY: no heartbeat. (Unit Test)now − liveness-mtime > 5m, emit⚠ #N <phase> no log activity for Xm Ysexactly once per stall window; resume on mtime advance. Fires in TTY and non-TTY. (Unit Test)setInterval≤30s, onefs.statper tick per active phase, no timer whenquiet === false. (Unit Test)Design call-out
The issue body assumes
run-*.jsonis rewritten throughout the run as a free liveness proxy. It isn't —LogWriter.finalize()is the only writer. Recommended substitute liveness source:.sequant/state.jsonmtime, whichStateManager.saveState()updates 3–10× per phase. Drop-in equivalent, no new infrastructure.Files
src/lib/workflow/heartbeat.ts,src/lib/workflow/heartbeat.test.tssrc/commands/run.ts(wire whenoptions.quiet)formatElapsedTimefromsrc/lib/phase-spinner.ts,ShutdownManagercleanup patternOpen questions
settings.run.timeoutor omit if absent.--tui— proposed: no, TUI handles its own activity panel.admarble commentedon May 7, 2026
Test Stubs Generated
Unit Test Stubs
src/lib/workflow/heartbeat.test.tsvi.useFakeTimers()per spec; mocksfs.statSyncIntegration Test Stubs
__tests__/integration/heartbeat.integration.test.ts/tmp/sequant-heartbeat-${pid}-${ts}/Browser Test Scenarios
N/A — this is a CLI/non-TTY feature. Issue is labeled
no-browser-test.Manual Test Checklists
Smoke check (per /spec Phase 3 step 6):
npx sequant run <issue> -qin a real TTY: heartbeat line rewrites every 30snpx sequant run <issue> -q | cat): no heartbeat output--tuimode: heartbeat does NOT activate (TUI handles its own activity panel)Assumptions to validate before implementation
.sequant/state.jsonmtime advances on eachStateManager.saveState()call (3-10x per phase)process.stdout.isTTYreliably distinguishes TTY vs piped/CI output\rrewrite is safe becauseonProgressisundefinedin-qmode (no interleaving)settings.run.timeoutor omit if absentNext steps:
/exec 574to implementsrc/lib/workflow/heartbeat.tsand wire intosrc/commands/run.tsthrow new Error('... stub ...')markers with real assertionsnpm test -- src/lib/workflow/heartbeat.test.ts __tests__/integration/heartbeat.integration.test.tsadmarble commentedon May 7, 2026
Exec Progress
AC Coverage
src/lib/workflow/heartbeat.tswriteHeartbeat(); 5 unit testsheartbeat.tswriteStallWarning()+warningFiredflag; 6 unit testssetInterval,unref()-ed,enabledgate; 6 unit testsFiles Changed
src/lib/workflow/heartbeat.ts(~250 LOC)src/lib/workflow/heartbeat.test.ts(21 tests)__tests__/integration/heartbeat.integration.test.ts(8 tests, realstate.jsonon disk)src/commands/run.ts— instantiate whenoptions.quiet && !tuiEnabled, drive lifecycle via existingonProgresschannel, dispose intry/finallyCHANGELOG.mdQuality Plan Alignment
quiet === true; no\rinterleaving withonProgressconsole writesfs.statSync; reusesformatElapsedTimefromphase-spinner.tsLiveness Source Decision
The spec design call-out flagged that
run-*.jsonis not rewritten throughout the run —LogWriter.finalize()is the only writer. The implementation follows the recommended substitute:.sequant/state.jsonmtime, whichStateManager.saveState()updates 3-10x per phase. Zero new write paths.Pre-PR Confidence Check
\r\x1b[Kto rewrite the line — relies on the heartbeat line being the last thing on stdout. This is enforced by gating the heartbeat tooptions.quiet === true, whereonProgresswould otherwise beundefined(no interleaving). If a future change ever emits to stdout from inside a-qrun without going throughonProgress, the rewrite could corrupt that line. Documented inline inrun.ts.Checks
npm run build— passesnpm run lint— passes (max-warnings 0)npm test -- src/lib/workflow/— 804/804 passnpm test -- src/lib/workflow/heartbeat.test.ts— 21/21 passnpm test -- __tests__/integration/heartbeat.integration.test.ts— 8/8 passPR
#595
Next Steps
/qa 574for reviewadmarble commentedon May 7, 2026
QA Review for Issue #574
AC Coverage
-q(30s\rrewrite)LivenessHeartbeat.writeHeartbeat()(src/lib/workflow/heartbeat.ts:209) emits\r ▸ #N phase (Xm elapsed, last log update Ys ago)\x1b[Kexactly as the issue's verbatim fixture. DefaultpollIntervalMs = 30_000. Non-TTY path returns empty (line 192) — confirmed by integration test that captures zero\r-prefixed writes in non-TTY.writeStallWarning()(line 223) emits⚠ #N phase no log activity for Xm Ys (phase timeout in N)to stderr;warningFiredflag (line 53) gates re-fire; resets when activity resumes (line 202-205). Test asserts exact(phase timeout in 24m 48s)suffix. Fires in BOTH TTY and non-TTY (test parameterizes both).-q, single shared timersetIntervalstarted lazily on firststart()(line 121),unref()-ed (line 123) so it doesn't keep event loop alive. Heartbeat is constructed only whenoptions.quiet && !tuiEnabledinsrc/commands/run.ts:97-103. Onefs.statSyncper active phase per poll (3 phases → 3 stats per tick — verified by test, /spec design call-out).heartbeat.test.ts, 7 integration tests in__tests__/integration/heartbeat.integration.test.ts. All 29 pass locally. Integration tests use realstate.jsonon disk withfs.utimesSyncto drive mtime; assumption-validation tests prove mtime advances on rewrite and that non-TTY captures contain zero\rrewrites.Coverage: 4/4 AC items fully met
Original ACs: 4/4 met
Derived ACs: N/A (no quality plan section in spec)
Quality Plan Verification
N/A —
/specproduced acceptance criteria + design review but noFeature Quality Planningtable with derived ACs.CI Status
validate-skillstypecheckvalidate-pluginbuild (20.x)build (22.x)CI Summary: 5 passed, 0 pending, 0 failed
CI-related AC items: None — AC-4 is a unit/integration test AC verified by local
vitest.Quality Metrics
any)Production code is 297 lines (
heartbeat.ts252 +run.ts45); tests are 786 lines (heartbeat.test.ts497 + integration 289). High test-to-prod ratio is appropriate for a timing-sensitive primitive.Build Verification
N/A —
npm run buildpasses (verified locally and in CI on both Node 20.x and 22.x).Test Coverage Analysis
src/lib/workflow/heartbeat.tssrc/lib/workflow/heartbeat.test.ts+__tests__/integration/heartbeat.integration.test.tssrc/commands/run.tsCoverage: 1/2 changed source files have direct tests; the
run.tschange is a wiring diff (constructsLivenessHeartbeatand forwardsstart/stopevents) — its behavior is implicit-tested by the existingRunOrchestratortest paths plus the heartbeat unit tests that cover the class itself.Critical paths without tests: None (no
auth/,payment/,security/paths touched).Code Review
Strengths:
LivenessHeartbeatis a peer ofPhaseSpinner(src/lib/phase-spinner.ts), mirrors its lifecycle (start/stop/dispose/ShutdownManagercleanup).formatElapsedTimeis reused, not duplicated.now,isTTY,stdoutWrite,stderrWritemakes the class fully testable without globals or module mocks for those concerns;fs.statSyncis the only module-level mock.unref()on the timer (line 123) — correct discipline so the heartbeat never blocks process exit.try/finallyinrunCommand(run.ts:174-186) guaranteesheartbeat.dispose()even ifRunOrchestrator.runthrows.mtimeMs = nulland the tick is silently skipped — no phantom stall warnings on missing/unreadable file (test covered).setIntervalSpy.toHaveBeenCalledTimes(1)test).run-*.jsonto.sequant/state.jsonafter/specconfirmedLogWriter.finalize()is the only writer ofrun-*.json. CHANGELOG entry documents the actual source.Issues:
options.quiet === true && process.stdout.isTTY === true,batch-executor.ts:717still constructs aPhaseSpinner(animatedoradots, redrawn ~10fps). The heartbeat writes\r ... \x1b[Konce per 30s on the same stdout line — the next ora frame overdraws it within ~100ms. Functional impact is zero (stall warning is on stderr; mtime polling is unaffected); cosmetic impact is the heartbeat line is invisible in interactive TTY+quiet runs. The actual problem case (CI/piped non-TTY) is unaffected because the heartbeat is gated off there and stall warnings come through stderr cleanly. Worth a brief follow-up note but not blocking.Suggestions:
fs.stat-per-poll optimization: with N parallel phases sharing onelivenessFile,tick()callsfs.statSyncN times on the same path. Functionally equivalent to caching the stat once per tick and reusing it for all phases. Microsecond-class win — file as a "later if needed" follow-up, not worth a code change here.Test Quality Review
stdout/stderrarrays), not internal state.\x1b[Kpresence, formatElapsedTime boundaries (s/m/h).fsis mocked at module level; clock, TTY, and writers are passed via constructor — no global patching.vi.useFakeTimers()for unit tests; integration tests drivetickNow()directly (no real-timer flakiness). Each integration test gets a unique/tmp/sequant-heartbeat-${pid}-${Date.now()}directory — parallel-safe.Issues Found: None.
Anti-Pattern Detection
Dependency Audit
N/A — no
package.jsonchanges.Code Patterns
Critical Issues: 0
Warnings: 0
Call-Site Review
New exported functions detected: 2 (
livenessHeartbeatfactory,LivenessHeartbeatclass)LivenessHeartbeat(constructor)src/commands/run.ts:100if (options.quiet && !tuiEnabled)livenessHeartbeat(factory)phaseSpinner()factory inphase-spinner.ts:308Findings:
options.quiet && !tuiEnabledmatches AC-3 exactly (no timer outside-q-non-TUI path).heartbeat.start({ issueNumber, phase, startedAt: Date.now() })is invoked only onevent === "start"(run.ts:131-135) andheartbeat.stop({...})oncomplete/failed— symmetric lifecycle.Recommendations: None — the unused factory export is deliberate (mirrors
phaseSpinner()convenience pattern); keep.Execution Evidence
N/A — no
scripts/changes;bin/cli.tsnot modified (no new CLI flag — heartbeat reuses existing-qflag).Skill Command Verification
N/A — no
.claude/skills/**/*.mdchanges.Detection Pattern Verification
N/A — no skill markdown changes; no new
grep/awk/jq/sed/regex patterns added in skill prose.CLI Registration Verification
N/A —
RunOptionsnot modified. The feature uses the pre-existingoptions.quietfield; no new option interface fields added.Skill Change Review
N/A — no skill files changed.
Smoke Test
npm run buildtscexit.npx vitest run src/lib/workflow/heartbeat.test.ts __tests__/integration/heartbeat.integration.test.tsbuild (20.x)andbuild (22.x)SUCCESS.Smoke Test Status: Complete
Manual Test ACs
N/A — all four ACs are Unit/Integration Test ACs (per
/specplan). No**Verification:** Manual Testitems.CHANGELOG Verification
feat(#574)commit)[Unreleased]entry### Added)(#574)issue ref + concrete behavior + file paths + flag (options.quiet === true && !tuiEnabled)Result: CHANGELOG requirements met.
Risk Assessment
PhaseSpinner(ora dots) — heartbeat line overdrawn within ~100ms by the next ora frame. Cosmetic only; stall warning (stderr) and non-TTY behavior are unaffected.RunOrchestratorevent flow (the unit + integration tests driveLivenessHeartbeatdirectly viatickNow()and a syntheticstate.json). Acceptable trade-off — driving a multi-minute integration is too slow; the wiring inrun.tsis straightforward (start on"start", stop on"complete"/"failed", dispose infinally).fs.statSyncexists instate-manager.ts(lock-file check) andlog-rotation.ts(rotation check), but those are separate concerns with their own error handling and don't share the heartbeat's polling pattern.Adversarial Re-Read
▸ #551 exec (12m elapsed, last log update 8s ago)and AC-2's⚠ #551 exec no log activity for 5m 12s (phase timeout in 24m 48s). Both run against the implementation: AC-1 viaheartbeat.test.ts:81-87(asserts▸ #551,exec, and(12m elapsed, last log update 8s ago)substrings — exact output ofwriteHeartbeat()at the AC's input values). AC-2 viaheartbeat.test.ts:271-294(asserts(phase timeout in 24m 48s)exact substring on1800s timeout - 312s elapsed). Both verbatim fixtures match.Smoke Testtable cites build + 29-test pass + CI-green as post-fix validation, not bug reproduction. Thenpx vitest runoutput (29 passed) reflects the new code; build verification is on the feature branch with the fix applied. No bug-reproduction-disguised-as-validation./Users/tony/Projects/worktrees/feature/574-feat-run-q-mode-silent-for-entire-phase-duration-nis clean (git status -sbshows tracking parity with origin); no uncommitted changes; one commit ahead oforigin/mainafter merge of #591/#590/#589/#588. Phase markers: spec/testgen/exec allcompleted. PR #595 OPEN, MERGEABLE.fs.statSynclookups instate-manager.ts:117(lock-file detection) andlog-rotation.ts:118(rotation size check) inspected — neither shares heartbeat's polling+mtime+threshold pattern; both are one-shot stat calls with their own error paths. Intra-file (Section 4 Q5):heartbeat.tshas only onefs.statSynccall site (line 178) insidetick();run.tschange is a single wiring diff. No siblings.sequant watchcompanion, hard-kill on stall. Implementation respects all three — no streaming output added, no new command introduced, stall warning is informational only (no kill). Out-of-scope-but-adjacent observation: in TTY+-qmode the heartbeat coexists withPhaseSpinner(ora) and gets visually overdrawn — surfaced under Code Review > Issues; not silently expanding scope.Findings: No blocking gaps. One non-blocking observation surfaced under Code Review (TTY+quiet ora overdraw — cosmetic, post-merge follow-up candidate at most).
Status: Clean
Verdict: READY_FOR_MERGE
All four ACs are MET against verbatim issue-body fixtures. Implementation is well-isolated (peer of
PhaseSpinner), fully test-injected (clock/TTY/writers), and conservatively gated to theoptions.quiet && !tuiEnabledpath. Test coverage is high (29 tests) and covers the timing-sensitive paths (fire-once, mtime-resume reset, parallel shared timer, dispose-during-tick, ENOENT/EACCES). CI is fully green on both Node 20 and 22. CHANGELOG entry present with the corrected liveness source noted (state.jsonnotrun-*.json).The only friction point is a cosmetic TTY+quiet overdraw of the heartbeat line by the existing
PhaseSpinnerora animation; functional behavior (stall warning on stderr, non-TTY path, mtime polling) is unaffected. Worth a follow-up note if it bothers TTY users in practice, but not blocking.Documentation
### Addedwith full context: source file, gating, fallback, parallel-safety)-qpathNext Steps
PhaseSpinneron heartbeat tick, or have heartbeat detect ora's animated state and skip the rewrite). Not worth blocking on.fix(#574): heartbeat re-arms after last phase stops in single-issue runs
feat(#574): -q mode liveness heartbeat + one-shot stall warning (#595)
admarble commentedon May 8, 2026
Documentation Generated
File:
docs/features/quiet-mode-heartbeat.mdSections Included:
-qmode, state.json writes)Next Steps:
Ready to merge!
docs(#574): add user guide for -q mode liveness heartbeat
feat(#804): --auto-wait — continue a rate-limited run when the window…
feat(#574): -q mode liveness heartbeat + one-shot stall warning
fix(#574): heartbeat re-arms after last phase stops in single-issue runs