Repository navigation
plugins: derive the publisher from the repository owner, like a Go module path - #36281
Conversation
…Go module path The manifest publisher is deprecated and ignored for catalog and Git installs: catalog installs use the listing id, Git URL installs the URL owner, folders 'local' (or their still-declared publisher). Existing installs keep their key. A format 2 manifest may omit publisher only with engines.orca >=1.4.246, so older Orca reports 'requires Orca X' instead of failing to parse it. The v2 catalog documents an optional ownerId, which older Orca already strips.
Findings
|
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3affc271-8986-4aac-8a69-5399d4a800b2
Files selected for processing: 34-
config/scripts/validate-plugin-files.mjsdocs/reference/plugin-authoring.mddocs/reference/plugin-catalog.mddocs/reference/plugin-manifest.mddocs/schemas/plugins/orca-catalog.v2.schema.jsondocs/schemas/plugins/orca-plugin.v2.schema.jsonexamples/plugins/orca-gleam-syntax/orca-plugin.v2.schema.jsonsrc/main/plugins/__mocks__/plugin-uninstall-log-test-fixture.tssrc/main/plugins/catalog/plugin-marketplace-installer.test.tssrc/main/plugins/catalog/plugin-marketplace-installer.tssrc/main/plugins/installation/plugin-derived-publisher.test.tssrc/main/plugins/installation/plugin-install-staging.tssrc/main/plugins/installation/plugin-install.test.tssrc/main/plugins/installation/plugin-install.tssrc/main/plugins/plugin-bundled-bootstrap.tssrc/main/plugins/plugin-discovery.tssrc/main/plugins/plugin-example-gleam-syntax.test.tssrc/main/plugins/plugin-launch-content.test.tssrc/main/plugins/plugin-list-projection.tssrc/renderer/src/components/plugins/review/PluginUpdateCandidate.tsxsrc/renderer/src/components/plugins/review/PluginUpdateReview.tsxsrc/shared/plugins/catalog/plugin-catalog.test.tssrc/shared/plugins/catalog/plugin-catalog.tssrc/shared/plugins/catalog/plugin-marketplace.tssrc/shared/plugins/installation/plugin-file-validation.test.tssrc/shared/plugins/installation/plugin-file-validation.tssrc/shared/plugins/installation/plugin-host-version.tssrc/shared/plugins/installation/plugin-publisher-derivation.test.tssrc/shared/plugins/installation/plugin-publisher-derivation.tssrc/shared/plugins/manifest/plugin-manifest-v2-rules.test.tssrc/shared/plugins/manifest/plugin-manifest-v2-rules.tssrc/shared/plugins/manifest/plugin-manifest.tssrc/shared/plugins/manifest/plugin-schema-field-docs.tssrc/shared/plugins/manifest/plugin-schema-policy-notes.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
| Leave `publisher` out. Orca names the publisher after where the plugin comes from, the way a | ||
| [Go module path](https://go.dev/ref/mod#module-path) is its repository path: the owner of the | ||
| repository, lowercased (`acme` for `github.com/Acme/gleam-syntax`), so the plugin installs as | ||
| `acme.gleam-syntax`. Nobody can choose a publisher name that is not theirs. |
There was a problem hiding this comment.
Qualify the publisher-ownership claim.
“Nobody can choose a publisher name that is not theirs” contradicts the table immediately below it: a user-added catalog chooses the publisher through its entry id. Orca does not verify that catalog’s owner claim. State the official/community catalog rule separately so authors and users do not mistake a publisher name for proof of ownership.
| const entry = entries.find((candidate) => sameSource(candidate.source)) | ||
| return entry ? (splitQualifiedPluginKey(entry.pluginKey)?.publisher ?? null) : null |
There was a problem hiding this comment.
Reuse an installed publisher only for the same manifest ID.
installedPublisherFor selects the first lock entry with the same source without checking its plugin ID. If a repository changes its manifest ID while the old install remains, the next install assigns the old plugin’s publisher to the new ID instead of deriving the new installation’s publisher from its source. Match the staged manifest ID as well as the source before preserving an existing key; otherwise use the normal Git or local publisher rule.
| .positive() | ||
| .max(Number.MAX_SAFE_INTEGER) | ||
| .optional() | ||
| .catch(undefined) |
There was a problem hiding this comment.
Reject invalid ownerId values during catalog validation.
When a catalog entry sets ownerId to a string, zero, or an unsafe integer, .catch(undefined) drops the value. validatePluginFile then reports no error because it does not check the raw ownerId. Keep tolerant runtime parsing, but make catalog-file validation report the invalid field. Otherwise, a catalog can pass validation without the owner ID it claims to record.
ELI5
A plugin's "publisher" used to be whatever its author typed into the plugin file. Now Orca decides it from where the plugin comes from, the way Go names a module by its repository path: a plugin from
github.com/acme/duskis published byacme. Nobody can claim a name that isn't theirs, and authors no longer get rejected for typing a brand name.What Changed
Before: every plugin file had to say
"publisher": "acme", and Orca installed it asacme.<id>. Orca refused a catalog install when that text differed from the catalog's listing, and the community catalog refused authors who typed a brand name instead of their GitHub owner.After:
id. The official and community catalogs build that from the repository owner. Apublisherin the plugin file is ignored. The plugin's ownidmust still match the entry..and_become-). A URL with no owner part (host/repo.git) falls back to the declared publisher.local. A folder that still declarespublisherkeeps using it for now, so existing dev setups keep their approvals and data.publisheris optional and marked deprecated.validate:pluginprints a warning when it is present, and that warning does not fail the check. Leaving it out requiresengines.orca >=1.4.246.ownerId, GitHub's numeric owner id, which the community indexer records. This build reads it and leaves it out of the cached listing.The mechanism:
inspectPluginInstallTreeandinstallStagedPluginTreenow take an explicitidentity, either the listing's key or a derived publisher, instead of readingmanifest.publisher. Discovery passes the directory name's publisher.withPluginPublisheroverwrites whatever the file declared, so everything downstream (qualifiedPluginKey, the preview and the list) sees the derived publisher.Why
catalog-identity-and-scanning.md.publisherand compares it with the catalog:publisherout must declareengines.orca >=1.4.246. The validator enforces this. An older Orca then shows "Needs Orca 1.4.246" instead of failing on the manifest.id, so older Orca installs every listing it can read exactly as before.ownerIdlives only inorca-catalog.json. Its entries are parsed with a tolerant object in 1.4.245, which drops unknown keys (verified on thev1.4.245tag). It is never added to the frozenorca-marketplace.json.ownerIdbefore caching a listing, because the listing cache is strict and an older build reads it back after a downgrade.Linked Issue
N/A (maintainer change; CEO-approved design
catalog-identity-and-scanning.md, section 1).Visual Proof
N/A: no layout change. The publisher shown on update reviews now comes from the derived identity, and for every existing plugin that is the same text as before.
Testing
validate-plugin-files.mjson a plugin with a mismatchedpublisher→ two warnings, exit 0; on one with nopublisherand>=1.4.245→ floor error, exit 1)plugin-derived-publisher.test.ts:local.<id>plugin-publisher-derivation.test.ts: URL forms, GitLab subgroups,./_folding, URLs with no ownerplugin-marketplace-installer.test.ts:plugin-manifest-v2-rules.test.ts: the>=1.4.246floor applies when writing a manifest, and the host still reads one without itplugin-file-validation.test.ts: deprecation warnings, and a catalog withownerIdpassesplugin-catalog.test.ts:ownerIdis read and kept out of the strict cached listingpnpm tc,oxlint,pnpm run check:code-quality:changed, andpnpm test src/shared/plugins src/main/plugins src/renderer/src/components/pluginsall pass.Review
Agent skill upstream boundary
Notes
ORCA_REFto this PR's merge)Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)