Repository navigation
refactor(#1471): one run-log module — parseLogFile, listLogFiles, resolveLogDir, formatDuration defined once - #1547
Merged
admarble merged 4 commits intoOct 19, 2026
Conversation
…olveLogDir, formatDuration defined once Entire-Checkpoint: 423a09d924b1
Entire-Checkpoint: 9f29abfd9e19
4 tasks
…-logs-one-run-log-module-parselogfile-list
Entire-Checkpoint: ad17549842ff
admarble
deleted the
feature/1471-refactor-logs-one-run-log-module-parselogfile-list
branch
October 19, 2026 17:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Branch:
feature/1471-refactor-logs-one-run-log-module-parselogfile-list, two commits.What changed
src/lib/run-logs.tsholdsresolveLogDir(customPath?),listLogFilesandparseLogFile. The bodies are copied verbatim fromcommands/logs.ts.formatDurationnow lives insrc/lib/cli-ui/format.ts.commands/logs.ts,commands/stats.ts,mcp/tools/logs.ts,mcp/tools/run.tsandlib/merge-check/index.ts. Callers now import the shared module, andresolveLogPathis renamedresolveLogDir.commands/merge.tsimportsresolveLogDirfromrun-logs.tsdirectly, somerge-checkhas no pass-through.phase-executor.tskeepsexport { formatDuration } from "../cli-ui/format.js", sorun-compat.tsandphase-executor.test.tsstill compile.mcp/tools/run.tsand nothing else inmerge-check. The fix(mcp): sequant_run reports another run's issues and verdict when its own run log is missing — a runId lookup miss falls back to the time window #1515 runId-miss time-window fallback and fix(merge): sequant merge --check hard-codes origin/main in four places, so a master-default repo gets empty diffs and a clean report #1484's base-ref handling are unchanged.resolveLogDircopies agreed, so the "stop if they disagree" condition didn't apply.src/lib/run-logs.test.tsis new, with 7 tests using a real tmpdir and no fs mock.[Unreleased]entry toCHANGELOG.md.AC results (I ran each Evidence command)
1 1 1 1then0run-logs.test.ts7 passed, 0 failednpm run buildclean; the listed vitest files 0 failed (see below)dupsprintsnone, exit 0Checks
npm run buildandnpm run lintpass with 0 warnings.run-logs,stats,stats-source,stats-failure-categories,mcp/tools/run,merge-check/watch,phase-executor,commands/logsand everything undersrc/mcp: 12 files, 458 of 459 passed.run-logs.test.tswithscripts/qa/tautology-detector-cli.test.ts: 13 passed. I did not re-run the full 12-file set after that test-only fix.commands/logs.tshas no existing test file.Pre-PR confidence check
fsmock inmcp/tools/run.test.ts. The shared module imports* as fs from "fs", and that test file passed after the move.phase-executor.tsandcommands/merge.tsonly had import changes and are covered by their existing tests.Mutation record: none. AC-1 and AC-4 are command-evidence ACs, not gate tests.
Next:
/qa.Fixes #1471
Runner verification (2026-10-19)
After main (with #1548) was merged in, the runner re-ran AC-1..AC-4 at 90f06c6:
1 1 1 1/0, accretionnone, build exit 0, 388 passed acrossrun-logs.test.tsand the six listed files.npm run lint:health: no metric rose. The CHANGELOG union needed one blank line restored.First pass, at d07385d:
The runner re-ran AC-1..AC-4 verbatim in the worktree and every one holds:
1 1 1 1/0none, exit 0CI
testpassed on d07385d, which settles QA's only gap. Diff read: every removed copy matched the shared module, and the #1515 and #1484 behaviour inrun.tsandmerge-checkis unchanged.🤖 Generated with Claude Code