Skip to content

fix(plugins): record all native fallback manifests of a source - #191

Open
adityaanikam wants to merge 1 commit into
getsentry:mainfrom
adityaanikam:fix-multi-native-fallback-190
Open

adityaanikam wants to merge 1 commit into
getsentry:mainfrom
adityaanikam:fix-multi-native-fallback-190

Conversation

@adityaanikam

Copy link
Copy Markdown

Fixes #190

When a plugin source has no root plugin.json but ships more than one
native manifest (for example .codex-plugin and .claude-plugin),
loadPluginInterfaces returned after the first match. Only that client
was recorded as an authored native interface, so the other manifest
was treated as unauthored and dotagents warned about an unmanaged
manifest when writing runtime files.

The loop now collects every native fallback manifest. The first match
in the existing priority order is still the primary manifest and
nativeSource, so single-manifest sources behave as before.

readInstalledPluginProvenance rejected any installed bundle whose
fallback marker listed more than one source while a native source
marker was present. That check now only requires the native source to
be one of the recorded fallbacks, otherwise reinstalling or reloading
a dual-manifest bundle would fail.

Adds a regression test covering discovery, install and reload of a
codex plus claude source. Verified on Linux (Node 24, pnpm 10.28.2):
plugins/store.test.ts passes 51/51 with the fix, and the new test
fails without it.

Copilot AI lite review requested due to automatic review settings September 23, 2026 17:50
@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown

@adityaanikam is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Address the fallback parsing behavior and extend the regression test through runtime manifest writing.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes handling of plugin sources with multiple native fallback manifests by preserving all fallbacks and validating their provenance.

Changes:

  • Collects all native fallback manifests while preserving primary priority.
  • Supports multiple fallback sources in provenance markers.
  • Adds dual-manifest discovery, installation, and reload coverage.
File Summary
packages/​dotagents/​src/​plugins/​store.ts Updates fallback discovery and provenance validation; malformed non-primary fallbacks may still abort discovery.
packages/​dotagents/​src/​plugins/​store.test.ts Adds dual-manifest regression coverage; does not yet exercise runtime manifest writing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 914 to 919
@@ -915,21 +918,21 @@ async function loadPluginInterfaces(
} catch (err) {
throw pluginManifestError(err, value);

This branch has not been deployed

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

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

warn: Claude plugin manifest exists and is not managed by dotagents

2 participants