Skip to content

Split src/doctor.ts: Windows checks into src/doctor-windows.ts (#141) - #143

Merged
paureis merged 3 commits into
mainfrom
refactor/141-doctor-split
Nov 4, 2026
Merged

paureis merged 3 commits into
mainfrom
refactor/141-doctor-split

Conversation

@paureis

@paureis paureis commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #141.

src/doctor.ts was about 5,257 tokens, over the file-size limit, so edits to it were blocked. The Windows checks from #108 (SystemRoot, execution policy, PATH entries that aren't full paths, Claude Code version) move unchanged to src/doctor-windows.ts, which exports windowsChecks. Everything that imported from doctor.ts imports the same names, and the check order, ids and messages are unchanged. The two files import each other's types only.

File Tokens (bytes / 4)
src/doctor.ts 4,108 (was 5,257)
src/doctor-windows.ts 1,248

Checks

  • cloudpin doctor and doctor --json (with CLOUDPIN_NO_UPDATE_CHECK=1) give byte-identical output on main and on this branch.
  • Control: with a relative PATH entry added, both show the "not full paths" warning, and the outputs are still identical.
  • No test file changed. npm run typecheck: exit 0. npm test: 1267 passed, 8 skipped.

🤖 Generated with Claude Code

paureis and others added 2 commits October 23, 2026 19:59
src/doctor.ts was about 5,257 tokens, over the 5,000-token limit for files
agents edit. The Windows checks from #108 (SystemRoot, execution policy,
path-relative PATH entries, Claude Code version) and their helpers move
verbatim to src/doctor-windows.ts; doctor.ts keeps the runner, the types
and the cross-platform checks, and calls windowsChecks in the same place.

No change in behaviour: same exports, check order, ids and messages.
doctor and doctor --json give byte-identical output before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paureis paureis added this to the 1.3.0 milestone Oct 24, 2026
@paureis
paureis marked this pull request as ready for review November 4, 2026 22:42
@paureis
paureis merged commit 8a11366 into main Nov 4, 2026
4 checks passed
@paureis
paureis deleted the refactor/141-doctor-split branch November 4, 2026 22:43
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.

Split src/doctor.ts: Windows checks into their own file

1 participant