Remove redundant doctor command in favor of apply --dry-run#16
Merged
Remove redundant doctor command in favor of apply --dry-run#16
doctor command in favor of apply --dry-run#16Conversation
Agent-Logs-Url: https://github.com/satococoa/git-worktreeinclude/sessions/c3828947-de6e-4d73-84e3-b3a342bb7d15 Co-authored-by: satococoa <31448+satococoa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Discuss necessity of doctor command
Remove redundant Apr 5, 2026
doctor command in favor of apply --dry-run
There was a problem hiding this comment.
Pull request overview
Removes the redundant doctor CLI surface and consolidates diagnostics into the existing apply --dry-run --verbose path, simplifying both CLI and engine APIs.
Changes:
- Removed
doctorsubcommand from the CLI and documentation; positionedapply --dry-run --verboseas the diagnostic workflow. - Removed
Engine.Doctor()and associated types, relying onApply(..., DryRun: true)metadata instead. - Updated integration/unit tests to validate the dry-run diagnostic path instead of
doctor.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Removes doctor docs and points diagnostics users to apply --dry-run --verbose. |
| internal/engine/engine.go | Deletes DoctorOptions/DoctorReport and Engine.Doctor(), consolidating on Apply. |
| internal/engine/engine_integration_test.go | Replaces Doctor() assertions with Apply(..., DryRun: true) coverage for metadata/hints. |
| internal/cli/cli.go | Removes doctor command wiring/implementation and codedOrDefault helper. |
| internal/cli/cli_unit_test.go | Drops unit test for the removed codedOrDefault helper. |
| internal/cli/cli_integration_test.go | Replaces doctor CLI tests with apply --dry-run --verbose equivalents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add DryRun bool field to Result struct (JSON: "dry_run") - Split Summary.Copied into Copied (real mode) and CopyPlanned (dry-run mode) with omitempty for mutual exclusivity - Update executePrepared to increment CopyPlanned in dry-run, Copied in real mode - Update SUMMARY human output to use copy_planned= in dry-run mode - Update jsonResult struct in CLI integration tests - Add TestApplyDryRunJSON CLI integration test - Add TestEngineApplyDryRunCopyPlanned engine integration test - Update README with separate dry-run and normal JSON output examples Agent-Logs-Url: https://github.com/satococoa/git-worktreeinclude/sessions/b43b6731-413f-4d2f-ae93-143bd52bfa32 Co-authored-by: satococoa <31448+satococoa@users.noreply.github.com>
…ummary-split feat: distinguish dry-run copies in JSON and human output
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.
doctorwas effectively a dedicated wrapper around dry-run behavior. This change removes that duplicate command surface and makesapply --dry-runthe single diagnostic path.CLI surface
doctorsubcommand from the root commandapply, with--verboseas the richer human-readable modeEngine cleanup
DoctorOptions,DoctorReport, andEngine.Doctor()Apply(..., DryRun: true)metadata/output instead of maintaining a parallel execution pathDocs
doctorsection from the READMEapplyflag docs to point users to--dry-run --verbosefor diagnosticsTests
doctor-specific CLI and engine assertions with equivalentapply --dry-runcoverageExample: