Skip to content

fix(plugins): name the audience in doctor's missing-plugin remedy - #225

Merged
TornquistK merged 1 commit into
mainfrom
workset/name-audience-in-verify-remedy
Dec 2, 2026
Merged

TornquistK merged 1 commit into
mainfrom
workset/name-audience-in-verify-remedy

Conversation

@TornquistK

Copy link
Copy Markdown
Collaborator

Summary

mate doctor (strict plugin verification) named the wrong install command for a missing audience plugin. Hydration already named MATE_AUDIENCE=<audience> mate install. Verify now builds its remedy from the same helper, pluginInstallCommand(origin).

 inspectDeclaredPlugins(): plugin not installed
   local origin    → pluginInstallCommand(origin)                          (unchanged)
-  base, audience  → "mate install --yes --frozen-plugins"
+  base            → "mate install --yes --frozen-plugins"                  (unchanged)
+  audience <name> → "MATE_AUDIENCE=<name> mate install --yes --frozen-plugins"

A frozen restore with MATE_AUDIENCE set installs that audience's workspace (installPluginWorkspaces), so the frozen form stays the remedy.

Evidence

  • Before (MATE_AUDIENCE=po mate doctor, audience plugins not installed):
    mate: plugin "@acme/reader" is not installed; run `MATE_AUDIENCE=po mate install`.      (hydrate)
    mate: plugin @acme/reader: not installed; run setup (`mate install --yes --frozen-plugins`) to install it   (doctor)
    
    Running doctor's command installs nothing for po.
  • After: not installed; run setup (\MATE_AUDIENCE=po mate install --yes --frozen-plugins`) to install it`.
  • Test: verify.test.ts › "a missing audience package names the audience in its install command". It failed on ff9315f with the doctor text above and passes now. The existing "a missing package says setup must install it" test pins the base text.
  • bun run format, bun run lint, bun run typecheck: pass. packages/mate-core bun run test: 7000 pass, 3 fail (vault.test.ts ×2, opencode-plugin/package-packaging.test.ts: timeouts under full-suite load; both files pass alone, 30/30).

OpenSpec change: name-audience-in-verify-remedy

Friction: command:doctor:1

Strict verification told a missing audience plugin to run `mate install --yes --frozen-plugins`, which installs nothing for the audience. Build the remedy from pluginInstallCommand(origin), as hydration does, so it names MATE_AUDIENCE=<audience>.
@TornquistK
TornquistK merged commit 1d41c68 into main Dec 2, 2026
1 check passed
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