Repository navigation
Conversation
There was a problem hiding this comment.
The fix works. I ran the reproduction script from #59750 from source with bad/package.json replaced by a directory. On the base, plugin loading dies with EISDIR, and /api/plugin and /api/provider come back empty, both at first boot and after POST /api/location/reload. With this change, both local plugins are active and the providers are listed in both cases. The plugin and core tests pass, and the new core test fails without the fix.
The public API is unchanged.
The change in packageManifest is sound. A missing package.json still falls back to the conventional entry files, because its read error is caught as well.
The new packages/core test in supervisor-reload.test.ts can be dropped so the change stays minimal: the small Host.resolve test in packages/plugin/test/host.test.ts already covers the fixed behaviour.
| ) | ||
|
|
||
| describe("PluginSupervisor reload", () => { | ||
| it.live("loads configured plugins when one manifest cannot be read", () => |
There was a problem hiding this comment.
The Host.resolve test in packages/plugin/test/host.test.ts already covers this one-function fix. This full-supervisor test adds a lot of setup for the same case and can be dropped to keep the change minimal.
There was a problem hiding this comment.
My earlier point is addressed: the packages/core test is gone, and the regression test in packages/plugin passes. The fix itself hasn't changed since I verified it with the reproduction script from #59750. The public API is unchanged. I have no further concerns.
Issue for this PR
Fixes #59750
Type of change
What does this PR do?
An unreadable local
package.jsoncould abort plugin discovery and leave every plugin unavailable. Treat a manifest read failure like an invalid or missing manifest, so resolution can fall back to conventional entrypoints.How did you verify your code works?
bun test test/host.test.ts --rerun-each 10inpackages/pluginbun run test,bun typecheck, andbun run typecheck:tscinpackages/pluginbun run checkat the repository rootThe unreadable-manifest regression fails on the unmodified base and passes with the fix. It uses a directory at
package.jsonto exercise a real read error on Windows and Unix.Visual
Screenshots / recordings
Not a UI change.
Checklist
Added by the opencode bot (AI-generated).
Related: #52618, #49982, #57089