Repository navigation
Description
A 4-issue parallel run printed SUMMARY · 4 issues · 1h 12m. The run actually took 36m 18s. sequant logs reports the same run correctly, so the two commands disagree by 2× about a run that just finished in front of you.
src/commands/run-display.ts:191 builds the header duration by summing per-issue durations:
const totalSeconds = results.reduce(
(sum, r) => sum + (r.durationSeconds ?? 0),
0,
);Under --parallel that double-counts every overlapping issue. At 3-way concurrency the printed figure runs about 2× the truth; the error scales with the concurrency setting, so the number is worst exactly where a duration readout is most useful.
The log writer already computes this correctly — run-log-schema.ts:415 uses (endTime - startTime) / 1000 — and commands/logs.ts:133 renders that stored value. Only the live post-run summary recomputes it the wrong way.
The sum was correct when written. sequant run executed issues in a serial for...of loop until #419 (e86ebbe4, 2026-03-24) replaced it with Promise.allSettled + p-limit at a default concurrency of 3. That commit changed the execution model and left the summation untouched, silently invalidating it. Full archaeology and the reason no test caught it are in the first comment below.
Measured, from run 21feec76-20e3-468a-8393-cd43cab03df7
startTime 2026-07-29T15:32:29.443Z
endTime 2026-07-29T16:08:47.777Z
-> wall clock 2178.334s = 36m 18s
summary.totalDurationSeconds in the log: 2178.334 (correct)
sum of the four per-issue durations: 4322.904 (what SUMMARY printed as "1h 12m")
#853 855.655 #847 961.650
#850 1203.303 #844 1302.296
Same run, two commands:
SUMMARY · 4 issues · 1h 12m · 4 passed · 0 failed <- run-display.ts:191
sequant logs --last 1 -> Duration: 36m 18s <- logs.ts:133, from the log
The stored log is right, so this is purely a display-layer defect and no historical data is corrupted.
Related: #866 covers a different duration defect in the Ink TUI. They are independent — different code paths, different failure modes — but both surfaced in this one run, and both make an on-screen duration disagree with the summary table directly beneath it.
Acceptance Criteria
- AC-1: The post-run
SUMMARYheader duration is run wall-clock time, not the sum of per-issue durations. - AC-2: The wall-clock duration is computed once by the orchestrator, which owns the run's start and end, and both the printed summary and the run log derive from that single value rather than each recomputing it.
- AC-3: The summary duration is correct under
--no-logand when log initialization fails, neither of which produces a run log to read from. - AC-4: A sequential (concurrency 1) run's summary duration is unchanged by the fix, since sum and wall clock nearly coincide there.
- AC-5: A parallel run with known overlapping issue durations prints wall clock; a regression test pins a 3-concurrent fixture whose per-issue sum differs from wall clock by more than 2×, so summing cannot satisfy it.
- AC-6: That regression test drives
displaySummaryfrom aRunResultand asserts the duration in the rendered output — passingtotalDurationSecondsintorenderSummarydoes not count, since the bug is upstream of the renderer and such a test passes against unfixed code. - AC-7:
sequant logs --last 1and the liveSUMMARYheader report the same duration for the same run, asserted from one shared fixture. - AC-8: The regression test is mutation-verified by restoring the
reducesum and confirming exactly that test fails, with the result recorded in the commit message or PR body.
Activity
admarble commentedon Jul 29, 2026
Traced where the two computations diverged. The sum was never wrong when it was written — it was correct for four months and then quietly invalidated by a change somewhere else.
2026-01-08, #22 (
3387c29a) — the run log gets its wall-clock total,(endTime - startTime) / 1000. This has been right the entire time and still is.2026-01-20, #132 (
d61c0bfc) — the display-sidereducesum is introduced. Correct at the time:sequant runexecuted issues in a serialfor...ofloop, so the sum of per-issue durations was wall clock, give or take orchestration overhead. Two ways of computing the same number.2026-03-24, #419 (
e86ebbe4) — "Replace the serialfor...ofloop withPromise.allSettled+p-limitfor concurrent issue execution. Issues now run in parallel by default with configurable concurrency (--concurrency N, default: 3)."That is the drift point. #419 changed the execution model out from under the arithmetic and never revisited it. The
reduceinrun-display.tswas not touched by that commit — I checked the diff; it changesdurationSecondsplumbing but leaves the summation alone. From that day every multi-issue run has over-reported, by roughly the concurrency factor, and the default concurrency of 3 is why your run came out near 2×.The equivalence the sum depended on was implicit. Nothing in
run-display.tsrecorded "this is only wall clock because execution is serial," so there was no comment for #419 to invalidate and no reason for its author to look.Why no test caught it. The renderer is covered, but only downstream of the bug.
run-renderer.test.ts:884passestotalDurationSeconds: 975in as an input and asserts/SUMMARY · 2 issues/,/1 passed/,/1 failed/— never the rendered duration. No test anywhere asserts the header's duration value, and no test covers the producer atrun-display.ts:191. The defect lives entirely in the untested seam between a tested producer-caller and a tested renderer.This sharpens AC-4 and AC-5: the regression test has to cover the seam, not the renderer. A test that feeds
totalDurationSecondsintorenderSummarywill pass against the broken code exactly the way the existing one does. It has to drivedisplaySummaryfrom aRunResultwith overlapping issue durations and assert the number that comes out.admarble commentedon Jul 29, 2026
Checked what the fix actually has to work with, because the obvious one-line fix is not available. Two constraints, both of which changed the ACs above.
displaySummarycannot compute wall clock from what it is handed.RunResult(run-orchestrator.ts:272) carriesresults,logPath,exitCode,worktreeMap,issueInfoMap,config,mergedOptions,logWriter— and no run-level start or end time. Summing per-issue durations is, today, the only duration the function can derive. That is likely why it was written that way. The fix is plumbing, not arithmetic.Reading it back from the log does not work either. My first AC-2 said to source the duration from the value the log stores. That breaks two ways:
--no-log(mergedOptions.noLog, checked atrun-orchestrator.ts:622and:677) suppresses the log writer entirely.logWriter = nullwith a warning (run-orchestrator.ts:703-706), and several other paths returnlogWriter: nulloutright.The summary still prints in all of those cases.
LogWriteralso exposes no accessor for the finalized total —runLogis private andfinalize()returns the file path, not the log.So the shape that satisfies both: the orchestrator already owns the run's start and end, so it should compute wall clock once and hand it to
RunResult, with the log writer recording that same clock. One producer, two consumers — which is what AC-2 now asks for. Sourcing one display from the other's output would just recreate the coupling that let this drift in the first place.Blast radius is limited to the CLI display. The MCP path is already correct:
mcp/tools/run.ts:264readsrunLog.summary.totalDurationSeconds, the stored wall clock.commands/logs.ts:133,commands/stats.ts:187and:265likewise read the stored value.run-display.tsis the only consumer that recomputes, and it does so once at:191for both branches — the renderer path at:199and the fallback at:206. Fixing that one computation covers both.Per-issue totals are not affected.
log-writer.ts:191sums a single issue's phases, which is correct — phases within an issue are sequential. Only the run-level roll-up is wrong. No stored data needs migrating.admarble commentedon Jul 29, 2026
#867 — fix(cli): post-run SUMMARY duration sums per-issue times instead of wall clock — 4-issue parallel run reported 1h 12m for 36m 18s
Open · bug, cli
────────────────────────────────────────────────────────────────
→ PROCEED — Verified against main — run-display.ts:191 reduces per-issue durationSeconds, which double-counts under p-limit concurrency
Commands:
sequant run 867 -Q
spec → exec → qa · 8 ACs
Flags:
-Q AC-2 makes this orchestrator plumbing into RunResult, not a one-line display fix
Considered:
--testgen AC-5/AC-6 specify the seam the test must drive (displaySummary from a RunResult) — a stub aimed at the renderer would pass against unfixed code
────────────────────────────────────────────────────────────────
⚠ AC-3 rules out sourcing the value from the log: --no-log and logWriter=null paths still print the summary
────────────────────────────────────────────────────────────────
admarble commentedon Jul 29, 2026
#867 — fix(cli): post-run SUMMARY duration sums per-issue times instead of wall clock — 4-issue parallel run reported 1h 12m for 36m 18s
Open · bug, cli
────────────────────────────────────────────────────────────────
Supersedes prior assess from 2026-07-29 (PROCEED)
→ PROCEED — Re-verified against main — run-display.ts:190 still reduces per-issue durationSeconds, which double-counts under p-limit concurrency
Commands:
sequant run 867 -Q
spec → exec → qa · 8 ACs
Flags:
-Q AC-2 makes this orchestrator plumbing into RunResult, not a one-line display fix
Considered:
--testgen AC-5/AC-6 specify the seam the test must drive (displaySummary from a RunResult) — a stub aimed at the renderer would pass against unfixed code
────────────────────────────────────────────────────────────────
⚠ AC-3 rules out sourcing the value from the log: --no-log and logWriter=null paths still print the summary
⚠ Same-run sibling of #866 but a different code path (run-display vs Ink TUI) — safe to run in parallel, do not conflate while fixing either
────────────────────────────────────────────────────────────────
admarble commentedon Jul 29, 2026
Complexity: Standard (8 ACs, 2 directories)
AC Quality Check
All 8 ACs are measurable and testable — this is an exemplary bug spec (root cause located, wrong-vs-right code cited, a measured fixture, and a mutation-verification requirement baked in). No vague/unmeasurable/open-ended patterns. AC-5/6/7/8 are all facets of one regression test, not four separate tests — the plan treats them as a single test with four assertions.
One title/body tension note (informational, not blocking): AC-8's "recorded in the commit message or PR body" is a process gate, not a runtime behavior — it's verified by inspecting the PR, per the repo's mutation-verification rule (CLAUDE.md, #830/#834).
Scope Assessment
Non-Goals: Not stated as a header, but the body draws the boundary explicitly: the stored log is correct and no historical data is corrupted — this is display-layer only. Related #866 (Ink TUI
ElapsedTimer) is called out as independent and out of scope.src/commands/,src/lib/workflow/)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: SUMMARY header shows wall-clock, not per-issue sum
Verification: Unit Test
Scenario: Given a
RunResultwith per-issue durations summing to ~72m but a wall clock of ~36m → WhendisplaySummary(result)runs → Then the header renders the wall-clock figure.Root cause:
src/commands/run-display.ts:191results.reduce((s,r)=>s+durationSeconds)double-counts overlapping parallel issues.AC-2: Wall clock computed once by the orchestrator; both summary and log derive from it
Verification: Unit Test
Scenario: Given the orchestrator owns run start/end → When a run finishes → Then a single wall-clock value flows to both the printed summary (via
RunResult) and the log, with no consumer re-summing per-issue durations.Assumptions:
RunOrchestrator.run()(run-orchestrator.ts:648) is the single owner of the run's start/end; adding a run-levelrunStartedAtthere is the natural home.finalizeRunLog(run-log-schema.ts:409) already does(end-start)/1000correctly — the fix aligns the summary and metrics to that same wall-clock notion, sourced from one origin timestamp.AC-3: Correct under
--no-logand when log init failsVerification: Unit Test⚠️ This is the load-bearing constraint: it forces the timestamp to live on the orchestrator, not the log.
Scenario: Given
mergedOptions.noLog(orlogWritercaught-and-nulled atrun-orchestrator.ts:706) → When the summary renders → Then it still shows wall clock.Assumptions: The wall-clock value MUST be independent of
logWriter(it can benull).AC-4: Sequential (concurrency 1) summary unchanged
Verification: Unit Test
Scenario: Given a concurrency-1
RunResultwhere per-issue sum ≈ wall clock → When rendered → Then the figure matches the pre-fix output (within rounding).AC-5: Parallel run with overlapping durations prints wall clock (>2× fixture)
Verification: Unit Test
Scenario: Given a 3-concurrent fixture whose per-issue sum exceeds wall clock by >2× → When
displaySummaryruns → Then it prints wall clock, so summing cannot satisfy the assertion.AC-6: Test drives
displaySummaryfrom aRunResult, asserts rendered durationVerification: Unit Test
Scenario: The test calls
displaySummary(runResult)(through the capture harness inrun-display.test.ts:52/67) and asserts on whatdisplaySummarycomputed/rendered — not a directrenderSummary({totalDurationSeconds})call, which would test the renderer and pass against unfixed code.Assumptions: Existing
captureSummaryInputgrabs theSummaryRenderInputthatdisplaySummarycomputed — asserting itstotalDurationSecondsis valid because it's driven end-to-end from aRunResultthrough the bug site. Asserting the captured stdout string is equally valid.AC-7:
sequant logs --last 1and live SUMMARY agree, from one shared fixtureVerification: Unit Test
Scenario: Given one fixture with a fixed start/end → When both the log render (
logs.ts:133) anddisplaySummaryderive duration → Then both print the same value.Assumptions: Guaranteed by threading a single origin timestamp so both compute
(end-start)/1000identically.AC-8: Regression test is mutation-verified
Verification: Manual Test (process gate)
Scenario: Restore the
reducesum atrun-display.ts:191→ confirm exactly the AC-5 test fails → restore fix → record in commit/PR body. Per CLAUDE.md gate-test rule.Implementation Plan
Phase 1: Single source of truth in the orchestrator
RunOrchestrator.run()(run-orchestrator.ts:648), captureconst runStartedAt = Date.now()at the top (before services/log setup, so it's independent oflogWriter— AC-3).RunResult(run-orchestrator.ts:1173), computeconst wallClockDurationSeconds = (Date.now() - runStartedAt) / 1000and add it as a newRunResultfield (run-orchestrator.ts:272interface). Also handle the early empty-issue return (:662) with0.runStartedAtintoLogWriterso the log's storedstartTimeshares the orchestrator's origin (pass through theLogWriterconstructor/initialize→createEmptyRunLogatrun-log-schema.ts:320, which currently self-stampsnew Date()). This makesfinalizeRunLog's wall clock and the summary's wall clock provably equal.Phase 2: Consumers derive, never re-sum
displaySummary(run-display.ts:183): replace thereduceat:191withresult.wallClockDurationSeconds. Delete the sum.recordMetrics(run-orchestrator.ts:1584) — sibling site, same bug (see Open Questions): switch itsdurationfrom the per-issuereduceto the wall-clock value.Phase 3: Regression test + mutation proof
src/commands/run-display.test.ts: a 3-concurrentRunResultfixture where per-issue sum >2× wall clock; drivedisplaySummary; assert wall clock in the rendered output; add the AC-7 cross-check that the same fixture's log render matches.reduce, confirm only the AC-5 test fails, restore, record in the PR body.Design Review
run()owns setup→execute→finalize). Per-issue timings live onIssueResult; the run wall clock has no owner today, which is the root defect.RunResultis the right carrier to the display layer.runStartedAttimestamp + one subtraction, surfaced onRunResult; consumers read it. Rejected: (a) computing wall clock asmax(issueEnd) - min(issueStart)from per-issue data — fragile, and there's no per-issue wall-start recorded; (b) havingdisplaySummaryread the log — violates AC-3 (--no-log).finalizeRunLog/finalizePhaseLog(run-log-schema.ts:389/415), which already compute(end-start)/1000. The fix generalizes that same wall-clock pattern to the run level and makes the display reuse it.reduceinrun-display.ts?" — because that leaves the identical bug inrecordMetrics:1584and gives no single source of truth (AC-2), so summary and log could still drift. "Do you really need to thread the timestamp into the log?" — only to make AC-7's equality exact rather than approximate; the alternative (both compute independently from near-identical starts) differs by sub-second and could flake a strict equality assertion.Feature Quality Planning
All standard checks pass. Notable items:
recordMetrics:1584): the identicalreduce-sum double-counts the metricsdurationunder--parallel. Same root cause, trivially co-located — folding it into this fix is proportionate (Phase 2, step 5). Flagged rather than silently widened — see Open Questions.finalizeRunLogkeeps fractional seconds (2178.334); the summary renderer formats to36m 18s. Ensure the shared value is passed unrounded and each renderer formats as it does today, so AC-7's equality holds at the source value.Derived ACs
duration(recordMetrics:1584) uses wall clock, not per-issue sumOpen Questions
recordMetrics:1584sibling into this fix? — Recommendation: yes. It's the same root cause one function away, and oncewallClockDurationSecondsexists the change is a one-liner. Impact if skipped: the metrics store keeps silently double-counting parallel-run durations, undermining any later log-mining (project_data_driven_optimization). If you'd rather keep the PR laser-focused on the SUMMARY defect, I'll file it as a fast follow instead.runStartedAtinto the log, or let the log keep its own start? — Recommendation: thread it, for an exact AC-7 equality. If you prefer minimal blast radius, we leave the log's start as-is and AC-7 asserts equality within a 1s tolerance — but a tolerance on a "same run, same number" assertion reads as a smell.Recommended Workflow
Phases: spec → exec → qa
Quality Loop: disabled (SCOPE_OK, single-root-cause bug)
Reasoning: Focused display-layer bug; ACs are Unit-Test-verifiable. Skipping
testgen— the regression test is prescribed precisely by AC-5/6/8, so it's authored directly inexecrather than stubbed. Notestphase (no UI/browser surface — CLI stdout). Nosecurity-review.Label Review
Current:
bug,cliRecommended:
bug,cli(no change)Reason: Accurate. Not
complex/refactor— one root cause, ~2 directories.Quality Loop: Won't auto-enable (SCOPE_OK, no SCOPE_WARNING).
admarble commentedon Jul 29, 2026
/exec — Implementation complete (PR #868)
Wall clock is now computed once by the orchestrator and read by both the summary and the metrics record; the run log shares the same origin.
AC Coverage
run-display.tsreadsRunResult.wallClockDurationSecondsrunStartedAt→RunResult+ log (threaded origin) +recordMetrics--no-log/ log-init failurerunStartedAtcaptured before log setup, independent oflogWriterdisplaySummaryfrom aRunResultrenderSummary({totalDurationSeconds})sequant logs+ SUMMARY agree, one fixturefinalizeRunLogDerived AC (spec sibling-site scan):
recordMetricsdurationnow uses wall clock, not the per-issue sum — ✅ addressed.Files changed
src/lib/workflow/run-orchestrator.ts—runStartedAtorigin,RunResult.wallClockDurationSeconds,recordMetricsderives from it, threads origin intoLogWritersrc/commands/run-display.ts— reads the wall-clock value;reducedeletedsrc/lib/workflow/log-writer.ts/run-log-schema.ts—startTimethreading so the log shares the run originsrc/commands/run-display.test.ts— regression + AC-4 testsCHANGELOG.md— Fixed entryMutation verification (AC-8)
Restoring the
reducesum atrun-display.tsfails exactly the gate test (prints wall clock for a >2× parallel fixture; logs and SUMMARY agree—expected 3600 to be 1200); the AC-4 sequential test stays green. Fix restored.Checks
npm run build✅ ·npm run lint✅ · targeted vitest (run-display, run-orchestrator, log-writer, run-log-schema) 130 passed ✅Quality Plan Alignment
recordMetricsdurationNext:
/qa.admarble commentedon Jul 29, 2026
QA Review for Issue #867
Reviewed inline (230-line diff, sub-600 → inline for accuracy over worktree-reading sub-agents).
AC Coverage
run-display.ts:196readsresult.wallClockDurationSeconds;reducedeletedrun-orchestrator.ts:663runStartedAtorigin →:1177single value → RunResult (summary) + metrics; log'sstartTimethreaded (:710) sofinalizeRunLogderives from the same start. Matches the spec-approved "one origin" design (Open Q#2)--no-log/ log-init failurerunStartedAtcaptured before the log-writer block; value never toucheslogWriterdisplaySummaryfrom aRunResult, notrenderSummary({...})captureSummaryInput+captureStdoutboth route through the bug site; no directrenderSummarycallsequant logsand SUMMARY agree, one shared fixturefinalizeRunLog(createEmptyRunLog({startTime}))under a fixed clock and the summary viawallClockDurationSeconds, asserts both == 2178.334reducefails exactly the gate test (expected 3600 to be 1200) while the AC-4 test stays green; recorded in commit + PR bodyrecordMetricsduration uses wall clockrun-orchestrator.ts:1614totalDuration = wallClockDurationSecondsCoverage: 9/9 met (8 original + 1 derived)
Quality Plan Verification
Quality Plan Status: Complete
CI Status
build (22.x)typechecknode-floor-guardvalidate-skillsvalidate-pluginCI Summary: 5 passed, 0 pending, 0 failed. No CI-dependent ACs.
Quality Metrics
any)Test Coverage Analysis
src/commands/run-display.tsrun-display.test.ts(+2 new #867 tests)src/lib/workflow/run-orchestrator.tsrun()unit test —wallClockDurationSecondsproduction is covered by code review + the display-seam test, not an end-to-end orchestrator testsrc/lib/workflow/log-writer.tslog-writer.test.ts;startTimethreading exercised via AC-7 testsrc/lib/workflow/run-log-schema.tscreateEmptyRunLog({startTime})exercised by AC-7 testCoverage: display seam + log equivalence directly tested; orchestrator producer verified by construction.
Code Review
Strengths:
reducewas wrong, why the origin is captured pre-log-setup) rather than restating the code.Issues: None blocking.
Suggestions: See sibling-site finding below.
Risk Assessment
(end − start)with its own end timestamp (log atfinalizeRunLog, summary at:1177), differing by sub-millisecond. Both floor to whole seconds, so no display divergence — but AC-2's "single value" is satisfied at the origin, not as one shared final number. This is the spec-approved design (Open Q#2), not a defect.RunOrchestrator.run()and asserts the returnedwallClockDurationSecondsor the log-origin threading through the real path; AC-7 simulates the log viafinalizeRunLogdirectly. Acceptable per AC-6's chosen seam, but the orchestrator→RunResult→log wiring is verified by review, not by a test.src/lib/ci/outputs.ts:29(formatMultiOutputs) and:104(formatSummary) carry the identicalresults.reduce((sum, r) => sum + (r.durationSeconds ?? 0), 0)pattern, feeding the GitHub Actionsdurationoutput and the step-summary "Total duration". Same root cause — double-counts under--parallel. The issue's "blast radius is limited to the CLI display" was incomplete: this is a third recompute site. It has no in-repo production caller today (exported CI-integration API viasrc/lib/ci/index.ts), so the bug is latent here but real for any GitHub Actions consumer on a parallel run. Out of this PR's AC scope (different consumer; can't reusewallClockDurationSecondswithout an API + caller change). Recommend a follow-up issue — see Next Steps.recordMetricswas the intra-file sibling; already folded in (AC-D1). No otherdurationSecondssums inrun-orchestrator.ts.log-writer.ts:205sums a single issue's phases (correct — phases are sequential);logs.ts:393/stats.ts:503sum across runs (intentional aggregates).Trust-Boundary Check
Finding: Clean — the diff implements only the product requirement (correct wall-clock duration). The issue body and spec comments are legitimate maintainer requirements/planning; no agent-directed instruction was embedded or acted on.
Status: Clean
Behavior-Rule Survival Check
Status: N/A — no AC triggers the behavior-rule heuristic (this is a value-correction fix, not a default/always/never/skip rule change).
CHANGELOG Verification
fix:commit)### Fixed, includes#867)Result: CHANGELOG requirements met
Adversarial Re-Read
Findings: Walked the diff adversarially: (1) the verbatim motivating example (run 21feec76 — 36m 18s vs 1h 12m) is an asserted fixture and passes; (2) the "evidence" is post-fix validation + a real mutation failure, not a pre-fix repro; (3) process state clean — no uncommitted work, 0 commits behind main; (4) sibling sites cited explicitly (§5 cross-file:
ci/outputs.ts×2; §4 intra-file:recordMetrics); (5) Non-Goals honored — no#866/Ink-TUI touch, no historical-data migration. One real gap surfaced: theci/outputs.tscross-file sibling (same root cause, out of AC scope) → maps to a follow-up issue, not a missing AC fixture.Status: Gaps Found
Verdict: AC_MET_BUT_NOT_A_PLUS
All 9 ACs (8 original + 1 derived) are MET, mutation-verified, CI-green, clean code — the PR correctly and completely fixes #867 for its stated scope and is mergeable. The step down from A+ is solely the adversarial re-read surfacing a real cross-file sibling of the same bug in
src/lib/ci/outputs.ts(the GitHub Actions output layer), which the issue's blast-radius analysis missed. That is a follow-up recommendation, not an unmet AC — do not/loopthis (there is no gap to close in-PR; the sibling needs its own issue).Documentation
/docs 867only if you want a feature note.Next Steps
src/lib/ci/outputs.ts:29+:104— samereduce-per-issue-duration double-count under--parallel, in the GitHub Actionsdurationoutput and step-summary. No in-repo caller today, so latent, but it fixes the class of bug. (Chose follow-up over widening this PR per §5 — the fix needs an API/caller change the CLI path doesn't provide.)RunOrchestrator.run()test assertingwallClockDurationSecondswould close the one coverage gap noted above.fix(#867): close QA gaps — CI-output siblings + orchestrator producer…
admarble commentedon Jul 30, 2026
QA Review for Issue #867 — re-run after gap closure
Supersedes the prior QA (verdict
AC_MET_BUT_NOT_A_PLUSate1a9a5bf). Both gaps that prior review surfaced have been closed in-PR at20ed7585rather than deferred to follow-ups.What changed since the last review
src/lib/ci/outputs.ts:29/:104— identicalreducedouble-count in the GitHub Actionsdurationoutput and step-summary Total durationformatMultiOutputs/formatSummarynow take the run wall clock as a required argument; bothreduces deleted. Required rather than optional-with-sum-fallback — a fallback leaves the defect where it is, and no-fallback-to-sum is the discipline the rest of the fix follows. Safe: no in-repo callers,src/index.tsdoes not re-exportlib/ci, and the packageexportsmap is"."-only so deep imports are blocked.wallClockDurationSecondssrc/lib/workflow/run-orchestrator.test.ts(the file did not exist) drives the realRunOrchestrator.run()through the hermetic empty-issue seam and asserts the run bracket, including AC-3's--no-logpath.returnsites; collapsed into onewallClock()closure.AC Coverage
run-display.tsreadsresult.wallClockDurationSeconds;reducedeletedrunStartedAtorigin →RunResult+ metrics + logstartTime; now four consumers derive, none re-sumlogWriter === nulland duration600captureSummaryInput/captureStdout, notrenderSummary({…})finalizeRunLog, both == 2178.334recordMetricsduration uses wall clockci/outputs.ts×2 use wall clock — the gap this pass closedCoverage: 10/10 met.
Mutation verification
Each new gate test was mutation-verified by restoring the
reduceit exists to catch, confirming exactly the expected tests fail, then restoring. Observed:formatMultiOutputs→ restore the sum: exactly 1 of 14 fails —expected '3600' to be '1200'.formatSummary→ restore the sum: exactly 1 of 14 fails —expected '…' to contain '**Total duration:** 1200s'.wallClock()→ derive from per-issue data instead of the run bracket: all 3 of 3 producer tests fail —expected +0 to be 2178.334 / 45 / 600. All three assert the bracket, so all three are expected to catch it; recorded as 3, not 1.AC-4 stays green throughout. All mutations reverted.
CI Status
build (22.x)typechecknode-floor-guardvalidate-skillsvalidate-plugin5 passed, 0 pending, 0 failed.
mergeable: MERGEABLE, 0 commits behindorigin/main.Quality Metrics
any)Full suite was run (not just targeted) because an exported signature changed.
Risk Assessment
(end − start)with its own end timestamp, differing sub-millisecond. Both floor to whole seconds, so no display divergence. This is the spec-approved design (Open Q#2), not a defect.run-orchestrator.ts:1185is still review-verified, though it now shares the samewallClock()closure the tested early returns use, so the two cannot drift.ci/outputs.ts×2 — now fixed, previously the outstanding gap. Re-scanned for the pattern:logs.ts:393andstats.ts:503sum across runs (intentional aggregates, not a run roll-up);log-writer.ts:205sums one issue's phases (correct — phases are sequential);mcp/tools/run.ts:264,logs.ts:133,stats.ts:187/:265read the stored wall clock. No recompute sites remain.recordMetricsfolded in previously (AC-D1). All seven early returns now route through one closure, so a future exit cannot silently pick a different formula.Trust-Boundary Check
Finding: Clean — the diff implements only product requirements (correct wall-clock duration). The issue body and comments are legitimate maintainer requirements and planning; no agent-directed instruction was embedded or acted on.
Status: Clean
Behavior-Rule Survival Check
Status: N/A — no AC triggers the behavior-rule heuristic; this is a value correction, not a default/always/never/skip rule change.
CHANGELOG Verification
fix:commits)[Unreleased]entry### Fixed, includes#867ci/outputs.tssiblingsAdversarial Re-Read
Findings: (1) The verbatim motivating example (run
21feec76— 36m 18s vs 1h 12m) remains an asserted fixture and passes. (2) Evidence is post-fix validation plus three real mutation failures, not a pre-fix repro — and the recorded mutation count was corrected to match what was actually observed (3 producer tests, not 1). (3) Process state clean: 0 commits behindorigin/main, no uncommitted work, full suite run because an exported signature changed. (4) Sibling sites cited and re-scanned; no recompute sites remain. (5) Non-Goals honored — no#866/Ink-TUI touch, no historical-data migration.One item deliberately left as-is: the
runResult()test helper inrun-display.test.tsdefaultswallClockDurationSecondsto the per-issue sum. That is intentional and documented — it preserves pre-#867 tests' rendered output — and the #867 tests all pass an explicit wall clock that diverges from the sum, so the default is never load-bearing for a duration assertion.Status: Clean
Verdict: READY_FOR_MERGE
All 10 ACs met (8 original + 2 derived). The gap that held the prior verdict at
AC_MET_BUT_NOT_A_PLUS— theci/outputs.tscross-file sibling — is fixed in-PR, and the producer-coverage gap is closed with a test file that did not previously exist. Three mutation verifications recorded against observed output, CI green, full suite green, no recompute sites remaining.Next Steps
chore: merge main into feature/866 (#868 wall-clock summary)