Skip to content

fix(opencode): report skipped plugins when no server entrypoint is found - #44372

Closed
AllanSantos-DV wants to merge 2 commits into
anomalyco:devfrom
AllanSantos-DV:fix/plugin-missing-entry-silent
Closed

AllanSantos-DV wants to merge 2 commits into
anomalyco:devfrom
AllanSantos-DV:fix/plugin-missing-entry-silent

Conversation

@AllanSantos-DV

@AllanSantos-DV AllanSantos-DV commented Aug 23, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #44367

Type of change

  • Bug fix

What does this PR do?

In the server plugin loader, the missing report callback was empty — an npm plugin whose package has no detectable server entrypoint was dropped with zero feedback, unlike install/compatibility/load failures which call publishPluginError. This fills it in with the same pattern:

Plugin <spec> skipped: Plugin <spec> does not expose a server entrypoint

How did you verify your code works?

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference, author can ignore or act on any point.

Right fix for a real gap — previously a plugin whose entrypoint couldn't be resolved vanished silently, and this closes that while keeping the wording consistent with the existing compatibility-stage message (packages/opencode/src/plugin/index.ts:380). I checked the loader side: report.missing fires exactly once per candidate and returns { retry: false } (packages/opencode/src/plugin/loader.ts:~301-321), so there's no duplicate-toast risk across retries, and it's correctly bypassed when the missing resolver hook recovers a value (e.g. TUI-only packages).

Two small suggestions:

  1. Make the message actionable. At packages/opencode/src/plugin/index.ts:192-194 you drop both the retry flag and the Missing payload the loader passes as the fourth argument. Including the plugin origin helps users act, e.g. `Plugin ${candidate.plan.spec} (${candidate.origin}) skipped: ${message}` — otherwise for config-sourced vs local-file plugins the report reads identically despite very different fixes.

  2. No regression test. The change is a pure side-effect on a report callback; a small assertion in packages/opencode/test/plugin/loader-shared.test.ts that a candidate failing resolution triggers publishPluginError with the skipped wording would pin both the wiring and the copy.

Otherwise good to merge.

Skip messages now include where the plugin was declared (scope + config
source) so a config-sourced and a local-file plugin failing for the same
reason no longer read identically. Formatting lives in plugin/report.ts
with a regression test pinning the wiring and the copy.
@AllanSantos-DV

Copy link
Copy Markdown
Author

Thanks for the careful review! Both points applied in e0d30fd:

  1. Skip reports now carry the declaring origin: Plugin acme-plugin@1.0.0 (local: /path/to/config-dir) skipped: ...
  2. Formatting extracted to plugin/report.ts, with a regression test (loader-shared.test.ts) pinning both the wiring and the exact skipped wording.

@Enough1122

Copy link
Copy Markdown

Both points look good - carrying the declaring origin into skip reports makes them actionable, and extracting the formatting behind regression tests keeps it stable. Verified e0d30fd covers both. Nothing further from me.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Desktop][Windows] npm plugin from config is silently never loaded — no install attempt logged, docs/cache mismatch

2 participants