Skip to content

fix(#1257): doctor fails outside a git repo; dry runs report planned, never passed - #1262

Merged
admarble merged 3 commits into
mainfrom
fix/1257-doctor-dryrun-honest
Oct 1, 2026
Merged

admarble merged 3 commits into
mainfrom
fix/1257-doctor-dryrun-honest

Conversation

@admarble

@admarble admarble commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1257 (AC-1 and AC-4). AC-2, AC-3 and AC-5 (missing remote, untracked skills, nonexistent issue) stay open on the issue.

What

sequant doctor outside a git repo used to warn and print "Sequant should work correctly" (exit 0). The git check now fails (exit 1) with Not inside a git repository. Run sequant from your project's git checkout (or git init first). Detection asks git rev-parse --is-inside-work-tree when .git is absent, so running doctor from a subdirectory of a repo still passes (the old .git-only check would have failed there once it became a hard failure).

sequant run --dry-run used to report ✔ passed and 1 passed · 0 failed, even for an issue that does not exist. Every surface now says the issue was planned, and nothing shows a check mark:

Surface Before After
Summary grid / narrow list ✔ passed ○ planned
Summary tally (header + footer) 1 passed · 0 failed 1 planned · nothing executed
Non-TTY and TTY progress lines ✔ #1 spec 0s ○ #1 spec planned
Ink TUI teardown line ✔ #1 Issue #1 ○ #1 Issue #1 (planned)

dryRun reaches the renderer through buildProgressWiring → RenderOptions.dryRun, and the TUI through RunSnapshotConfig.dryRun (set only when true, so existing snapshot equality is unchanged). run.ts is 199 lines, under its 200 cap.

Verification

  • /verify (human-confirmed) in a non-git scratch dir, a repo subdirectory, a real pty (TUI) and piped; evidence on fix(doctor/run): doctor and run --dry-run report success when nothing would work #1257.
  • Affected suites: src/ui/tui, src/lib/cli-ui, run-orchestrator*, run-state, src/commands/run*, doctor unit + integration, recovered-failure, run-pipeline, cli and aider integration: all pass (511 + 74 + 35; the one expected fail is a pre-existing it.fails).
  • tsc --noEmit clean; prettier clean.

Mutation records

Each mutation below was applied alone, the four gate files were run, and the tree was restored clean afterwards.

Mutation-verified: AC-1 — doctor git check status "fail" reverted to "warn"; fails and exits 1 outside a git repository failed; restored.

Mutation-verified: AC-1 — dropped the git rev-parse fallback (.git-only detection); passes in a subdirectory of a repository, where .git is absent failed; restored.

Mutation-verified: AC-4 — summary row ignores dryRun; grid layout labels the row planned and counts nothing as passed failed; restored.

Mutation-verified: AC-4 — summary tally ignores dryRun; narrow layout labels the row planned and counts nothing as passed failed; restored.

Mutation-verified: AC-4 — renderer progress lines ignore dryRun; non-TTY renderer prints the phase as planned, with no check mark failed; restored.

Mutation-verified: AC-4 — TUI teardown ignores dryRun; marks each issue planned instead of passed failed; restored.

Mutation-verified: AC-4 — orchestrator snapshot drops dryRun; sets config.dryRun on a dry run failed; restored.

The progress-line mutation also failed the TTY test (TTY renderer prints the phase as planned, with no check mark), and the summary mutations failed both the grid and narrow cases. No other test failed under any mutation.

🤖 Generated with Claude Code

… never passed

doctor: the git check fails (exit 1) instead of warning, and asks git itself so a subdirectory of a repo still passes. run --dry-run: the summary grid, narrow list, tally, non-TTY and TTY progress lines and the Ink TUI teardown line all read "planned" with no check mark; the flag reaches the TUI through RunSnapshotConfig.dryRun.

Claude-Session: https://claude.ai/code/session_01VpUo5Vzp2kJErZDRxF24iy
Entire-Checkpoint: 1fd3188a8539
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.

1 participant