Skip to content

Plugin resolve failures: structured list instead of text match - #360

Merged
Minitour merged 1 commit into
fix/status-plugin-resolve-failuresfrom
fix/plugin-failures-structured
Oct 23, 2026
Merged

Minitour merged 1 commit into
fix/status-plugin-resolve-failuresfrom
fix/plugin-failures-structured

Conversation

@Minitour

Copy link
Copy Markdown
Member

Summary

Qodo follow-up for #358. Plugin failures were picked out of the warnings by the phrase "failed to resolve and was skipped". A warning from a plugin that did resolve could contain those words (for example an mcp.json diagnostic that echoes a key), and it would count as an install failure.

Stacked on #358: merge this into fix/status-plugin-resolve-failures first, then #358 into develop.

What changed

  • resolvePlugins (plugin-install.ts) returns failures: one message per declared plugin that failed to resolve. Each is still in warnings too, so callers that only print warnings are unchanged.
  • reportPluginResults (server install) and the passthrough install read failures instead of searching the warning text. The server install drops failures from the warnings by exact match, so the message is still shown once.

Test plan

  • New case: a warning that only mentions the words stays a warning and is not counted.
  • The existing reportPluginResults cases now pass { warnings, failures }.
  • resolvePlugins isolation test: a plugin with no manifest is returned in failures, and the same message is in warnings.
  • bunx tsc --noEmit; the CLI suite has no assertion failures (only the known Windows EBUSY temp cleanup).

Checklist

  • Tests added or updated
  • bunx tsc --noEmit passes
  • Docs updated (if user-facing): not needed

🤖 Generated with Claude Code

resolvePlugins now returns failures alongside warnings. The install
task and passthrough install use that list, so a warning from a plugin
that resolved can't count as a failure because of its text.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Track plugin resolution failures separately from warnings

🐞 Bug fix 🧪 Tests 🕐 10-20 Minutes

Grey Divider

AI Description

• Return plugin resolution failures separately so warning text cannot be mistaken for an install
 failure.
• Use the structured failures in both install paths while preserving warning output.
• Test failure reporting and warnings that merely echo the old failure phrase.
Diagram

graph TD
  P["Declared plugins"] --> R["Plugin resolver"] --> O["Warnings and failures"] --> S["Server install"] --> I["Install outcome"]
  O --> T["Passthrough install"] --> I
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Use typed diagnostic records
  • ➕ Distinguishes failures by type without relying on message equality.
  • ➕ Could carry plugin identity and richer diagnostic metadata.
  • ➖ Requires a broader change to warning producers and consumers.
  • ➖ Adds complexity for a focused classification bug.

Recommendation: Keep the separate failure list for this focused fix: it preserves existing warning consumers and removes phrase-based classification. Consider typed diagnostics if reporting needs grow; exact-match deduplication could otherwise hide an unrelated warning with identical text.

Files changed (5) +39 / -16

Bug fix (3) +23 / -12
resolve-plugins.tsReport server-install failures from structured resolver results +9/-5

Report server-install failures from structured resolver results

• Consumes explicit failures rather than filtering warnings by phrase. Removes matching failure messages from ordinary warnings before recording them through the existing install error policy.

src/cli/commands/install-tasks/resolve-plugins.ts

plugin-install.tsReturn plugin resolution failures alongside warnings +13/-4

Return plugin resolution failures alongside warnings

• Adds 'failures' to the resolver result and records one message for each skipped plugin in both lists. Sanitizes both lists before returning them.

src/cli/commands/plugin-install.ts

install.tsUse explicit failures in passthrough installation +1/-3

Use explicit failures in passthrough installation

• Uses the resolver's failure list instead of searching warning text when determining whether all declared plugins failed to resolve.

src/cli/utils/passthrough/install.ts

Tests (2) +16 / -4
plugin-resolve-isolate.test.tsVerify isolated resolution failures appear in both result lists +3/-0

Verify isolated resolution failures appear in both result lists

• Asserts that a plugin resolution failure is returned in 'failures' and that the same message remains in 'warnings'.

src/cli/commands/tests/plugin-resolve-isolate.test.ts

resolve-plugins.test.tsTest reporting with explicit failure lists +13/-4

Test reporting with explicit failure lists

• Adapts reporting tests to pass warnings and failures separately. Adds a regression case showing that a resolved plugin's warning containing the old failure phrase is not counted as a failure.

src/cli/commands/install-tasks/tests/resolve-plugins.test.ts

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@Minitour
Minitour merged commit 3d8209c into fix/status-plugin-resolve-failures Oct 23, 2026
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