Repository navigation
Commit e336a33
fix(objectql)!: every reader of the registry's overlay slot binds a row of an App's customization pair by the exact read's owner rule (ADR-0150 D4) (#32815)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuL52R8FMLzUQgRajtajcGYX)_
Supersedes #32557 (same work; its branch claude/project-thread-3e08el
could not be pushed from this container). Its review history stays
there: review records 6815300751 and 6815340803.
Fixes #32408
Follow-up: #32561
Clause-②: yes (narrowing) — two refusals where a registration was
admitted before. First (row 1), with the bare-name holders sealed, a
package whose only members of an email template's name are locales the
App ships none of, while the App's pair stores a row of that locale
declaring another package of the App (`overrides.package`), is refused
naming the App as an addition to the App's template, where it was
admitted because the pair's row counted as the App's own member. Second
(row 13), with the holders sealed, a package of another namespace on a
package X that holds an email template's name alone (or one that X's
dependencies reach), shipping only a locale X ships none of, while a
package-less row of that locale (a legacy overlay in the environment's
slot) customizes X's template, is refused naming X as an addition to X's
template, where it was admitted because that row counted as X's member;
once admitted, the row bound to neither package and the cold boot's seal
reported the package. First-party packages in either position: 0. The
previous head's admission beside X (row 12) is withdrawn (epic ruling
6838245909, option B): where a row of the App's pair now binds to X, the
bare-name gate lends X no locale, so a package of another namespace on X
shipping only that locale is refused and reported as on `main`, in
either registration order; admitting it is #32899. Beside them, a read
withholds a row it served: with every package of the App that holds the
name disabled, a row of the App's pair is that disabled holder's, so the
bare read and an addition's address withhold it as they withhold any
name only disabled packages hold (rows 10 and 11). Every moved answer is
in the table below and in the changeset.
Metadata-protocol: narrowed
Skills-docs: none — no file under `skills/**` or `content/docs/`
describes how a customization pair's row binds in the registry; ADR-0146
D2/D3 and the epic's ruling on #31699 F2 already state the rule this PR
makes every reader follow.
## 维护者速读
- 改了什么:App 的定制包(`APP.custom`)里存的一行,注册表的其余读者(持有者集合、bundle
成员、按包读取、环境项)现在和精确读(`?package=`)用同一条归属规则判它归谁:行声明了 `overrides.package` →
只归它;没声明时 App 自己持有 → 归 App;App 内只有一个包持有 → 归它;两个以上 → 谁也不归。
- 为什么改:ADR-0150 D4。以前只按 pair 的前缀找 base,pair 自己变成第三个「持有者」让裸读误报 409,或把声明给
X 的行算成 App 的。
- 风险与回滚:新拒绝是两处安装窄化(第一方都是 0 个),同一条 ADR-0087 语义条目登记两处(id 不变):第 1 行(pair
行声明给 X 的 locale,不再算 App 的)和第 13 行(环境槽里没有包戳的旧覆盖行;来者只出这个
locale,两道门现在把来者算作已登记,这行谁也不归,来者成了对 X 模板的追加,拒 422 点名 X;以前放行之后 X 丢了这行、冷启动
seal 报它)。上一版的第 12 行放行已按专题裁定 6838245909(B)撤回:裸名门读持有者成员时,pair
行只在按包读法也给同一持有者时才算数,所以 X 在门上拿不到这个 locale,W 在两种注册顺序下都和 main 一样被拒、被 seal
报告;放行改由 #32899 在按名读跟随绑定之后再做。合 main
后与「停用包不持有名字」(#32497)组合多出两处随之而来的答案(全部持有者停用时裸读不再给出这行),已声明并钉测;三处注册表答「无包」而精确读照给的残余分歧交
#32561;回滚即 revert。
- 先看:`packages/objectql/src/registry.ts` 的 `pairRowBinding` /
`settledPairRowBinding` / `ownersHoldingAName`,以及裸名门自己的读法
`gateSlotBinding`,再看 changeset 的 FROM → TO 列表。
- 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run
src/package-scoped-resolver.test.ts
src/package-scoped-exact-qualifier.test.ts`,预期全部通过。
- 合同评审 6835646675 的回应:F1(语义条目第三条补救会被保存门拒)已删;F2 实测成立,当时补了第 12 行与
pin(本轮已撤回,见下),并修了它暴露的热路径/冷启动不一致;F5 表格第 10、11 行补了 Clause-② 臂;F3、F4
按席位记为接受偏差(见验收说明)。
- 增量评审 6837360468 的回应:N1 实测复现,保留到达计数,第 13 行在 changeset 的 Clause-② 行和
FROM → TO 里声明为窄化,三道门各钉一个 pin(去掉到达计数,两道门的 pin
变红),语义条目扩写了这一处(两条补救都在门上实测过);N2 的形状(够到两个 App 的包)走裸名门的同一读法,和 main 一样被拒,它的
pin 在 #32903 第 4 条。
- 专题红线复读 6838271054 与裁定 6838245909 的回应:席位选 B(6838268615),撤回第 12
行,三种形状、三道门、两种注册顺序都钉了 main 的答案;必修 3 因此由 seal 在反向顺序也照 main 报告而关闭;必修 1 即
N1。按名读四格交 #32899,两条旧缺陷交 #32900(p1)和 #32901(p2),nits 交 #32903。
- 增量红线读 6841098779(HOLD,仅文字)的回应:H1 在第 13 行、changeset 的第二处拒绝和条目的 surface
各补了镜像方向(X 的依赖触达到达包,同样拒绝、同样补救、同一条目);H2 在第 3 行和 changeset 的
`packageScopedHoldersOf` 一条补了半句(pair 行 L 声明给 X,W 是 App 的包、带 L 和一个 X 也有的
locale,W 停用时 L 的裸读由 409 变为扣下,不算放宽)。代码与测试未动。
- 本 PR 取代 #32557:同一份改动,换到本线程分支续做(原分支从本容器推不上去);#32557 上的评审记录照旧有效。
- 需要你做的:无,席位落地。
## What the card asked, measured (step 1)
Measured on `27abd458a8` (PR #32214's final head), App `A` (`type: app`)
with packages `X`, `Y` (`type: module`, each declaring `A`), and a row
stored in `A.custom` hydrated into the registry's bare slot:
| Case | `overlaySlotBinding` (BASE) | `bundleMembersHeldBy` X / Y / A /
pair (BASE) | `getEnvironmentScopedItem` (BASE) |
|---|---|---|---|
| X, Y hold; row declares X | the pair itself | en-US / en-US / — /
fr-FR (the row is X's on no reader) | undefined |
| X, Y hold; no declaration | the pair itself (a third holder) | en-US /
en-US / — / fr-FR | undefined |
| X holds; no declaration | the pair itself (a second holder) | en-US /
— / — / fr-FR | undefined |
| A, X hold; row declares X | A | en-US / — / **en-US, fr-FR** / — (X's
row counted as the App's) | undefined |
| A, X hold; no declaration | A (#28390 ruling A) | en-US / — / en-US,
fr-FR / — | undefined |
Both readers bound the row without reading `overrides.package`, and the
binding never looked through the App (`isPairOf`): it read the pair's
per-package base (`customizationBasePackageId`) only.
`getEnvironmentScopedItem` never served a pair's row in any case, before
or after: its reach is none.
## What changes
`SchemaRegistry#overlaySlotBinding`
(`packages/objectql/src/registry.ts`) asks a new `pairRowBinding` for a
row stored in a customization pair when some holder of the name is a
package that pair customizes (`isPairOf`, `@objectstack/metadata-core`).
It reads the row the way the exact read's one owner check does
(`pairRowOnAddress`, `@objectstack/metadata-protocol`): the declared
holder when the pair customizes it, else the App whose own pair it is
(#28390 ruling A), else the one owner, else no package.
- Owners are counted as the exact read counts holders
(`packageScopedHoldersOf`), over every holder of the name with every row
bound to it (`ownersHoldingAName`): a bundle addition to another holder,
of the App or outside it, holds no name (#28802); a package a row of the
pair is declared for holds that row's locale; the undeclared rows of the
pair being decided are left out (`settledPairRowBinding` splits them
off). An addition that ships the row's own locale stays an owner, since
the row may customize that package's member.
- When the count would read an undeclared row of another shared pair,
the row binds to no package (epic seat 1's ruling: no guess, no fixed
point).
- Every holder is counted, a disabled one included: a binding never
moves with a reversible disable (ADR-0150 D3, #32183, merged with this
branch). The served filter applies after the binding, in
`packageScopedHoldersOf`.
- A declared package the pair's holders do not include binds the row to
no package. A pair no holder is customized by keeps the per-package
reading, so every one-holder and legacy per-package-pair case binds as
before. The registry imports the pair lookup from
`@objectstack/metadata-core`; it does not import
`@objectstack/metadata-protocol`.
- **The bare-name gate reads a pair row its own way** (epic ruling
6838245909, option B). Both doors and the cold boot's seal read a
holder's members through `registeredBundleHolding`, which now reads a
bare-slot row through `gateSlotBinding`: the binding above, except that
a row of a customization pair counts for a holder only where the
per-package reading (the pair's base when it holds the name, else the
pair itself) counts it for that holder too. Where the binding moved the
row (to X, from the App or from the pair), the gate counts it for no
holder. The App no longer holds a locale it shipped none of through a
row declared for X (row 1); X does not gain the row's locale either, so
a package of another namespace on X shipping only that locale stays an
addition to X's template, refused at both doors and reported by the seal
in either registration order, as on `main` (row 12, withdrawn). The
reads keep the binding. Admitting that package waits on the by-name read
following the binding (#32899): in that state the protocol's by-name
read answers by registration order (red-line read 6838271054, "For the
epic seat" item 2).
- **The doors read a holder's members as if the arriving registration
were registered** (contract review 6835646675 F2, delta review
6837360468 N1). `registeredBundleHolding` takes the arrival
(`BundleArrival`: the members the registration adds) and reads the
holder's members over a copy of the collection with those members in the
arriving package's composite slot; both doors pass it (`registerItem`'s
gate, `refuseBareNameConflicts`), and the seal reads the registered
state. Under the gate's reading above it moves one answer, the
package-less row's (no package stamp, or `sys_metadata`): such a row
binds to the one composite holder of the name only while there is
exactly one, so beside the arrival it binds to neither and the arrival's
locale is an addition to X's template (row 13), as the seal already read
it. The previous head also lent the incoming manifest to the pair-row
binding at the package door. Under the gate's reading no pair row's
count moves with the arrival, so that part is removed: ablated at the B
code it turned nothing red (396 of 396 green over the two harness files
and `registry-bare-name-one-holder.test.ts`).
- The four readers (`packageScopedHoldersOf`, `bundleMembersHeldBy`,
`getPackageScopedItem`, `getEnvironmentScopedItem`) share the one
binding; the bare-name gate's member count (`gateSlotBinding`, above) is
the one place a pair row is read otherwise, and only to withhold a
member. After the merge with `main` (two commits moved `registry.ts`
since the branch point: #32497 and #32513), `overlaySlotBinding` is
still the only binding of a bare-slot row in the registry: #32497's
served filter applies after it inside `packageScopedHoldersOf` (and its
`includeDisabledPackages` read keeps every holder), and #32513's
picklist re-judge reads holders through `resolvePackageScopedName`, so
through `packageScopedHoldersOf`. No reader on the merged tree binds a
pair row a second way.
- **Upgrade guide**: the semantic entry
`pair-row-locale-addition-refused`
(`packages/spec/src/migrations/entries/semantic/18.pair-row-locale-addition-refused.ts`),
registered by the changeset (`adr-0087: registered
pair-row-locale-addition-refused`), with its own `@objectstack/spec`
patch changeset. It names two remedies: ship a locale the holder ships
too (the App, or X for the package-less row), or rename the template;
the third one an earlier head named (drop the row's declaration, or
declare the App) is gone, since the save door refuses both in the case
the entry names (contract review F1). This round extends the same entry,
id kept, to the package-less row (row 13): its `surface`, `replacement`,
`reason` and `acceptanceCriteria` name both narrowings, and its `reason`
says the gate no longer counts the pair row as the App's. Both remedies
were measured at both doors for both shapes on the B code (scratch
probe, not committed): renaming the template is admitted at the item
door and the package door; shipping a locale the holder ships too is
admitted at the package door in either member order, and at the item
door when that shared locale registers first, while registering the
L-only member first is still refused, so the entry says so. No automatic
rewrite: which locale a package ships, and which base a pair row
customizes, are judgements about that package and that row.
Branch note (Duplicate Fix Guard): this PR replaces #32557. Its branch
`claude/project-thread-iv3vz6` is this card thread's, which the platform
assigns; it carries the whole history of #32557's branch
`claude/project-thread-3e08el` (head `075fb318`), then `origin/main`
merged in (`7bea2a2ae`) and the landing commits on top, never rebased,
never force-pushed. `3e08el` is not pushable from this container. Since
that merge `main` gained #32742 (its `registry.ts` change is the
permission-set namespace claim only, no reader of a pair row), #32793,
#32797 and #32801; a trial merge (`git merge-tree`) is clean, and the
merge queue tests the merge.
### FROM → TO
Re-measured on the merged tree (head `acc680227`, `origin/main`
`2f80f2897` merged at `7bea2a2ae`): with the binding ablated (the
per-package reading put back) every binding pin answers its FROM below;
restored, its TO. Rows 10 and 11 are new on the merged tree: they follow
from row 2 meeting `main`'s served holder set (#32497). Row 12, contract
review F2's mirror of row 1 that the previous head admitted, is
withdrawn (epic ruling 6838245909, option B): its shapes keep `main`'s
answer in both registration orders and are pinned so. Row 13 is delta
review 6837360468 N1: the doors' arrival count (not the binding) moves
it. Its mirrored direction, where X's dependencies reach the arriving
package, moves the same way: the delta red-line read 6841098779 measured
it (H1; `main` admits, the head refuses naming X, both stamps, both
doors), and the changeset and the entry's `surface` name it. Row 3's
exception with a disabled arrival is that read's H2.
| # | Surface | FROM | TO | Clause-② arm | Pinned in |
|---|---|---|---|---|---|
| 1 | Bare-name gate (`registerItem` / install, holders sealed): a
package with only a locale the App does not ship, while the App's pair
overrides that locale for X | admitted (the pair's row counted as the
App's member, so no addition) | refused `NAMESPACE_CONFLICT` naming the
App (#28802 addition rule) | narrowing | resolver harness, `NARROWING —
a later package whose only locale…` |
| 2 | `packageScopedHoldersOf`: the App holds no item of the name | the
pair counted as a holder of its own | never a holder | — (feeds 3, 4,
10, 11) | `bound to X → only X`, `unbound with two…`, `unbound with
one…` |
| 3 | Bare read (`GET /meta/TYPE/NAME`, `resolvePackageScopedName`), one
served package of the App holds the name | `409
ambiguous-in-environment` naming X and the pair | the row (X's
customization), or X's own item when the row declares a non-holder; two
real holders still refuse; with the row (of locale L) declared for X and
a package W of the App holding the name through L and a locale X ships
too, W disabled, the bare read of L is withheld (FROM `409`; no
loosening) | widening (epic seat 1: a corrected false 409) | `unbound
with one package…`; `CONTROL — two real holders…`; the door probe below
|
| 4 | Bare read and `?package=A` refusals, two packages of the App hold
the name | `409` naming X, Y and the pair | `409` naming X and Y | —
(candidate list) | `unbound with two packages…` |
| 5 | `getPackageScopedItem(X)`: row declares X, or X is the one owner |
X's own shipped item (none for an added locale) | the row, what
`?package=X` already served (outside the residuals below) | — | `bound
to X → only X`, `bound to X beside the App…`, `bound to X, a bundle
member…`, `unbound with one…` |
| 6 | `getPackageScopedItem(A.custom)` | the row | none (the pair is no
holder; `?package=A.custom` still serves the row) | — | `unbound with
two…` |
| 7 | A holder's bundle members (`bundleMembersHeldBy`): row declares X
| counted as the App's (or the pair's) | counted as X's | — (feeds 1) |
`bound to X, a bundle member…` |
| 8 | `?package=A`, row declares a package that holds no item of the
name | the row (the exact read fell back to A's registry item, which was
the row again) | A's own item | — (semantic) | `a row declaring a
package that holds no item…`; the door probe below |
| 9 | `getEnvironmentScopedItem` | undefined | undefined | — (unchanged,
measured) | every case asserts it |
| 10 | Bare read of the row's member, every package of the App holding
the name disabled (two holders, or one) | the row (the pair an enabled
holder of its own) | the disabled holder's withheld item, as for any
name only disabled packages hold (ADR-0150 D3) | narrowing (a read
withholds a row it served) | exact-read harness, `[#32408, #32183] a row
of the App's pair is bound over every holder…`, `[#32408, #32183] a row
of the App's pair bound to its one holder…` |
| 11 | `?package=Z`, Z of the App an addition to the row's one holder X,
X disabled | the row | X's withheld item (the address reads the disabled
base) | narrowing (a read withholds a row it served) | `[#32408, #32183]
a row of the App's pair bound to its one holder…` |
| 12 | (withdrawn) Bare-name gate (item door, package door, cold boot),
the App holding no item of the name: a package W of another namespace
whose dependencies reach X ships only locale L, while a row of the App's
pair of locale L binds to X (it declares X, with W of the App or outside
it; or X is its one owner, with W outside the App); and the reverse
order, W holding L first, then X arriving | refused `422
NAMESPACE_CONFLICT` naming X, and the seal reports W against X; reverse
order: X refused naming W, and the seal reports X against W | unchanged:
the gate lends the row's locale to no holder (the previous head admitted
W at both doors, and its seal reported nothing in either order) | —
(withdrawn; #32899) | resolver harness, `ROW 12 WITHDRAWN (epic ruling
B), …` and `REVERSE ORDER (epic red-line read must-fix 3), …`, three
shapes at three doors each |
| 13 | Bare-name gate (item door and package door, holders sealed): X
holds the name alone, a package-less row of locale L (no package stamp,
or `sys_metadata`) customizes X's template, and a package of another
namespace whose dependencies reach X (or that X's dependencies reach)
ships only L | admitted (the row counted as X's member, so no addition);
after it, the row bound to neither package, X's address no longer served
it, and the seal reported the package against X | refused `422
NAMESPACE_CONFLICT` naming X (an addition to X's template); X keeps the
row; the cold boot's seal reports the package against X, as before |
narrowing | resolver harness, `NARROWING (delta review N1), item door /
package door / cold boot` |
Unchanged at the doors (contract review F2): the same package of the App
beside an undeclared row of L that X is the one owner of is refused (and
reported at the seal) as before, and X keeps the row: the gate lends the
row's locale to no holder (`UNCHANGED at the door (contract review F2),
…`). Delta review N2's shape (a package reaching two Apps whose
namespace picks another, or none) takes the same reading: an App pair's
row counts at the gate only for the holder the per-package reading
names, which no arriving package's App moves; it is not pinned here
(#32903 item 4). The same package declaring X's namespace is refused
before and after.
Unchanged, measured on the protocol (`getMetaItem`) for the same cases:
`?package=X`, `?package=Y`, `?package=A.custom`, and `?package=A`
outside row 8, serve or refuse as before; the App's own address keeps an
undeclared row of its pair (`CONTROL — the App's own address keeps
#28390 ruling A`).
## Tests
- `packages/objectql/src/package-scoped-resolver.test.ts` (the shared
harness): one describe, 38 cases. New in this round, 21: `NARROWING
(delta review N1)` at the item door, the package door and the cold
boot's seal (row 13); `ROW 12 WITHDRAWN (epic ruling B)` and `REVERSE
ORDER (epic red-line read must-fix 3)`, each in three shapes (a row
declaring X with W of the App, the same with W outside the App, an
undeclared row X alone owns with W outside the App) at the same three,
in place of the previous head's three `WIDENING` pins. From the previous
round, three: `UNCHANGED at the door` (an undeclared row X is the one
owner of, W of the App). The other 14: The card's three pins (bound to X
→ only X, with and without the App holding, and as a bundle member;
unbound with two → neither; unbound with one → that one), the narrowing,
the declared non-holder, the ruling-A CONTROL, the epic seat's CONTROL
(two independent holders still refuse the bare read, with or without a
pair row beside them), contract review F1's pair and its CONTROL, F4's
two (b and a), and F6's CONTROL.
- `packages/objectql/src/package-scoped-exact-qualifier.test.ts` (its
#31699 F2 describe): the F1 case read through `?package=X`, served there
and bound to X by the registry alike; the F4 (b) case, refused at
`?package=X` naming X and the addition, and bound to no package alike.
New on the merged tree, two cases: one of two holders disabled,
`?package=X` serves the row while the registry binds it to no package
(CONTROL, residual 3), then both disabled, the bare read withholds it
(row 10); a row bound to its one holder, disabled, withheld at the bare
read and at an addition's address (rows 10, 11).
- **Ablations on the final head** (`scripts/ablation-replace.mjs`, at
`acc680227`, the two harness files, 306 tests; each mutation landed
(anchor 1 → 0) and each restored by the tool, blob equal to HEAD
`0777d5ee621d` and `git diff HEAD` empty):
- The gate's own reading removed (`return bound === perPackage ? bound :
undefined;` replaced by `return bound; // ABLATED #32408 B`, so the gate
reads the binding as the reads do): **13 failed / 293 passed**. The nine
`ROW 12 WITHDRAWN` pins (each package admitted, or at the cold boot
nothing reported), the three cold-boot `REVERSE ORDER` pins (nothing
reported), and the package-door `UNCHANGED` pin (without the gate's
reading, the package door judges before the arriving package is
installed, so the binding does not yet count it an owner of the pair and
the undeclared row stays X's). The item-door and package-door `REVERSE
ORDER` pins stay green: the doors refused X naming W on `main` and at
the previous head alike.
- The doors' arrival count removed (`opts.incomingArrival && {
packageId: incomingPackageId, ...opts.incomingArrival })` replaced by
`undefined) // ABLATED #32408 N1`): **2 failed / 304 passed**, exactly
the item-door and package-door `NARROWING (delta review N1)` pins (each
package admitted). Under the gate's reading the `UNCHANGED` door pins no
longer hang on the arrival; the cold-boot pins stay green, as the seal
reads the registered state. Under the same ablation a scratch probe of
row 13 (both stamps: none and `sys_metadata`) read its FROM cells:
admitted at both doors, X's address no longer serving the row
afterwards, a second seal reporting the package against X; at the head
the probe reads the TO cells (refused naming X, X keeping the row, the
reseal empty).
- The binding put back to the per-package reading (the anchor below):
**22 failed / 284 passed**: every binding pin, the item-door and
package-door `UNCHANGED` and `ROW 12 WITHDRAWN` pins on their `X keeps
the row` cells (row 5's TO; each refusal holds), and none of the
cold-boot or `REVERSE ORDER` pins, whose answers are `main`'s.
- **Ablations on the previous rounds' code**: at `7509d920b` (288
tests), binding 19 failed / 269 passed and arrival count 2 failed / 286
passed (the two door `UNCHANGED` pins); at `58a13fd61` (291 tests),
binding 19 / 272 and arrival count 4 / 287 (the two door `UNCHANGED`
pins and the two door N1 pins). The incoming manifest the package door
lent the pair-row binding, ablated at `3b168f1ba` (the B code before its
removal), turned nothing red over the two harness files and
`registry-bare-name-one-holder.test.ts` (396 of 396 green).
- **Ablation on the round-2 head** (`e94a8de8f`): `const paired =
this.pairRowBinding(type, stamped, item, name, collection, composite);`
replaced by `const paired = NOT_A_PAIR_ROW_OF_A_HOLDER; // ABLATED
#32408` (the per-package reading put back), mutation landed (anchor 1 →
0, blob `e84fc254dea3` → `50f62a28a05c`). The two harness files: **14
failed / 268 passed** of 282 — every binding pin red, the two new
disable pins included; the controls stay green (ruling A, two
independent Apps, F1's CONTROL, F6's CONTROL). Restored by the tool:
blob equal to HEAD (`e84fc254dea3`), `git diff HEAD` empty. The FROM
cells of rows 3, 4, 10 and 11 at the door were read under the same
ablation (at `6d317e68b`, the binding code identical) through a scratch
protocol probe of the same shapes (not committed): bare read `409`
naming X and the pair (row 3), `409` naming X, Y and the pair (row 4),
the bare read and `?package=Z` serving the row with every holder
disabled (rows 10, 11). At the head the same probe reads every TO cell
of those rows, and row 8's `?package=A` answers the App's own item (its
FROM is the earlier rounds' door measurement).
- Earlier rounds (on `075fb318`, before the merge): the full ablation 12
failed / 207 passed of 219; F1, F4 and F6 ablated each at their own
head, each pin red (records 6814943264, 6815176250, 6815340803).
## Acceptance notes
- **Residual divergence, accepted by the seat and the epic seat
(red-line read 6814925975: the registry is the side that does not
guess), carried by #32561** (the exact read adopts the registry's
count). Three shapes; in each the registry binds the row to no package
while the exact read serves it:
- (1) An undeclared pair row of the very locale a bundle addition of
another package of the App ships. Pinned as a CONTROL on the registry
side.
- (2) Contract review F6, per epic seat 1's ruling: a pair's undeclared
row while another shared pair stores an undeclared row of the name.
Pinned as a CONTROL.
- (3) New on the merged tree: an undeclared row of a pair two holders
share while one of them is disabled. The registry counts every holder (a
binding never moves with a disable); the exact read counts the served
holders, so `?package=X` of the enabled one serves the row (the bare
read serves it too, through the protocol's stored-row read). Pinned as a
CONTROL in the exact-read harness.
- The card's surface guess (`packages/metadata`) was wrong: both readers
are in objectql's `SchemaRegistry`. `getEnvironmentScopedItem` is never
reached by a pair row (reach none).
- `overrides.package` naming a package the save gate would not accept (a
non-holder, or one the pair does not customize) is off-door data; such a
row now binds to no package instead of to the App or the pair.
- **Accepted deviations (contract review 6835646675, the seat's call)**:
- F3: the Clause-② line and the entry's `surface` leave out two
conditions the refusal needs (the package reaches the App through its
declared dependencies, and it declares another namespace than the App).
The text over-declares, on the safe side.
- F4: the cold boot's seal reads the same members. Measured in a scratch
probe, row 1's shape with every item registered before the seal: FROM no
conflict TO two (X against the App, and the later package against the
App). `BARE_NAME_COLD_BOOT_MODE` is `warn`, so the boot logs them and
refuses nothing; X re-registering its item after the seal is admitted
(it already holds the name). X is listed because, without the pair row
lending the App its locale, X shipping only a locale the App ships none
of is itself an addition to the App's template under the #28802 rule
`main` applies.
- **Routed by the epic ruling 6838245909 and the seat (6838268615)**:
the admission beside X and the by-name read's four cells (red-line read
item 2) → #32899 (p2); the bare slot keeping only the row hydrated last
→ #32900 (p1); the item door judging a package member by member → #32901
(p2); the nits, delta review N2's pin among them → #32903. The
disabled-X cell is not a disclosure (ruling item 4) and is not reachable
through the doors under B.
- Line budget: +763 / -26 over 6 files (789 changed lines, merge base
`2f80f2897`): `registry.ts` +266 / -26, the resolver harness +338, the
exact-read harness +64, the changeset +29, the semantic entry +56, its
changeset +10; under the ~1500 order cap and the 3000-line threshold; 0
governed paths (`check-governed-merges --branch HEAD`).
## Verification
Text-only round on head `463a1752b` (delta red-line read 6841098779, H1
and H2): the changeset and the semantic entry edited, the code and the
tests unchanged since `acc680227`. On `463a1752b`: `@objectstack/spec`
rebuilt, `pnpm --filter @objectstack/spec check:generated` all 14
generated artifacts up to date, `node
scripts/check-adr-0087-registration.mjs --base origin/main` exit 0,
`node scripts/check-nul-bytes.mjs` OK. Everything below was measured on
`acc680227`.
Measured on head `acc680227` (`origin/main` `2f80f2897` merged at
`7bea2a2ae`, never rebased; `main` not merged this round), after the
earlier rounds' full `pnpm install --frozen-lockfile`, `pnpm build`
(119/119 tasks, with declarations) and dogfood closure build, then
`@objectstack/spec` and `@objectstack/objectql` rebuilt for this round's
source changes (the spec `src/migrations/` suites: 5 files, 198 tests
passed):
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: **94** families derived on the 6 paths (the
same list as the previous heads), each run with its exit code captured
before any pipe: **94/94 exit 0**. `--ran` on the record: 94 derived, 94
run, **0 NOT-MEASURED, 0 UNRUN**, a derived zero (every line carries its
exit code). `node scripts/check-nul-bytes.mjs`: OK.
- `node scripts/check-adr-0087-registration.mjs --base origin/main`:
exit 0, `registered pair-row-locale-addition-refused (new here)`. `pnpm
--filter @objectstack/spec check:generated`: all 14 generated artifacts
up to date.
- `pnpm lint`: exit 0. `pnpm --filter @objectstack/objectql typecheck`:
exit 0.
- `pnpm --filter @objectstack/objectql test`: **589 files passed; 12633
tests passed**.
- **Dogfood battery** (`pnpm --filter @objectstack/dogfood test` under
`scripts/pm/os-verify-lock.sh`, no shard, no path, at `acc680227`):
**455 files passed, 3 skipped; 3817 tests passed, 42 skipped**; VERDICT
command-exit 0.
- `node scripts/pm/check-governed-merges.mjs --branch HEAD`: 0 of 6
paths governed. `dispatch-gates --tier`: no path-derived mandate (the
semantic entry under `packages/spec` makes the review face
`packages/spec`, CONTRACT_REVIEW_TIER by surface).
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic
(one migration entry).
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes on the final head.
- [x] 4. One issue, one branch, one pull request (this PR replaces
#32557; its branch carries that PR's whole history, merged with `main`).
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: one entry file; the registry,
`spec-changes.json` and the upgrade guide are generated, git-ignored
projections (`check:generated` all up to date).
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
Development by the os-dev session `session_01Utp6CbGpwJzMFhChu9a91Q` (PR
#32557); `main` merge and landing round by the card thread
`session_01L6bhgUJkevgE12tpg42pZA` for the seat `domain:server#1`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgUJkevgE12tpg42pZA
<!-- signed: domain:server#1 · os-sales ·
session_01L6bhgVaKJ9TPfXPRhdqx3e -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>1 parent 152b53c commit e336a33
6 files changed
Lines changed: 763 additions & 26 deletions
File tree
- .changeset
- packages
- objectql/src
- spec/src/migrations/entries/semantic
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
859 | 923 | | |
860 | 924 | | |
861 | 925 | | |
| |||
0 commit comments