Skip to content

Count all warnings in mcs doctor summary#352

Merged
bguidolim merged 1 commit into
mainfrom
bruno/doctor-warning-count
Jun 15, 2026
Merged

Count all warnings in mcs doctor summary#352
bguidolim merged 1 commit into
mainfrom
bruno/doctor-warning-count

Conversation

@bguidolim

Copy link
Copy Markdown
Collaborator

Summary

mcs doctor prints a warning when a pack artifact collides with a pre-existing file it doesn't manage (e.g. a skill whose name matches an existing unmanaged skill), but the summary line always reported 0 warnings for it. Only warnings raised by health checks were counted; advisories emitted around the check loop printed but were never tallied. The summary now reflects every warning the user actually saw.

Changes

  • The doctor summary count now includes warnings emitted outside the health-check loop — collision renames, an unregistered --pack id, and unreadable-state advisories.

Test plan

  • swift test passes locally
  • swiftformat --lint . and swiftlint pass without violations
  • In a project, add a pack whose skill name matches a pre-existing unmanaged .claude/skills/<name>, run mcs doctor → the collision warning is reflected in the summary's warning count (previously 0)
Checklist for engine changes
  • Integration tests updated (DoctorRunnerIntegrationTests)

- Inject a shared WarningCounter into CLIOutput so advisories emitted
  outside the check loop (collision renames, unregistered packs) are tallied
- Return DoctorSummary from DoctorRunner.run() and add regression tests
@bguidolim bguidolim merged commit 6d3dc0f into main Jun 15, 2026
7 of 8 checks passed
@bguidolim bguidolim deleted the bruno/doctor-warning-count branch June 15, 2026 19:08
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