Skip to content

samuel doctor: doesn't actually check plugin health despite help text #3

@ar4mirez

Description

@ar4mirez

Problem

samuel doctor's help text and the README advertise "framework + plugin health" (cmd/samuel doctor's short description, README.md tour section). But when run in a project with installed plugins, doctor only checks framework health — builtins and project layout. It has no awareness of installed plugins.

Repro

$ samuel install actix-web --allow-unsigned
✓ Installed actix-web@1.0.0 (skill)

$ samuel ls
Installed plugins (1)
  actix-web                      1.0.0      skill

$ samuel doctor
Samuel doctor
  ✓ samuel-builtins — samuel builtins 2.0.0-rc.6 synced
  ✓ project-layout — .samuel/ layout intact

Summary: 2 passed, 0 failed, 0 fixable, 0 fixed

Doctor would not detect:

  • A plugin whose files were modified after install (drift from the lockfile digest).
  • A plugin whose samuel-plugin.toml manifest is missing or corrupt.
  • A plugin whose lockfile entry was tampered with (or removed).
  • A [[plugins]] entry in samuel.toml with no corresponding .samuel/plugins/<name>/ dir.

Each of those is the kind of thing "verify plugin health" implies the command checks.

Suggested fix

Add a plugins check to the doctor pipeline that:

  1. Loads samuel.lock and iterates installed plugins.
  2. For each, confirms the on-disk directory exists.
  3. Recomputes the digest and compares against the lockfile entry.
  4. Validates the manifest (samuel-plugin.toml) parses and matches the lockfile's kind.
  5. Reports each plugin as ✓ <name>@<version> — signed/healthy/... or ✗ <name> — drifted/missing/....

Optional follow-on: --fixable could re-install drifted plugins from the registry.

Severity

Medium. Functional install still works; this is unmet advertised functionality. The doctor command was the user's first line of defense against quiet corruption; today it gives a false sense of security.

Found during

rc.6 manual testing — Test 3 of the post-install validation sequence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions