feat(doctor): add typed diagnostics domain#1225
Conversation
|
Maintainer action requested: please apply the sole |
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds a shared typed doctor diagnostics package, migrates CLI checks to its runner and result model, and updates CLI and package tests for structured remedies, stable IDs, panic-safe ordering, and exact report output. ChangesDoctor diagnostics model
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/doctor/doctor.go`:
- Around line 71-79: Update Runner.Run to recover panics independently around
each check.Run(ctx) invocation, allowing subsequent checks to execute and the
report to be returned. Convert a recovered panic into a consistent failed Result
for that check, preserving its check.ID and including the panic details via fmt
as indicated; keep normal check results unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 00245c4a-98ed-41d3-b758-72ad0b689e91
📒 Files selected for processing (4)
internal/cli/doctor.gointernal/cli/doctor_test.gointernal/doctor/doctor.gointernal/doctor/doctor_test.go
|
Implemented the Slice 1 follow-up in
Verified domain, focused CLI, and exact-output tests with @coderabbitai review |
|
✅ Action performedReview finished.
|
Linked Issue
Closes #1197
PR Type
type:feature- New featuretype:bug- Bug fixtype:docs- Documentation onlytype:refactor- Code refactoringtype:chore- Maintenance/toolingtype:breaking-change- Breaking changeSummary
Changes
internal/doctor/doctor.gointernal/doctor/doctor_test.gointernal/cli/doctor.gointernal/cli/doctor_test.goTest Plan
go build ./...passes.go vet ./...passes.go test ./...passes locally. Existing unrelated Windows platform/config failures remain; the affected doctor package passes.git diff --check upstream/mainpasses.Contributor Checklist
Closes #1197.type:featureas the soletype:*label.Chain Context
mainate4a085327ad2d2a8912ebf5cce0148ba0035324e312+,66-)838da6ec11ac163c0e1d54af3d8b2521d1cd2b39Scope
Boundaries
upstream/mainate4a0853.838da6e, changing only the four files listed above.838da6eand39e09ab.