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
{{ message }}
Repository navigation
Commit e8e0060
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metadata-protocol): a hydrated view expansion carries its container's tenant marker
On an unscoped kernel, registry hydration registered each expansion of a
stored environment-wide view container without the tenant-authorship
marker its container carries. An expansion of a package-bound container
then read as a code artifact through the registry's bare-key fallback:
the by-name read answered resettable and the layers read answered the
expansion as its code layer, where env_local answered neither.
hydrateExpandedViewItems now asks expandRuntimeViewContainer for
tenant-authored expansions: stateTenantAuthorship first, then the
expansion's own artifact envelope, the order the container gets. The
registry-free reads are unchanged.
Claude-Session: https://claude.ai/code/session_017ErfyP2Rx7XWHJA27QjyUi
Co-authored-by: Claude <noreply@anthropic.com>
An expanded view of a stored view container is reported as tenant-authored on an unscoped kernel, as it already was on an environment-scoped one: not resettable, and with no `code` layer
6
+
7
+
Clause-②: no
8
+
9
+
On an unscoped (control-plane) kernel, registry hydration registers each view a stored environment-wide container expands, under that view's own name. The container was registered with the tenant-authorship marker (`_provenance: 'org'`), and its expansions were not. An expansion of a container bound to a package therefore carried that package's id and no marker, and the registry's artifact lookup took it for a view the package ships. For such a name `getMetaItem` (`GET /api/v1/meta/view/NAME`) answered `resettable: true`, and `getMetaItemLayered` (`/layers`) answered the stored container's expansion as the `code` layer. The `code` layer was also wrong for an expansion of a package-less container. An environment-scoped kernel registers nothing, and answered `resettable: false` and `code: null`.
10
+
11
+
Each registered expansion now carries its container's marker, applied before the expansion's own artifact envelope, in the same order the container gets it. Where the container's own package ships a view of that name, that artifact's envelope still wins (ADR-0010 §3.3). Both kernels now give the same answer for every expanded name. Studio's reset affordance and its code-versus-overlay diff are drawn from these two values.
12
+
13
+
The save door is unchanged: it accepts a write by an expanded name on both kernels, as before, and the stored row then answers that name.
expect(outcomes[1],'the unscoped kernel answers the write as env_local does').toEqual(outcomes[0]);
1150
+
});
1151
+
}
1152
+
1153
+
it('CONTROL — an expansion its own package ships keeps that artifact\'s envelope over the marker (ADR-0010 §3.3): resettable, with the packaged code layer, on both kernels alike',async()=>{
0 commit comments