You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The metadata-service sync path (loadMetadataFromService) and
MetadataFacade.register called registry.registerItem without the 4th
packageId param, so applyProtection never stamped _packageId /
_provenance on synced items — GET /api/v1/meta/:type consumers
(objectui NavigationSyncEffect, objectui PR #1668) could not tell
package-shipped code-defined metadata from user-authored rows and fell
back to the sys_ name-prefix heuristic, misclassifying third-party
plugin pages.
Fix: pass through each item's own _packageId (stamped upstream by the
metadata plugin's artifact loader). Never synthesize an id like
'metadata-service' — isArtifactBacked() keys two-tier write
authorization (allowOrgOverride vs allowRuntimeCreate) off a truthy
_packageId, so a fake id would flip authorization for runtime-authored
items. The nearby bindHooks packageId is an unbind-grouping label, not
provenance.
Deliberately unchanged: protocol.ts DB-hydration registerItem calls
(loadMetaFromDb / getMetaItems hydration / overlay-delete refill) stay
bare-key — ADR-0005 overlay precedence relies on the bare runtime row
shadowing the composite pkg:name artifact entry.
Also closes the filesystem-scanner gap: new MetadataPluginOptions
.packageId (the project's defineStack manifest id) lets hand-wired
kernels stamp scanned source-file metadata via the same applyProtection
call the artifact path uses. Unset → unchanged behavior; the option is
never guessed from package.json (npm name ≠ manifest id, and the value
feeds write authorization).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Metadata registered through the metadata-service path now carries package provenance. `loadMetadataFromService` and `MetadataFacade.register` pass each item's own `_packageId` through to `registry.registerItem` so `applyProtection` stamps `_packageId`/`_provenance: 'package'` (never a synthetic id — `isArtifactBacked()` write authorization keys off `_packageId`). New `MetadataPluginOptions.packageId` lets hosts running the filesystem scanner declare the owning package id for scanned source-file metadata, closing the same gap for hand-wired kernels. GET /api/v1/meta/:type consumers (e.g. objectui NavigationSyncEffect) can now distinguish package-shipped items from user-authored rows without name heuristics.
0 commit comments