Commit 655b106
fix(metadata): register a packages[] artifact per package at the metadata door (#14643)
The metadata artifact door iterated the flattened top level and stamped every
item with the artifact's own `manifest.id`. For an artifact composed with
`composeStacks(…, { manifest: 'preserve' })` that id is one arbitrary member's
(`selectManifest`'s 'last' pick), so a two-package artifact registered the
module's object under the App package's identity while the ObjectQL load path,
reading the same artifact's `packages[]`, owned it under the module's — two
answers to "who owns this object", one per door.
`_parseAndRegisterArtifact` now reads both shapes (ADR-0130 D4): `packages`
present → register each assembled package body's collections stamped with THAT
body's id; `packages` absent → the single-`manifest` branch runs exactly as
before (D7). Ordering and the entry gate are reused from
`resolveArtifactPackageOrder`, the same call the ObjectQL load path makes (D5),
so the two readers of one `packages[]` cannot disagree.
That function and `artifactPackageId` moved from `@objectstack/objectql` to
`@objectstack/core`: objectql depends on metadata, so the door could not import
them from where they lived, and core already owns `resolvePluginOrder` and is
already a dependency of both readers — no package edge added. objectql
re-exports both under their existing names, so its published surface is
unchanged.
A residual sweep keeps any top-level definition no package body repeats
(`packages` composes by `concat`), registered once under the artifact's own
identity and logged, so nothing a booted instance sees today disappears.
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8ed9c54 commit 655b106
11 files changed
Lines changed: 786 additions & 20 deletions
File tree
- .changeset
- packages
- core/src
- metadata/src
- objectql/src
- qa/dogfood/test
- runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
12 | 32 | | |
13 | 33 | | |
14 | 34 | | |
| |||
102 | 122 | | |
103 | 123 | | |
104 | 124 | | |
105 | | - | |
| 125 | + | |
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
0 commit comments