Skip to content

fix(objectql, metadata-protocol)!: by-name doors judge a name's holders over the served set, so a disabled package's item is not a holder (ADR-0150 D3) - #32497

Merged
objectstack-fleet[bot] merged 93 commits into
mainfrom
claude/project-thread-phk4r9
Nov 12, 2026
Merged

objectstack-fleet[bot] merged 93 commits into
mainfrom
claude/project-thread-phk4r9

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread
epic:#31527#1 · os-sales · session_01L6bhgTkccuWPuLpWbpBTVu

维护者速读

Fixes #32183

Clause-②: no (narrowing) — for a name that only disabled packages hold, SchemaRegistry.resolveItem, MetadataFacade.get / getEntry and SchemaRegistry.getApp (@objectstack/objectql) answer undefined where they answered the disabled package's body, and MetadataFacade.exists answers false where it answered true. A package caller whose closure reaches a name only through a disabled package, while an enabled package outside the closure holds it, is refused outside-closure. At the /meta exact read, the pair address of a disabled base, and a disabled package's address at a member only its pair stores, answer 404 where they served the disabled package's customization. Every other moved answer widens, names fewer packages, or moves between a refusal and not-found; each is in the table below and in the changeset.
Metadata-protocol: none
Skills-docs: none — content/docs/deployment/marketplace-handbook.mdx already says a disabled module is hidden, and no skill or doc teaches the by-name answer for a name a disabled package holds.

Narrowing: yes — first-party callers: 0 (measured on the predecessor's step 0: showcase 22 packages / 205 package-scoped names, crm 18 / 35, multi-package 16 / 27; no name has two holders and no package is disabled at boot).

Supersedes #32327. This is #32327's branch (claude/project-thread-ryhc4d at 1b655c3cd, contract review r3 PASS 6781597322) carried onto this branch with main merged in: this session may push only its own designated branch, so the resume opens here, as claim 6810227359 provides. Every commit of #32327 is in this branch's history unchanged. #32327 is left open for the seat to close.

Moved answers (FROM → TO)

FROM is main at f0f729e7 with #32214's branch (27abd458a) merged in, the state main reached when #32214 landed (f56354c2c); TO is this head, 32f380061, with main merged at 5f84ef0ec (round 5). First-party count 0 on every row. Rows 10–12 and 16 come from doors main added since #32327's last merge, rows 23–26 from the exact-qualifier hunk (ruling (c)), rows 32–34 from the round-3 contract review (M2 and its should-fix), and row 35 from epic ruling R4 (R4-C). Rows 27–31 (the email template send) are withdrawn by R4-A and carried to #32670; their numbers are not reused. Rows 17, 26, 33 and 34 are extended this round, and their FROM, with row 35's, was measured on 216674301 (Verification). Rows 18a, 34a and 34b, and row 35's second state, are declared from the delta contract review's measurement (6821393023, N1 and N2), with no source change; their pins are on #32705. The other rows were declared on #32327 and are unchanged. Round 5: rows 9 and 15 are withdrawn by Sales ruling 6824698376 (the permission-set grant reads every holder, so they answer as on main), and their numbers are not reused; rows 14 and 21 keep only action. Rows 26 and 32 are extended to action, which #32566 (279f55926) brought into the package-less row judgment (judgesPackageLessRows); their FROM for action is 5f84ef0ec. Row 4 is now reachable for picklist, mapping, dataset and api, which #32513 lets two namespaces hold; measured on this head (Verification).

# Door or reader Case FROM TO Arm Pin
1 SchemaRegistry.resolveItem, MetadataFacade.get / getEntry, getApp only disabled packages hold the name the disabled body (exists true) undefined (exists false) narrowing (library) objectql package-scoped-e8-readers.test.ts
2 packageScopedHoldersOf, resolvePackageScopedName, readPackageScopedItem, resolveActionByPackage same, caller with no package or outside the closure [DISABLED], resolved to it [], not-found narrowing (library) objectql package-scoped-resolver.test.ts
3 resolvePackageScopedName, resolveItem(type, name, caller), resolveActionByPackage the caller's closure reaches the name only through a disabled package; an enabled one outside holds it the disabled body refused outside-closure, naming the enabled holder narrowing objectql package-scoped-resolver.test.ts
4 bare GET /meta/:type/:name, every type of the live PACKAGE_SCOPED_READ_TYPES (now with permission), both transports; MCP agent_prompt, the dataset query door's bare datasetName, the import door's mappingName, a connector pull naming no package two holders, one disabled 409 naming both 200, the enabled holder's item widening runtime meta-qualified-item-read.test.ts, rest meta-qualified-item-route.test.ts
5 bare /layers same 409 naming both 200, the enabled holder's stack (code layer, overlay row, lock) widening same, and meta-disabled-holder-served-stack.test.ts
6 bare /published same 409 naming both the enabled holder's row, else the service copy at its package, else 404 widening meta-disabled-holder-artifact-door.test.ts, meta-disabled-package-doors.test.ts
7 /meta/:type/:ns/:name of a shareable namespace, and bare two co-owners, one disabled 409 ambiguous-in-namespace 200, the enabled co-owner's item widening runtime / rest qualified-read files
8 resolveActionByPackage, the REST route rung for a caller's package caller with no package, or a closure holding both refused the enabled holder's declaration and handler widening objectql and runtime action-package-addressing.test.ts, actions-disabled-holder-door.test.ts
10 new ?callerPackage=P on GET /meta/dataset/:name and the dataset query doors (single, batch) two holders in P's closure, one disabled 409 naming both 200, the enabled holder's dataset widening runtime / rest, #32183 × #32310 describe
11 new connector pull of a job's mapping, package caller two holders in the closure, one disabled 409 mapping_name_refused naming both the enabled holder's mapping is pulled widening service-automation connector-pull.test.ts
12 new flow credential channel write (the flow save door's store) a flow name an enabled and a disabled package hold; a save that sets, clears or removes a stored credential 409 naming both written, rows stamped flow_package = the enabled holder widening service-automation stored-reference-package-column.test.ts (flowHolderPackage)
13 ?package=NONHOLDER, a non-holding namespace path, _env two holders, one disabled 409 naming both 409 naming the enabled holder names fewer runtime / rest
14 action caller outside both closures same refused naming both refused naming the enabled holder names fewer objectql
16 new ?callerPackage=P P's closure reaches the name only through a disabled package; an enabled one outside holds it 404 (the disabled item, withheld) 409 outside-closure, naming the enabled holder refusal runtime / rest, #32183 × #32310 describe
17 ?package=NONHOLDER and its qualified path only disabled packages hold the name, whatever row a layer of the read reached (R4-B: a row of a holder's customization pair at a member only it stores, which the metadata service answers by name) 409 naming the disabled package 404; only a row stored under the address's own package is served not-found runtime / rest; objectql package-scoped-exact-qualifier.test.ts (a name only a disabled package holds, at an address that neither holds it nor pairs a holder)
18 bare read two or more disabled packages, nothing else 409 naming them 404 not-found runtime / rest
18a declared (N1) bare read two or more holders, every one disabled, at a member only another row carries (a package-less row, a dependent's added locale, or the App pair's row the metadata service answers by name) 409 naming them 200 with that row (main's answer with one holder) widening none here; carried to #32354 and #32705
19 shareable namespace path both co-owners disabled 409 ambiguous-in-namespace 404 not-found runtime / rest
20 stored permission-set column naming the disabled holder two holders, one disabled refused naming both not-found, never re-targeted (kept by Sales ruling 6824698376) not-found core security-catalog.test.ts (#32183 — a disabled holder still counts for a permission set), both orders
21 action caller outside the closure only a disabled package holds the name refused naming it not-found not-found objectql
22 REST action rung with callerPackageId the execution read throws a package-scoped refusal degraded the declared 409 refusal (no door reaches it) runtime action-package-addressing.test.ts
23 new ?package=<base>.custom, the pair of a disabled base, both transports an enabled holder of the name registered first 200, the disabled base's body under the enabled holder's envelope (_packageId) 404, the disabled base's withheld item narrowing (door) runtime / rest, #32183 — a disabled package holds no name describe (address, namespace and pair), every live type, both orders
24 new ?package=<App>.custom, an App's pair two modules share one module disabled; the layer below reaches neither module's item 409 ambiguous-in-closure naming both 200, the enabled module's item widening objectql package-scoped-exact-qualifier.test.ts (an App's pair two modules share)
25 new same every base disabled 409 naming them 404 not-found same
26 new a package-less row (the environment's item, or a package-less stored row) at the enabled holder's exact address a name an enabled and a disabled package hold 409 ambiguous-in-closure naming both (#32214's rule over every holder) served as that holder's customization; re-enabled, refused naming both. At the enabled holder's pair (?package=<enabled>.custom, R4-D): 200 with the row when the enabled holder registered first; 404 when the disabled one did (#32501 location 1). Round 5, action: the environment's item at the enabled holder's exact address, and a package-less stored row in the layered read at that address (?layers=true&package=), reported as its overlay; FROM refused naming both widening (the pair's 404: not-found) objectql package-scoped-exact-qualifier.test.ts ([#32183] agent / dashboard; ?package=<enabled>.custom, both orders, both row kinds, the 404 arm marked to flip when #32501 lands; for action, [#32183] one of the two holders disabled, both orders)
32 new ?package=DISABLED and ?package=DISABLED.custom beside a package-less row (the environment's item, or a package-less stored row) of a name an enabled and the disabled package hold 409 ambiguous-in-closure naming both 404, the disabled package's withheld item; re-enabled, refused naming both. Round 5, action: ?package=DISABLED beside the environment's item, the same not-found objectql package-scoped-exact-qualifier.test.ts ([#32183] dashboard (…, beside …); for action, [#32183] one of the two holders disabled), both orders, both row kinds
33 new the list scoped to the enabled holder (GET /meta/:type?package=), and the execution list at its address (getMetaItemsForExecution, which a send resolved to that holder reads) a package-less stored row of a name an enabled and a disabled package hold the holder's own item the stored row, as the holder's customization, in both lists; re-enabled, its own item widening same file (the list scoped to the enabled holder, and its execution list), with a CONTROL: the environment's item in the registry is in neither scoped list
34 new an App's pair member row with no overrides, at the enabled module's exact address (?package=X&member=), in its scoped list and in its execution list a bundle name two modules of the App hold, one disabled 409 naming both; left out of both lists (a send resolved to X finds no template at that member) served as its member; listed in both (the send finds that member); the disabled module's address answers its withheld item widening same file ([#31699 F2] describe, one of the two holders disabled), both orders
34a declared (N1) the scoped list and the execution list of each module the same member row, both modules disabled left out listed at both modules widening none here; carried to #32670 and #32705
34b declared (N1) a send made from either disabled module at that member same no template that member widening same
35 new ?package=DISABLED&member=, ?package=DISABLED.custom&member= and the disabled package's namespace path a member only the disabled package's customization pair stores, one holder of the name or two, either order; or (N2) one holder, disabled, and a member only a package-less stored row carries 200 with that row 404, the disabled package's withheld item; re-enabled, that row narrowing (door) objectql package-scoped-exact-qualifier.test.ts (`?package=DISABLED&member=` where only the pair's row carries the member), at the protocol both transports read, one holder and two, both orders. The N2 state's pin and per-transport pins are on #32705.

Restored by the hunk, not moved against main: ?package=DISABLED, the disabled package's namespace path, the pair of a disabled base where no enabled holder's envelope is reached, and ?callerPackage=P when P's own holding is the disabled one beside an enabled dependency answer 404, as on main. The previous head (1483899c0) answered them 409 not-held-by-qualifier naming the enabled holder. They are pinned on both transports, for every live type, in both registration orders. The email template send door is not moved (R4-A): it asks the list for the same address, or throws the same refusal, as on main, a send made from the disabled holder included. What an address lists moves only as rows 33 and 34 declare. As on main, that send still sends a template in three one-holder states (beside a package-less row, over the built-in copy, and with a dependent's added locale).

Not moved: ?package=DISABLED and its namespace (above), except beside a package-less row (row 32) and at a member only its pair stores (row 35); the email template send door (createRegistryEmailTemplateLoader), which reads every holder, so a disabled package still counts there and a refusal still names it, until #32670 (what an address lists moves as rows 33, 34, 34a and 34b declare); _env of a name only disabled packages hold, which keeps main's 409 naming them (R4-B2: with no served holder, its admission judges every holder); every holder's own read; the served lists, except the list scoped to an enabled holder and its execution list (rows 33 and 34); durable judgments (R1/R3, R4, R5/R6/R13, R7–R11, R20 backfills; os migrate stored-references, its pair-member and package-less-row sections included (seat ruling A); picklistReferenceVerdict), which read every holder; the install gate (bareNamePackageHolders, epic stance 6766291071) and the security catalog's item seam. Round 5 adds five:

  • The permission-set grant, the fixed exception (Sales ruling 6824698376). The security catalog's resolution (resolvePermissionScoped: a reference with no package column, a stale column, or a position's package) and holdsPlatformPermissionSet (@objectstack/core) read every holder, so a disable never makes a grant confer more. Two holders with one disabled stay refused naming both, and holdsPlatformPermissionSet is false. A name only a disabled package holds counts that package: a caller outside it is refused naming it, and no grant resolves to its set, never the metadata service's by-name body. Each as on main. Only a column naming the disabled holder moves (row 20), the same stance: it confers nothing and is never re-targeted.
  • The picklist arrival judge (SchemaRegistry.judgePicklistArrival) reads every holder before and after an arrival, as picklistReferenceVerdict does (ruling 6815997281), so the install audit and a field's options agree for a disabled holder: an install, upgrade, hot reload or late item is refused exactly as with the holder enabled.
  • The flow doors of a name two packages hold (R4-G): a flow action's and a flow endpoint's target (flowServiceForCaller, endpointPackageOf), the start admission's read walk (flowWalkReads, root and callee), flowHolderForCaller, the /automation bare-name refusal and addressed paths (bareNameRefusal, admitAutomationAddress's shared branch), and the engine's slot table (heldByMany), its shared-name refusal (sharedFlowNameRefusal) and the shared branch of resolveFlowKey. A runtime disable keeps the disabled package's engine slot armed, so a served read there would move these doors both ways: with CRM disabled, HR's own flow action would reach the bare service, and a package whose closure holds both would run HR's flow. Their served judgment is carried to ADR-0150: the email template send judges the served holders (a disabled package holds no name at the send) #32670. The flow execute door for a name one slot holds keeps judging the served holders, as do flowHolder, flowHolderPackage (row 12) and the activation ledger's stillHolds.
  • The dispatch key a trigger claims (AutomationEngine.flowDispatchHolder, D8 row R10) reads every holder, as the re-key backfill does (within R4-G, seat 13:20Z). On the previous head it read the served holders, so a flow only a disabled package holds lost its package segment while the re-key scoped it, and a name an enabled and a disabled package hold, asked by its bare name, dropped the collision guard (claimBare true).
  • The bare action read's check for a disabled package's customization (servedFromDisabledHolder, fix(metadata, metadata-protocol, core)!: the bare read and removal of an action name judge the loaders' slots beside the registry's, tell the platform's package-less item from the environment's, and remove what the bare read answers (ADR-0150 D3) #32719) reads every holder, so it answers as on main (round 5, 28b37fbb7).
  • The metadata service's removal by name (storeRemovalKeys, fix(metadata)!: an action's removal counts and takes its holders by package over every slot of the name (ADR-0150 D3/D4) #32533) counts the store's own slots and reads no package state. This branch does not touch package-slotted-store.ts; its metadata delta is getPublished(type, name, packageId?), and no reader touches both.

What changes

Unchanged from #32327 at 1b655c3cd (its body is the full account; the contract review r3 PASS 6781597322 read it):

  • The holder set is the served set (packages/objectql/src/registry.ts, packageScopedHoldersOf): a disabled package's holding is left out, except the caller's own; options.includeDisabledPackages: true reads every holder, forwarded by resolvePackageScopedName, the action addressing wrapper and the install door's pending-manifest view.
  • Durable judgments read every holder: the stored-reference backfills (permission sets, sharing declarations, email templates, the activation ledger, R7–R11 through AutomationEngine.durableFlowHolder and the connector resolver's options), the CLI stored-reference report and picklistReferenceVerdict.
  • The security catalog never re-targets a disabled holder's column. Round 5 (Sales ruling 6824698376): a permission-set grant and holdsPlatformPermissionSet read every holder, the fixed exception, so they answer as on main (rows 9 and 15 withdrawn).
  • The item face answers a name every holder of which is disabled as that package's withheld item; the bare reads take the served holder's stack (servedHolderAddressOf, isAnotherHoldersCopy); both /published doors and MetadataManager.getPublished(type, name, packageId?) read at the served holder's package.
  • The REST action rung answers a thrown package-scoped refusal as the declared 409.

This round (resume):

This round (2): #32214's branch merged, and the exact-qualifier hunk (ruling (c))

This round (3): contract review M1 and M2 (epic ruling 6815997281)

This round (4): epic ruling R4 (6820114703), and R4-B2 (6820387912)

  • R4-A, the send door reads every holder (plugin-email/src/template-loader.ts, bundleAddressOf). The resolve, the holder count and the second resolve (the shared view) take includeDisabledPackages: true, and the round-3 own-address branch is deleted. The diff of template-loader.ts against 216674301 is those three arguments and a docblock paragraph. Rows 27–31 are withdrawn from the table and the changeset. The round-3 describe is replaced by one parity pin: one or two holders, each with and without a dependent's added locale; every caller (none, omitted or null; each holder; a closure holding both; a closure through BETA only; neither; the dependent); both registration orders; both reads. With each non-empty set of holders disabled, every caller's ask (the list address, or the refusal with its candidates and message) equals the ask with nothing disabled. The ask is spied: the protocol request's address, or, on the registry read, which item of a probe list survives. A CONTROL per state, order and read pins the enabled asks to main's. 72 tests.
  • R4-F CONTROL: with nothing disabled, a non-auth name the built-in and one package hold, sent with the built-in package as the caller, sends the package's template, both orders, both reads (4 tests). No source was owed.
  • R4-B, the item face (protocol-meta-item-face.ts). When every holder of the name is disabled, an exact address now serves only a row stored under its own package. disabledOnlyHolderOf was applied only when the answer had no item; it now also applies when the exact read reached an item that is not stamped with the address's package. The contract review's case moves: only X (disabled) holds welcome, the App's pair stores an fr-FR row, and the metadata service answers it by name. ?package=Y&member=fr-FR (Y is the App's other module) and its namespace path went from 409 naming X on main to 200 with the pair's row at 6655b7421; they now answer 404, as row 17 declares. A row stored under Y is still served at Y. With X enabled, each answers main's 409.
  • R4-B2, _env (protocol-exact-qualifier.ts, admitEnvironmentQualifier). At that member, _env was 409 naming X on main and 200 with the pair's row at 6655b7421: it is admitted, then read as the bare read, which the face cannot tell apart from a bare read. On the seat's ruling (a), the admission judges every holder when no package serves the name, so _env keeps main's 409 naming the disabled package(s). Row 17 no longer lists _env. The runtime and rest _env/solo pins move from 404 to 409 naming the disabled holder, as on main, and one objectql pin covers the pair-row member. The bare read at that member is 200 with the pair's row on both trees, enabled or disabled, so it is unchanged here and goes to metadata-protocol: a name held only by stored rows of two packages, one disabled, answers by save order, and /layers takes the first composite when the environment holds its own item (ADR-0150 D3) #32354.
  • R4-C, row 35. ?package=DISABLED&member= at a member only the pair's row carries was 200 with the pair's row on main, and is 404 here, with one holder or two, in either order. ?package=DISABLED.custom&member= and the namespace path move the same way and are in the same row. The changeset carries a BREAKING line beside row 23, and its "keeps its 404" sentence now names this exception.
  • R4-D, row 26 extended. ?package=<enabled>.custom beside a package-less row (the environment's item, or a package-less stored row): 409 naming both on main; 200 with the row when the enabled holder registered first; 404 when the disabled one did. That 404 comes from metadata-protocol: a pair address (?package=<base>.custom) takes its envelope from the first registered holder of the name, so it answers one package's body under another's _packageId #32501 location 1, the same on both trees. No source change. Pinned in both orders with both row kinds, and the 404 arm carries a comment to flip it when metadata-protocol: a pair address (?package=<base>.custom) takes its envelope from the first registered holder of the name, so it answers one package's body under another's _packageId #32501 lands.
  • Rows 33 and 34 extended to the execution list at the enabled holder's address. Row 33 (a package-less stored dashboard): main lists beta dashboard, here stored dashboard. Row 34 (the App pair's fr-FR member): main lists only suitex en-US, here pair fr-FR as well. The existing pins now also assert getMetaItemsForExecution, and re-enabled each answers as on main.
  • R4-G: no other door was found this round that sends or serves another package's body through this change.
  • After the delta review (6821393023 PASS, red-line read 6821404403 PASS), text only (commit 8ec8d78ea, seat's ruling): N1's three answers are declared as rows 18a, 34a and 34b; N2's state is added to row 35 and its BREAKING line; N3's sentence now says the door asks the same address or throws the same refusal; N4 drops "both transports" from rows 17 and 35. No source or pin changed. The N2 pin and per-transport pins go to ADR-0150: pin the disabled-holder answers PR #32497 declares in text only (row 35's package-less member state, per-transport pins) #32705; the seat read this delta (6821456566).

This round (5): main merged after #32513, the landing duties of ruling 6815997281, and Sales ruling 6824698376

  • main merged at 5f84ef0ec (after feat(core, metadata, objectql, metadata-protocol)!: picklist, mapping, dataset, API and function names are held per namespace (ADR-0150 child B) #32513), no rebase, merge 061fd070f. Three test conflicts, each two additions at one spot, both sides kept: packages/cli/src/utils/stored-package-references.literal-namespace.test.ts (this branch's disabled-holder report case and main's narrowed-action case), packages/rest/src/meta-qualified-item-route.test.ts and packages/runtime/src/domains/meta-qualified-item-read.test.ts (this branch's caller-arm describe, then main's; the runtime imports joined).
  • main merged three times more, at f7a0fe0ea (merge d8644927b), at af90f307c (merge 32f380061) and at 776474e8b (merge 649ae4718), with no rebase. The first two had no conflict. The third had one, in packages/runtime/src/domains/meta-qualified-item-read.test.ts: both sides added a describe at one spot (this branch's #32183 × #32310 caller-arm describe, then main's #32250 dispatcher /layers 409). Both are kept. fix(metadata)!: history, diff and rollback of a type stored per package address one package's row; a removed package's version is refused, not written into the remaining holder's row #32569 and fix(metadata, metadata-protocol, objectql): a passing verify boot prints no DATABASE_ERROR, no refusal stack and no metadata-loader INFO line #32731, then fix(metadata)!: the metadata service's own reads keep every locale of a package's email template and every package's item of a by-package type #32687, touched metadata-manager.ts in hunks apart from getPublished. None of those commits adds a holder read outside tests: no new call of packageScopedHoldersOf, resolvePackageScopedName, resolvePackageScopedHolders, resolveActionByPackage, readPackageScopedItem, durableFlowHolder, flowHolder or isPackageDisabled. So no new door is declared from those. In the third merge, fix(metadata, metadata-protocol, core)!: the bare read and removal of an action name judge the loaders' slots beside the registry's, tell the platform's package-less item from the environment's, and remove what the bare read answers (ADR-0150 D3) #32719 added one: servedFromDisabledHolder (protocol-meta-item-reads.ts) lists the disabled holders of an action name, to ask whether the service's package-less answer is a disabled package's customization. Over the served holders that list is always empty. On the merge, runtime action-package-addressing.test.ts's [#32560] the disabled B's customization … went red (1 of 67): the bare read served B's customization. 28b37fbb7 makes that read every holder (includeDisabledPackages), so it answers as on main (67 of 67), and declares it in the changeset's "Not moved". Reverting it reds that case.
  • The picklist arrival judge (0975e7608, objectql registry.ts). In judgePicklistArrival's memo, before (over the registry) and after (over the arrival's view) resolve with includeDisabledPackages: true. Judged over the served holders, a field resolving to a disabled package's list would read as refused already and be skipped, and an arrival making it ambiguous would be admitted: the field would silently lose its options once the package is re-enabled. Pin (registry-bare-name-one-holder.test.ts, [#32183] a disabled holder is still a holder for the arrival judge, both orders): an upgrade adding the list, and a late install beside an installed extension, are refused with the message the enabled case gives, naming the field and both holders. CONTROL: picklistReferenceVerdict resolves to the disabled holder while the served resolvePackageScopedName is not-found.
  • The feat(objectql)!: two namespaces may each ship a flow of one name; addresses, actions and endpoints run their own package's (ADR-0150 child B) #32507 flow doors, held at main under R4-G (e6cf10f3a). runtime flow-slot-view.ts: all seven resolvePackageScopedName calls read every holder (EVERY_HOLDER). automation-address.ts: bareNameRefusal reads every holder, and admitAutomationAddress counts every holder, so a name two packages hold is judged over both; a name one package holds keeps the served read. service-automation engine.ts: heldByMany, sharedFlowNameRefusal and resolveFlowKey's shared branch read every holder. Pins are parity pins: in both registration orders, for every non-empty set of disabled holders, every door answers what it answers with nothing disabled. runtime flow-caller-package.test.ts covers the handover's six cases and two CONTROLs (caller none, CRM, HR, a dependent of CRM, a dependent of both, neither; four namespaces and _env). service-automation flow-slots-per-package.test.ts covers ten cases (runtime and boot disable) and two CONTROLs.
  • The dispatch key a trigger claims (6052c6c8b). flowDispatchHolder read the served holders through flowHolder. Measured on the previous head: one holder, disabled, gave { packageId: null, claimBare: true } where main gives { packageId: <it>, claimBare: true }, while the re-key backfill scopes that key to it. Two holders with one disabled, asked by the bare name, gave { packageId: <enabled>, claimBare: true }, dropping the collision guard; a trigger binds a slot key for such a name, so that ask is not reached today. The method now reads durableFlowHolder, as main answers; flowHolderPackage keeps the served read for the credential channel (row 12). Pin (stored-reference-package-column.test.ts, R10 at the trigger): the disabled package's own flow keeps its scope, a clash keeps the guard, and re-enabled every coordinate is the same (CONTROL).
  • fix(metadata)!: an action's removal counts and takes its holders by package over every slot of the name (ADR-0150 D3/D4) #32533 and storeRemovalKeys. Both of fix(metadata)!: an action's removal counts and takes its holders by package over every slot of the name (ADR-0150 D3/D4) #32533's changes are main's and kept as merged; this branch does not touch package-slotted-store.ts or the removalOf comment. Its metadata delta is MetadataManager.getPublished(type, name, packageId?). No reader touches both: metadata-manager.ts and package-slotted-store.ts read no package state (0 matches for isPackageDisabled and includeDisabledPackages). So no shared-reader pin is owed, and the removal does not move.
  • action in the package-less row judgment (ae55db373, after fix(metadata-protocol, cli)!: a package-less item of a name two packages hold is refused at both exact addresses for every narrowed type, and the layered read judges its exact address (ADR-0150 D4) #32566). objectql package-scoped-exact-qualifier.test.ts, inside the [#32407] describe, both orders: with one of two holders disabled, the environment's item is the enabled holder's on its exact address, and the disabled holder's address answers its withheld item; the layered read at the enabled holder reports a package-less stored row as its overlay; re-enabled, each is refused naming both. cli stored-package-references.literal-namespace.test.ts: the report still lists the package-less row naming both. Rows 26 and 32 are extended.
  • feat(core, metadata, objectql, metadata-protocol)!: picklist, mapping, dataset, API and function names are held per namespace (ADR-0150 child B) #32513's types are reachable (step 6). Two namespaces each install a picklist, mapping, dataset and api of one name. With nothing disabled, each bare read is refused naming both; with one disabled, each resolves to the other (rows 4 and 10). picklistReferenceVerdict is refused in both states, and the engine function read (resolveFunctionEntry) answers 409 holding both packages in both states: no move.
  • Sales ruling 6824698376 (A), the permission-set exception (e6473e482, core security-catalog.ts). resolvePermissionScoped's column-less read and holdsPlatformPermissionSet pass includeDisabledPackages: true. The docblock states the exception. The separate "held in any package" reads are removed, since the rule's own read now counts every holder. The column path keeps its check: a column naming the disabled holder is not-found, never re-targeted (row 20). Pins (security-catalog.test.ts, #32183 — a disabled holder still counts for a permission set, both orders): crm and hr each hold qa_reader, hr disabled. No column, a null column, a stale column and a caller outside both are each refused naming both, equal to the answer with hr enabled. A column naming hr is not-found and not said stale, while crm's column reads crm's set. For a name only hr holds: no column is not-found; a caller outside is refused naming hr, as re-enabled; no grant resolves to its set or to the metadata service's body of that name. holdsPlatformPermissionSet is false for two holders with one disabled (as re-enabled) and for the sole disabled holder; CONTROLs: true for a platform-only name and for a name held nowhere. Rows 9 and 15 are withdrawn, rows 14 and 21 keep only action, and the changeset says the same.
  • Changeset (4e32f00a4, 018eb5f60): the arrival judge, the R4-G flow doors, the dispatch key and the permission-set exception are in its "Not moved"; the action package-less row lines are added; the permission-set widening line and its two refusal lines are removed.

Owed before ACCEPT

  1. Done: main merged after feat(core, metadata, objectql, metadata-protocol)!: picklist, mapping, dataset, API and function names are held per namespace (ADR-0150 child B) #32513 (5f84ef0ec), then at f7a0fe0ea and af90f307c (each touched metadata-manager.ts), no rebase, no conflict after the first.
  2. Done: the duties of ruling 6815997281 (the arrival judge, the feat(objectql)!: two namespaces may each ship a flow of one name; addresses, actions and endpoints run their own package's (ADR-0150 child B) #32507 flow doors under R4-G, fix(metadata)!: an action's removal counts and takes its holders by package over every slot of the name (ADR-0150 D3/D4) #32533's reader) and Sales ruling 6824698376.
  3. Done: the size, reported to the seat before the push: 3487 changed lines against 5f84ef0ec, and 3488 against af90f307c (52 files, +3365 −123), over 3000. The maintainer approved fix(objectql, metadata-protocol)!: by-name doors judge a name's holders over the served set, so a disabled package's item is not a holder (ADR-0150 D3) #32497 (review 5876504068); the seat's delta review follows the push; the R4-G holds are not split out.
  4. Then the landing read, measuring this change together with fix(metadata-protocol, metadata)!: the bare read of an action name weighs its package-less holder, and serves the one enabled holder when a disabled package registered first (ADR-0150 D3) #32551 (landed, 067349bbe), and the epic red-line read on the landing head.

Acceptance notes

Why

The served list (listItems) has withheld a disabled package's items since the disable landed, and the item face answers 404 for one. But packageScopedHoldersOf read the raw store, so every ADR-0150 D3 door still counted the disabled package as a holder. The epic ruling 6766102988 names the served list as the right holder set.

Verification

The battery ran on d8644927b (main merged at f7a0fe0ea), in this session's container, with NODE_OPTIONS=--max-old-space-size=6144. The head pushed, 32f380061, merges main once more at af90f307c. There was no conflict: #32687 touches metadata-manager.ts in other hunks, and none of the eight commits adds a holder read. On that head pnpm build (exit 0), the metadata suite (1930 passed), its typecheck (exit 0), and the disabled-holder and /published files were re-run: objectql package-scoped-exact-qualifier, package-scoped-e8-readers and registry-bare-name-one-holder (420 passed); runtime meta-disabled-holder-artifact-door, meta-disabled-holder-served-stack, meta-qualified-item-read and flow-caller-package (201 passed); rest meta-disabled-package-doors and meta-qualified-item-route (172 passed). An earlier pass on 018eb5f60, before the f7a0fe0ea merge, was green too, except the runtime test typecheck, fixed in fa4547c24.

  • Build: pnpm install --frozen-lockfile, then pnpm build, exit 0.

  • Suites of the twelve touched packages, plus mcp:

    Package Tests
    objectql 12576 passed
    core 3349 passed
    runtime 10228 passed, 19 skipped
    rest 8066 passed, 332 skipped
    metadata-protocol 22786 passed, 36 skipped
    service-automation 3804 passed
    plugin-security 6499 passed, 45 skipped
    plugin-approvals 1607 passed
    plugin-sharing 1511 passed
    plugin-email 1018 passed
    metadata 1882 passed
    mcp 1057 passed
    cli (--project unit) 5915 passed

    Every suite exited 0 on the first run.

  • Typecheck: pnpm --filter <pkg> typecheck for all twelve packages, exit 0. The runtime test typecheck (tsconfig.test.json, check:test-typecheck) first found three errors in this round's parity pin (flow-caller-package.test.ts): the engine double's execute takes the name alone, and an address refusal carries refusal only on its 409 arm. Fixed in fa4547c24; the answers it records are unchanged.

  • Lint: pnpm lint (whole tree, --no-inline-config), exit 0.

  • ADR-0087: node scripts/check-adr-0087-registration.mjs --base origin/main, exit 0.

  • Dispatch gates: node scripts/pm/dispatch-gates.mjs --commands derived 84 commands, and all 84 were run once on d8644927b, each exit captured before any pipe. One, check-plugin-teardown-shape --self-test, exited 3 (PREREQUISITE NOT MET: the shallow clone could not read its pinned fixture commit). After that commit was fetched it was re-run and exited 0. --ran over the record with that re-run: 84 derived, 84 run, 0 NOT-MEASURED, 0 UNRUN, every exit 0.

  • Size: 53 files, +3377 −125, 3502 changed lines against 776474e8b, over 3000.

  • Dogfood battery: on 32f380061, alone under bash scripts/pm/os-verify-lock.sh -c 'pnpm --filter @objectstack/dogfood test': 455 files passed and 3 skipped; 3814 tests passed and 42 skipped; VERDICT command-exit 0, lock held 2079s, waited 0s. CI on 32f380061: 70 check runs, 57 success, 13 skipped, none failed.

  • On 28b37fbb7 (after the 776474e8b merge and the servedFromDisabledHolder fix): pnpm build exit 0; metadata 1961 passed; metadata-protocol 22786 passed, 36 skipped; runtime 10238 passed, 19 skipped; core security-catalog and resolve-authz-context.grant-set-by-name 63 passed; rest meta-disabled-package-doors and meta-qualified-item-route 172 passed; typecheck of metadata-protocol, metadata, runtime, core and rest exit 0; eslint on the two changed files exit 0. The dogfood battery is not re-run here; the merge queue runs its Dogfood Gate.

  • Ablation of this round's pins (on this head's sources; each change reverted in place, the dependent package rebuilt where a suite reads its dist, then restored and rebuilt). Every CONTROL stays green under every ablation.

    Change reverted Pins Red under ablation
    judgePicklistArrival's two includeDisabledPackages: true objectql registry-bare-name-one-holder.test.ts 4 of 90 (the two arrival cases, both orders)
    runtime flow-slot-view.ts EVERY_HOLDER runtime flow-caller-package.test.ts parity pins 6 of 28 (every parity case)
    bareNameRefusal over every holder same 6 of 28
    admitAutomationAddress's shared branch same 6 of 28
    engine heldByMany over every holder service-automation flow-slots-per-package.test.ts 4 of 51 (the boot-disable cases)
    engine sharedFlowNameRefusal over every holder same 2 of 51
    engine resolveFlowKey's shared branch same 10 of 51
    servedFromDisabledHolder over every holder (28b37fbb7) runtime action-package-addressing.test.ts 1 of 67 ([#32560] the disabled B's customization …)

| flowDispatchHolder over every holder | service-automation stored-reference-package-column.test.ts and the two flow-slot files | 1 of 89 (R10 at the trigger) |
| packageLessRowOwners judging every holder at the exact read | objectql package-scoped-exact-qualifier.test.ts, -t 32183 | 16 red, the four new action pins among them |
| core resolvePermissionScoped's includeDisabledPackages: true | core security-catalog.test.ts | 5 of 40 (the four new pins, both orders, and the existing not-found pin for a resolved disabled set) |
| core holdsPlatformPermissionSet's includeDisabledPackages: true | same | 2 of 40 (both orders) |

  • Round 2's, round 3's and round 4's ablations are not repeated: this round touched none of their arms.

Human Minimum

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTkccuWPuLpWbpBTVu

…, not per deployment (ADR-0150 child B, part 1 of the webhook family)

WIP: the switch, the platform-requested auth.* names, the bundle-addition
rule, the package-scoped /meta read and the send's holder-filtered bundle.

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…latform-requested auth names and the bundle-addition rule

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…nd a pair's member as the package's own

A read naming a dependent whose only member of a bundled name is an addition
(a locale its base does not ship) was refused not-held-by-qualifier once
email_template joined the package-scoped readers, and a pair's added member
on its base's address was replaced by the registry's item. The qualifier now
asks the holders as the caller it names, and keeps an item of a pair of the
admitted package.

The co-owner dogfood case asserts the ADR-0146 D2 refusal a co-owner meets
first at install-local.

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…he email template's narrowing; changeset

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…s base's address for a bundled type only

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…rowing; pin the qualifier's holder ask for the nine

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…mplate send resolves its name from the caller's package (ADR-0150 D3)

The flow notify node records the package whose own flow body is armed
beside its template reference; the email and inbox channels hand it to
sendTemplate/renderTemplate as callerPackageId; the registry loader
resolves the name from it and, for a name two packages hold, reads the
resolved holder's own address. A send that names no package keeps the
bare-name meaning.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…is refused on both exact reads and listed by the upgrade report

Two packages of one App share the App's customization pair, so a locale
row there with no overrides declaration cannot say whose template it
extends: each holder's exact read refuses it naming every holder, the
list scoped to a holder leaves it out, and os migrate stored-references
lists it under pairMembers. One holder, the App's own address and a row
that declares its base keep being served. Pins for F1 (loader rungs,
service ladder, notify node, channels, dogfood) and F2; changeset.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…otype.at, which the package's lib target does not declare

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…) for email_template, beside api

Two packages of two namespaces may now each hold one email template name, so
the second package's item no longer overwrites the first's in MetadataManager's
in-memory store: a read naming a package answers that package's own, and a read
naming none of a two-holder name is the D3 refusal (#31527 B-shape item 1).
Pins that email_template has no metadata redactor, so a save never takes the
carry-forward's code-layer read for it (item 4).

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/objectql/src/package-scoped-e8-readers.test.ts
#	packages/objectql/src/package-scoped-read.ts
…-3giljf

# Conflicts:
#	packages/cli/src/utils/stored-package-references.ts
#	packages/metadata/src/package-slotted-store.ts
…es hold is no holder's own

A package-less row (the environment's item, or a sys_metadata row bound to
no package) of a name two or more packages hold is the customization of one
holder and cannot say which (ADR-0150 D4). Each holder's exact read now
refuses it 409 ambiguous-in-closure naming every holder, the list scoped to a
holder (which a send made from it reads) leaves it out, and
os migrate stored-references lists it under packageLessRows. One holder,
the _env address and the platform-requested auth mails are unchanged. The
rule sits in the exact qualifier, so it covers every type read by package
(epic ruling 6761802819 on #31699).

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/objectql/src/package-scoped-e8-readers.test.ts
#	packages/objectql/src/package-scoped-read.ts
…et (#32183)

A disabled package's item is not a holder. `packageScopedHoldersOf`
withholds a holder whose package is disabled (`isPackageDisabled`, the
predicate `listItems` hides by), keeps the caller's own holding, and reads
every holder under `includeDisabledPackages: true`, which
`resolvePackageScopedName` forwards.

Durable judgments read every holder: the four stored-reference backfills,
the CLI stored-reference report and the picklist load audit, so a binding
never moves with a reversible disable.

The security catalog never re-targets a stored column that names a
disabled holder, and a name only disabled packages hold is not-found
there and in `holdsPlatformPermissionSet`, never the metadata service's
by-name answer. The REST action rung answers a thrown package-scoped
refusal as the declared 409, not `degraded`.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Pins, each with its BASE reading at main de141e3:

- objectql: the source half (served holders, the caller's own holding,
  every holder on request, re-enable, a disabled base never promoting a
  bundle addition), the library readers including the read MCP
  `agent_prompt` makes, and action addressing.
- Both `/meta` transports over the live `PACKAGE_SCOPED_READ_TYPES`: two
  holders with one disabled, only a disabled holder, a parity pin per type
  (the bare read and the list agree through disable and enable), and a
  shareable namespace's co-owners.
- The REST action rung and the security catalog (no re-target of a
  disabled holder's column, no metadata fallback, the platform verdict).
- Every durable judgment keeps every holder: the four backfills and the
  CLI stored-reference report.

The picklist verdict (`picklistReferenceVerdict`: the load audit, the
install door and a field's options) judges every holder, so a reversible
disable of a dependency never refuses the next boot or empties a live
field's options; the by-name `picklist` read judges the served holders.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Clause-② no (narrowing): one in-process library answer narrows for a
name only disabled packages hold; every door move is listed FROM -> TO.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…eads no migration placeholder (#32183)

The two label lines read `FROM → TO`, which the ADR-0087 gate takes as a
migration prescription beside `not-required (no-migration-prescription)`.
Each moved answer still reads as before → after; nothing is rewritten by a
consumer, so the disposition stands.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…heir withheld item (#32183)

With holders judged over the served set, the by-name read of a name only
disabled packages hold resolved to nothing, and its envelope carried no
package. The layered view's step 1b and `/published` ask that envelope
whether a disable withheld the item, so both doors took the name as not
withheld: `/layers` served the disabled package's code layer at the bare
address and at `?package=` of any non-holder, and `/published` served its
snapshot.

The item face now answers such a name as that package's withheld item
(item undefined, the envelope naming the disabled holder), the shape a
disabled holder's read had, on both faces. Every door keeps the missing
name's 404.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…ished 404s (#32183)

The item face now carries part of the fix, so `@objectstack/metadata-protocol`
joins the changeset. The note says the layered view and `/published` keep
the missing name's 404 for a name only disabled packages hold, and lists the
bare read of a name two or more disabled packages hold (409 → 404).

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…n the action addressing pins (#32183)

The file's import graph reaches `standalone-stack.ts`'s dynamic import of
`@objectstack/metadata`; check:test-source-alias asks an edited test file to
load it at module top, so no clocked case pays that transform.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…eview round on #32214

- notify node: a literal payload `template` string records the armed package
  too, as the channels read it (F-A).
- the pair-row owner check is one self-contained function,
  pairRowOnAddress, which the exact read and the scoped list both ask: the
  declared base first (F-B), the App's own pair, two owners refused, a sole
  owner that is not one of the address's bases not served (S2).
- SchemaRegistry.getPackageScopedItem skips a pair row that declares
  another holder as its base, so the App's address answers its own item.
- stored-references hints, its module doc and the changeset say truthfully
  that no door binds an added member to one base today (#28777) (F-C).
- changeset: Metadata-protocol narrowed; slotted set lists api, agent, skill
  and email_template; the package-less rule names PACKAGE_SCOPED_READ_TYPES;
  the pair row's sole-owner and App-slot rules.
- email-service docs page: the new callerPackageId member.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/cli/src/commands/migrate/stored-references.integration.test.ts
#	packages/metadata/src/package-slotted-store.ts
#	packages/objectql/src/bare-name-one-holder.ts
#	packages/objectql/src/registry-bare-name-one-holder-ai-family.test.ts
#	packages/objectql/src/registry.ts
#	packages/qa/dogfood/test/bare-name-one-holder-flow-family.dogfood.test.ts
#	packages/services/service-automation/src/engine.ts
…holds take the served holder's stack

Contract review M1 on #32327. A read naming no package, of a name an
enabled and a disabled package both hold, now reads at the served
holder's address: the plain read (the face), the layered read's code
layer, overlay row and lock, and the layered row-ambiguity refusal,
which no longer refuses a read the served holder addresses. Before, the
layered code layer was the first composite in registration order (the
disabled holder's when it registered first), and a legacy row bound to
the disabled holder made the bare read answer 404.

Pins on both transports, both registration orders: the plain read and
/layers for every package-scoped type, and the plain read, /layers and
/published with legacy rows bound to the disabled holder (REST harness
and a booted kernel).

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Nov 12, 2026
Brings #32497 in. The stored-column arm of the permission-set read keeps
#32497's disabled-holder check first (a column naming a disabled holder
confers nothing), then this branch's metadata-slot read, then the
namespace-bounded stale reading. Where the registry holds the name
nowhere, a disabled package included, the metadata read keeps this
branch's two-holder refusal.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgW9bnkZxxN5KiRaPi9
os-sales pushed a commit that referenced this pull request Nov 12, 2026
#32497 landed between the two merges. One textual conflict: both sides
appended a describe at the end of package-scoped-exact-qualifier.test.ts;
both are kept. Three of #32497's new pins asserted the D4 customization
answer for a sealed type with the other holder disabled (`agent`; `action`
on the plain and the layered read); by epic ruling 6817768147 a sealed
type's package-less item is declined at every holder's exact address, so
they now pin the holder's own item, re-enabled too, with #32497's answer
named in the title. `dashboard` keeps #32497's answer.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgV84zNSi6HwSHmMU2c
os-sales pushed a commit that referenced this pull request Nov 12, 2026
…, then re-enabled, leaves no hydration state behind

Pins the answers #32497's served-holder set gives this card's rows: an
overlay type's package-less row is the enabled holder's customization
while the other is disabled and is refused naming both once re-enabled;
a sealed type's is declined at both addresses throughout.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgV84zNSi6HwSHmMU2c
os-sales pushed a commit that referenced this pull request Nov 12, 2026
…#32497

Measured on main 2f80f28 against this head, per answer (dispatcher
probe, SchemaRegistry and real-engine compositions):

- #32497 already judges the /layers code layer at an exact address
  through exactQualifierItem, so /layers?package=BASE.custom answers the
  base's code layer, and code: null at a package that ships nothing, on
  main. The changeset no longer claims those two moves.
- /layers at an App pair holding a stored row, two modules shipping the
  name: main already refuses it when another package registered ahead of
  the modules (the lookup lands there); with a module first and no other
  shipper it answered that module's body. The changeset says so, and the
  stored-row pin gains the two module-first cases, which are red on main.
- The three 404 -> 200 widenings move on /layers too; their pins now
  assert /layers beside the plain read, and the changeset names it.
- The BASE notes of the three describes record the re-measure.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXYPmTrQ4KGuKWzNh7
os-sales pushed a commit that referenced this pull request Nov 12, 2026
The #32501 branch already carries main 2f80f28 and #32497's landed head
28b37fb as merges, so this one merge brings both; merging origin/main
afterwards is a no-op. One conflict: the getMetaItemLayered host Pick list,
where #32497 added 'getServicesRegistry' and this card added
'packagelessAddress' and 'shippedArtifactsOf'; the resolution keeps all three.

Claude-Session: https://claude.ai/code/session_01L6bhgUya1GaUvBwEKoPCdn
Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 12, 2026
os-sales pushed a commit that referenced this pull request Nov 12, 2026
Brings in #32183's served-set judgement for the by-name doors (#32497),
among others. One file conflicted: `meta-qualified-item-read.test.ts`, where
this branch's webhook describe and main's caller-arm and `/layers` describes
were added at the same place; all three are kept.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUJAvdCcvoqdsFGVz8
os-sales pushed a commit that referenced this pull request Nov 12, 2026
… holder, now that its holder read answers the served ones

#32183 (#32497, merged from main) made `SchemaRegistry.packageScopedHoldersOf`
answer the served holders, a disabled package left out, with
`includeDisabledPackages` for a durable judgment. The plugin's `every`
reading took the registry as it was, so it lost the disabled co-holder: the
ledger row ownership, the redelivery guard's count of holders and the
every-holder-disabled branch read one holder where two declare the name. On
the merged tree 8 pins of the disabled co-holder describe were red; the
`every` reading now asks for every holder, and all 292 are green.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUJAvdCcvoqdsFGVz8
os-sales pushed a commit that referenced this pull request Nov 12, 2026
… holder's, now that the by-name doors judge the served set (#32497)

The protocol's bare item read, its published read and MetadataFacade.get
answer the enabled holder's declaration under one enabled and one disabled
holder, and refuse the name naming both once the package is enabled again;
a lone disabled holder answers nothing. The changeset's disabled co-holder
bullet said the by-name read still counted a disabled holder: it no longer
does after #32497.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUJAvdCcvoqdsFGVz8
os-sales pushed a commit that referenced this pull request Nov 12, 2026
…y a disabled package holds

Measured with `webhook` out of the three type sets, as main has them:
`MetadataFacade.get` / `getEntry` and `SchemaRegistry.resolveItem` answered
the disabled package's declaration and `MetadataFacade.exists` true; on this
head they answer undefined and false, as #32497 made them for the other
package-scoped types. The lone-disabled pin now asserts all four.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUJAvdCcvoqdsFGVz8
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…g both when the platform and a package hold the name, and answers nothing for a name only a disabled package holds (ADR-0150 D4) (objectstack-ai#33439)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDwkEEJd65kqFZGFjQnzBQt)_

Fixes objectstack-ai#32907
Fixes objectstack-ai#32933
Fixes objectstack-ai#32910

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — `skills/**` and `content/docs/**` name neither
`resolveFunction`/`resolveFunctionEntry` nor
`resolvePackageScopedFunction`, and teach no function name held by the
platform beside a package or by a disabled package; the prescription
ships in the changeset's BREAKING paragraph.

## 维护者速读

1. 改了什么:不带包名按名读函数(`resolveFunction` / `resolveFunctionEntry`,以及无调用包的
`resolvePackageScopedFunction`)时,平台(无主注册)与一个包同持一个名字,一律 409
点名双方,不再按注册先后答其一;只有已停用包持有的名字不再答该包的函数(停用包仍计为持有者,照样参与歧义判定)。运行时重绑从持有者集读回保留函数,不再走裸读。另补
objectstack-ai#32910 的四组运行时钉子。
2. 为什么改:ADR-0150 D4 规定无包调用方在平台+包同名时应被拒并点名双方,原实现只数包,按先后答或答空;ruling
A(6824698376)要求停用包"计为持有者、永不被解析到"。
3. 风险与回滚:只收窄(Clause-② no (narrowing),标题带
`!`),原先被拒的一律仍拒,无任何放宽;仍会答的:单一启用包、仅平台、调用方自身包。第一方:仓内无平台与包同名的函数注册(见
Acceptance notes)。回滚即还原本 PR。
4. 先看:`packages/objectql/src/package-scoped-resolver.ts` 的
`callerlessFunctionResolution`;`packages/objectql/src/engine-hooks-and-functions.ts`
的 `bareFunctionEntry`;`packages/runtime/src/app-artifact-handlers.ts` 的
`releaseMovedFunctions` 中 `bare:` 一行。
5. 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run
src/registry-bare-name-one-holder-request-family.test.ts`,预期 78/78 绿;其中
`[objectstack-ai#32907]`、`[objectstack-ai#32933]` 两组在 main 上 5 条红。
6. 需要你做的:裁定 objectstack-ai#32933 的读法(见 Acceptance notes 的 needs_decision:本 PR
实施"计数不解析",另一读法"只数在用持有者"会放宽两个格子)。

## What changes

The engine keeps every holder of a function name: each package that
registered one, and the platform for a registration under no package
(`ObjectQL#functionHoldersOf`). A read that names no package resolves
the name by ADR-0150 D3 over those holders.

1. **objectstack-ai#32907 — the platform beside a package is two holders.**
`bareFunctionEntry`
(`packages/objectql/src/engine-hooks-and-functions.ts`, the body of
`ObjectQL#resolveFunction` / `resolveFunctionEntry`) now always runs the
rule (`resolvePackageScopedHolders`, caller with no package) over the
holder set, platform included. Before, it consulted the rule only when
two PACKAGES held the name, and otherwise answered the bare map's last
registration, so the platform plus one package answered by order (the
package's entry, or the platform's when it registered last) or nothing
after a third, last-registered package left. Now every one of those
cells is `409 RESOURCE_CONFLICT`, reason `ambiguous-in-environment`,
candidates `[package, platform]` — the same refusal the caller-less
`resolvePackageScopedFunction` already answered, so the two reads agree.
When the rule resolves (one holder), the answer is still the bare map's
entry, the same entry object, so the one-holder answer is unchanged byte
for byte. PR objectstack-ai#32877's CONTROL pin for this row is flipped to the
verdict.
2. **objectstack-ai#32933 — a disabled package is counted, never resolved to.** New
`callerlessFunctionResolution`
(`packages/objectql/src/package-scoped-resolver.ts`, not re-exported
from the package entry) post-filters the rule's answer for a caller with
no package: when the rule picked a package as the environment's unique
holder (`via: 'unique-holder'`, the step only a caller with no package
reaches) and the registry says that package is disabled
(`SchemaRegistry#isPackageDisabled`), the answer is `not-found`. Both
the bare read and `resolvePackageScopedFunction` apply it. Refusals are
computed over EVERY holder, the disabled one included, so a disable
never turns a refused name into an answer. A caller naming its own
package, a caller's closure step, the platform's item and every refusal
pass through unchanged. The every-holder doors (the hook binder's bind
after the seal, `claimBareNameFunctions`; the cold-boot seal,
`sealBareNameHolders`) read the registry's claims, which never looked at
enablement; they are pinned, not changed.
3. **Runtime re-bind — read the kept entry off the holder set.**
`releaseMovedFunctions`
(`packages/runtime/src/app-artifact-handlers.ts`) read the bare slot of
each kept name through `resolveFunctionEntry`. With (1) that read throws
for a name the platform holds beside the package — aborting the
re-bind's teardown — and with (2) it answers nothing for a disabled
package, which would drop the owner spelling the package held a kept
function by. For a name the package alone holds the bare slot IS the
package's holder entry (one entry object in both maps), so the binder
now uses that entry; the two-package case (`packageHolders.length > 1`)
is unchanged.
4. **objectstack-ai#32910 — runtime pins only** (no code): the re-bind before the seal
(N4), the move path's ordering CONTROL (D2-N1), the other owner-spelling
order (D2-N2).

No `packages/objectql/src/registry.ts` symbol is changed
(`registry_symbols`: none). No export is added; `engine.ts` changes
docblocks only.

## Tests

Pins, numbered for this PR (no numeral lives in the files; the skipped
(iii) of objectstack-ai#32910's "Numbering" item was in PR objectstack-ai#32877's body only, so
there is nothing to renumber in the file):

- objectql `src/registry-bare-name-one-holder-request-family.test.ts`
- (i) flipped: `[objectstack-ai#32534] … the platform and one package remain after the
last-registered package leaves … (FROM nothing TO 409)` — was the
CONTROL "current behaviour, see objectstack-ai#32907".
- (ii) `[objectstack-ai#32907] … the package registered last (FROM the package's entry
TO 409)`.
- (iii) `[objectstack-ai#32907] … the platform registered last (FROM the platform's
entry TO 409)` — the platform-last-registrant cell.
- (iv) `[objectstack-ai#32933] a name only a disabled package holds: the bare read and
the caller-less read answer nothing; enabled again, both answer it`.
- (v) `[objectstack-ai#32933] counted: the platform beside a disabled package is still
two holders`.
- CONTROLs: the platform alone and one package alone answer; a caller
package holding the name resolves its own beside the platform; the
disabled package's own read resolves its own; two packages, one
disabled, stay refused naming both; after the seal a co-owner's bind of
a name a disabled package holds is refused naming it; the cold-boot seal
reports a co-owner clash with one holder disabled.
- runtime `src/app-artifact-handlers.test.ts`
- (vi) the teardown it.each gains a row: the platform holds the name
beta keeps too — the teardown runs whole, the bare read is refused
`[beta, platform]`.
- (vii) N4, it.each moved / dropped: a re-bind before the seal releases
the old owner's claim; the seal then reports no clash.
- (viii) D2-N1 CONTROL: the move path releases after the old owner's
kept functions are registered again — a function the new bind neither
moves nor gives back keeps its claim.
- (ix) D2-N2, it.each moved / dropped: the bare-id registration before
the bind; the removal takes the entry the bind replaced it with and the
claim is released.
- (x) CONTROL: a disabled old owner keeps a kept function under the
bare-id spelling it held it by, and its claim.

The red-on-main reading and the ablations ran before the merge (the
reading on `90423f6b`, every ablation on `e8106eb3`); the merge touched
none of the files they read.

Red on main / green after: (i)–(v) are red on `main`'s objectql sources
and green on this head; every objectql CONTROL is green on both.
(vi)–(x) pin behaviour `main` already has (the objectstack-ai#32910 rows are coverage
of objectstack-ai#32534's release; (vi) and (x) guard the re-bind against this PR's
engine change), so each is proven by its ablation instead.

<details><summary>Red-on-main reading (objectql sources restored from
df9fe94, test file at head)</summary>

```text
pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/registry-bare-name-one-holder-request-family.test.ts
Tests  5 failed | 73 passed (78)
  x the platform and one package remain after the last-registered package leaves ... (FROM nothing TO 409)
  x the package registered last (FROM the package's entry TO 409)
  x the platform registered last (FROM the platform's entry TO 409)
  x a name only a disabled package holds: ... (FROM its entry TO nothing)
  x counted: the platform beside a disabled package is still two holders ...
restore: git checkout HEAD -- (3 paths); git diff HEAD empty, git status clean
```
</details>

<details><summary>Ablations — one per pin, each through
scripts/ablation-replace.mjs (anchor hit x1, blob changed, restored to
the HEAD blob, git diff HEAD empty)</summary>

Neither suite reads a rebuilt `dist/` for the mutated file: the objectql
file imports objectql `src/`, and every runtime mutation is in runtime
`src/` (objectql `dist/` was built once from this head's objectql
sources before the runtime runs).

```text
A1  objectql bareFunctionEntry: hide the platform from the holder set
    ({ ...functionHoldersOf(name), platformItem: () => undefined })
    -> 7 failed | 71 passed (78): (i) (ii) (iii) (v), plus the three platform CONTROLs
       (the platform-alone answer and the two objectstack-ai#32534 owner-less rows), which read the platform too
A2  objectql callerlessFunctionResolution: return resolution unfiltered
    -> 1 failed | 77 passed (78): (iv)
A3  runtime releaseMovedFunctions: read the bare slot through resolveFunctionEntry again
    -> 2 failed | 40 passed (42): (vi), (x)
A4  runtime releaseFunctionClaims: return before releasing anything
    -> 10 failed | 32 passed (42): (vii) x2, (viii), (ix) x2, (x), and the four objectstack-ai#32534 release pins
A11 runtime releaseMovedFunctions: release right after the unregister, before the kept functions are registered again
    -> 1 failed | 41 passed (42): (viii) alone — the card's epic-read measurement (34/34 green under A11) closed
```
</details>

## Acceptance notes

- **needs_decision — objectstack-ai#32933's reading.** objectstack-ai#32933 asks the bare and
caller-less function reads to "answer from served holders only"
(objectstack-ai#32497's default). objectstack-ai#32907's own constraint says "Ruling A 6824698376: a
disabled package is still a holder" and "anything refused today stays
refused", and ruling A says a disabled holder is "counted, never
resolved to". The two readings agree on a name only a disabled package
holds (nothing answers — implemented) and disagree on two cells: (a) two
packages, one disabled; (b) the platform beside a disabled package.
Served-only answers the enabled holder / the platform there, where today
both are refused (409): a loosening. Per the dispatch's red line this PR
implements the reading that never loosens — counted, never resolved to —
and pins both cells refused. Alternative: served-only (drop disabled
packages from `packageHolders` for these reads, keep the caller's own);
cost one filter plus two pins flipped, and an explicit epic ruling that
a disable may turn a refusal into an answer for functions.
- **objectstack-ai#32910 D2-N2 wording.** "still holds under another owner spelling"
ships in the released `packages/objectql/CHANGELOG.md` and
`packages/runtime/CHANGELOG.md` entries of PR objectstack-ai#32877; qualifying it "in
the engine's holder set" is a release-owned file, so it is owed as a
dedicated docs-only PR, never this one.
- **First-party exposure: 0 measured by source scan.** Outside tests, no
first-party code registers an owner-less engine function:
`ObjectQL#registerFunction` has one non-test caller, the hook binder,
which passes the bind's `packageId`, and every first-party bind of
functions is the app-artifact binder's, under `app:` plus the package id
(the objectql plugin's `metadata-service` binds carry hooks, no
functions). So no first-party name is held by the platform beside a
package. A disabled package's function is reached by a caller-less read
only when an environment-authored flow names it.

## Verification

Head `d0af5314` (this branch's work on `df9fe946`, then `origin/main` at
`b4624440` merged once before opening; the merge touched none of this
PR's files).

<details><summary>Local runs on d0af531 (objectql suite, typechecks and
the two changed test files re-run after the merge, runtime's dependency
closure rebuilt)</summary>

```text
pnpm --filter @objectstack/objectql test                       595 files, 12988/12988 passed (12972/12972 before the merge, on 039e6bb)
pnpm --filter @objectstack/objectql typecheck                  exit 0 (tsc + check:test-typecheck: 39 files / 233 errors / 64 pinned, held)
pnpm --filter @objectstack/runtime typecheck                   exit 0 (tsc + check:test-typecheck: 27 files / 183 errors / 66 pinned, held)
pnpm --filter @objectstack/objectql exec vitest run src/registry-bare-name-one-holder-request-family.test.ts    78/78
pnpm --filter @objectstack/runtime exec vitest run src/app-artifact-handlers.test.ts    42/42
eslint --no-inline-config on the six changed source and test files                       exit 0
```
</details>

<details><summary>Derived gate families (dispatch-gates --commands on
d0af531: 72 families, the same list as on 039e6bb) — reconciled with
--ran: 72 run, 0 NOT MEASURED, 0 UNRUN</summary>

```text
72/72 exit 0 on d0af531, among them: check-adr-0087-registration --base origin/main (1 declared-breaking changeset,
  BREAKING+bang+clause-2-narrowing, not-required (no-migration-prescription)), check-changeset-no-major,
  check-empty-changeset, check:changeset-gate-self-tests, check:engine-double-contract, check:durability-log-level,
  check:startup-registry-verdict, check:lean-entry-closure, check:facade-delegation-only, check:nul-bytes,
  check:type-check-coverage, check:type-check-debt, check:test-source-alias, check:cross-package-test-inputs,
  check:doc-authoring, check:issue-citations, check:published-files, check:dual-build-cjs-loads.
check-plugin-teardown-shape --self-test reads a fixture pinned to commit 621a487, outside the shallow clone:
  that one commit was fetched (depth 1) before the run.
On 039e6bb (before the merge) 71/72 exit 0 and check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET, unbuilt dist/).
```
</details>

Declared to CI: the full runtime suite and its dependents (the
addendum's scope: only the runtime file touched ran locally), the
repo-wide `pnpm lint`, `test:repo`, and the full dogfood battery this
`!` title owes (NOT MEASURED locally: the dependents' run holds the
shared verify lock for about 90 minutes).

Session: https://claude.ai/code/session_016WV4cz4f7zEQZ2C9GTG382

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…, so a disabled package holds no name at the send (ADR-0150 D3) (objectstack-ai#33361)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDZYUbJbnXUTqZoZ56k4czR)_
Part of objectstack-ai#32670

Clause-②: yes (narrowing) — widened: a send of a template name an
enabled and a disabled package hold, made with no package or from a
caller whose closure holds both, is served the enabled holder's template
where it was refused naming both. Narrowed: a send that only a disabled
holder's side answered (its customization pair's row, a dependent's
added locale, the environment's item or a package-less stored row beside
a name only it holds) finds no template; a send of an auth name whose
one overriding package is disabled is served the built-in copy. Refusals
name only the packages that serve the name. With no holder of the name
disabled, every answer is unchanged.
Metadata-protocol: none
Skills-docs: none — no skill under `skills/**` and no page under
`content/docs/**` teaches what an email template send answers when a
package holding the name is disabled.

## 维护者速读

- 改了什么:邮件模板发送(`template-loader.ts` 的
`bundleAddressOf`)在模板名有持有包被停用时,只按"仍在服务的持有包"解析名字,并且只从不含停用包成员的地址读取模板(解析出的持有包自己的地址,或内置模板的地址);停用包自己发送、或没有任何在服务持有包能回答的发送,一律"找不到模板"。没有持有包被停用时,行为与
main 完全相同。
- 为什么改:objectstack-ai#32183 让停用包在解析处不再持有名字,但发送门按 R4-A 暂时保持 main
的答案;本卡把发送门也改为判断在服务的持有包,同时不泄露别的包的成员(停用包的定制对行、依赖包追加的语言)。
-
风险与回滚:风险在"收窄"一侧:停用包一侧原本能发出去的模板(定制对行、依赖包追加语言、与单一停用持有包并存的环境项或无包存储行)现在发不出去;auth
模板的唯一覆盖包被停用时改发内置模板。回滚即还原 `template-loader.ts` 一个文件。`_env` 单元格与 R4-G
流程门不在本 PR(见 Acceptance notes)。
-
先看:`packages/plugins/plugin-email/src/template-loader.ts`(`servedBundleAddressOf`,尤其"读哪个地址"的分支);`packages/plugins/plugin-email/src/template-loader.test.ts`(新
describe 的期望表);`.changeset/32670-email-send-served-holders.md`(逐行 FROM →
TO)。
- 两分钟验证:`pnpm --filter @objectstack/plugin-email exec vitest run
src/template-loader.test.ts`,预期 76 个测试全部通过。
- 需要你做的:决定 `_env` 单元格(需要改 `packages/metadata-protocol`,属 E1 区域)与 R4-G
流程门的去向;本 PR 落地须等 objectstack-ai#32354。

## What changes

`createRegistryEmailTemplateLoader`'s `bundleAddressOf`
(`packages/plugins/plugin-email/src/template-loader.ts`):

- **No holder of the name disabled**: the code path is `main`'s,
unchanged (resolve, count and the shared view over every holder, which
are the served holders here). Measured: 0 moved answers with nothing
disabled, across the probe matrix below.
- **A holder disabled** (`servedBundleAddressOf`): the name is resolved
over the served holders, so a disabled package is never the answer and a
refusal names only the packages that serve the name. The bundle is read
only where no member of a disabled holder's side is listed:
- resolved to a served holder: that holder's own address (as `main`
already read a name two packages hold);
- resolved to the built-ins (an auth name whose overriding package is
disabled): the built-ins' own address, through the closure re-resolve;
- the caller's own holding is the disabled one, or no served holder
answers: no template (`NO_BUNDLE`, no list is read);
- the caller holds a dependent's addition only: resolved again from its
closure over the served holders, so a dependent of a disabled base never
gets a template from outside its closure.
- **Why the read is chosen and never filtered after the read** (measured
on the real protocol): the environment-wide execution list keeps a
disabled holder's customization-pair rows and a dependent's added
locales listed, and an item's `_packageId` there is the slot it fills,
not the package that stores it. A pair row filling a locale a dependent
also adds wears the dependent's id; the environment's item over a
disabled holder's slot wears the disabled holder's id. So the member
rule of contract review 6819947096 (a send returns only members stored
under the resolved holder, its pair, a dependent whose closure holds it,
or no package) is met by choosing the address, never by filtering
`_packageId`.

The card's rows 27 to 31 (PR objectstack-ai#32497's round-3 table, withdrawn under
R4-A) are restored, and rows 36 to 38 are declared. Numbering: 27 to 31
follow the round-3 changeset's order (rows 29 and 30 are the two
refusals naming the enabled holder, per the red-line read 6819956008);
32 to 35 stay objectstack-ai#32497's.

| Row | Address / caller | State | FROM (`main`) | TO | Clause-② arm |
|:---|:---|:---|:---|:---|:---|
| 27 | a send with no package (omitted or `null`) | two holders, one
disabled | 409 naming both | the enabled holder's address (its template;
a locale only the disabled side carries: no template) | widening |
| 28 | a caller whose closure holds both | same | 409 naming both | the
enabled holder's address | widening |
| 29 | a caller whose closure reaches the name only through the disabled
holder (a dependent of it included) | same | no template, or the
disabled holder's pair row | 409 `outside-closure` naming the enabled
holder | refusal |
| 30 | a caller that reaches neither (the built-in package as caller
included) | same | 409 `outside-closure` naming both | 409
`outside-closure` naming the enabled holder | names fewer |
| 31 | every caller | every holder disabled | 409 naming them, or the
pair's row | no template | not-found |
| 36 | the disabled holder's own send | two holders, one disabled | its
pair's row | no template | not-found |
| 37 | every caller | one holder, disabled, beside the environment's
item (registered first or last), a package-less stored row, a
dependent's addition or the pair's row | that member (the
environment-wide list), or 409 `outside-closure` naming it for a caller
with no path | no template | not-found |
| 38 | every caller but the package; the dependent | an auth name
(`auth.*`) whose one overriding package is disabled | the
environment-wide list (the disabled package's side, the environment's
item, or the built-in), or 409 naming the dependent and the package |
the built-ins' own address (the built-in template, or a package-less
stored row there); the package's own send: no template | narrowing
(re-targeted) |

First-party count 0 on every row: no first-party composition ships an
email template name two packages hold, or disables a package that holds
one.

## Tests

`packages/plugins/plugin-email/src/template-loader.test.ts`: the R4-A
parity describe (`a disabled holder still counts at the send`), whose
premise this card reverses, is replaced by `a disabled package holds no
name at the send (ADR-0150 D3, objectstack-ai#32670)`:

- Real world: a `SchemaRegistry` and the protocol's real
`getMetaItemsForExecution` (`ObjectStackProtocolImplementation`, aliased
to this checkout's source) over stored `sys_metadata` rows: ALPHA's
customization pair `ALPHA.custom` stores an fr-FR member row; ADDER
depends on ALPHA only and adds fr-FR. No double over
`registry.listItems`. The engine double opens `findOne` with
`assertEngineFindOnePredicate`, and carries no write verb.
- 11 cases × 2 registration orders × 2 reads (the protocol's, and the
registry's own list) = 44 tests; each asserts 9 callers × en-US and
fr-FR (792 answers). Callers: omitted, `null`, ALPHA, BETA, a closure
holding both, a closure through ALPHA only, neither, the dependent, the
built-in package.
- Cases: two holders with nothing / ALPHA / BETA / both disabled; two
holders with the dependent disabled and ALPHA disabled; one holder
disabled beside the environment's item registered first, and last; one
holder beside a package-less stored row, nothing disabled and disabled;
an auth name one package overrides, nothing disabled and disabled.
- CONTROLs: all enabled (two holders), one holder (nothing disabled), an
auth name (nothing disabled); and the R4-F CONTROL (the built-in package
as caller) is kept.
- A refusal is asserted by its envelope (`code` `RESOURCE_CONFLICT`,
`status` 409) and its candidates.

## Acceptance notes

- **Landing waits on objectstack-ai#32354** (E1's, no PR yet), as the card's order
says. Until then a disabled holder's side stays listed in the
environment-wide list and in the list scoped to a disabled base
(objectstack-ai#32354's class, unmoved here). That is why a served holder beside a
disabled one is still read at its own address: the environment-wide list
would hand it the disabled side's members. Once objectstack-ai#32354 withholds them,
the address can be chosen on the served count alone (a separate,
declared move).
- **Not in this PR: the `_env` cell of objectstack-ai#32183's row 17 (ruling R4-B2)**.
Moving `_env` of a name only disabled packages hold from `main`'s 409 to
row 17's 404 needs `packages/metadata-protocol/src/**`, which this lane
may not edit (area E1): `admitEnvironmentQualifier`
(`protocol-exact-qualifier.ts`) admits the read when no package serves
the name, and the `_env` mark has to reach the item face
(`protocol-meta-item-face.ts`, `disabledOnlyHolderOf`) through both
transports (`packages/runtime/src/domains/meta.ts` at its
`admitEnvironmentQualifier` call, and
`packages/rest/src/meta-qualified-item-route.ts`), so the face answers
the withheld 404 and never the disabled holder's pair row. Raised for
decision in the report; the card stays open (`Part of`).
- **Not in this PR: the R4-G sweep.** objectstack-ai#32497 holds the objectstack-ai#32507 flow doors
at `main` and carries their served judgment to this card
(`flowServiceForCaller`, `endpointPackageOf`, `flowWalkReads`,
`flowHolderForCaller` in runtime `flow-slot-view.ts`; `bareNameRefusal`
and `admitAutomationAddress`'s shared branch in runtime
`automation-address.ts`; `heldByMany`, `sharedFlowNameRefusal` and
`resolveFlowKey`'s shared branch in service-automation `engine.ts`; and
the dispatch key `flowDispatchHolder`). A runtime disable keeps a
disabled package's engine slot armed, so a served read there moves those
doors both ways; that is a design question, raised for decision in the
report.
- **The environment's item beside a name only a disabled package holds**
(row 37) is withheld as that package's customization: the registry
answers no environment item for a name a package holds
(`getEnvironmentScopedItem` is undefined), and the execution list stamps
the item with the disabled holder's slot. Sending nothing is the
conservative answer (red line: resolution is never loosened); the
reviewer may rule otherwise.
- The environment-item branch of `servedBundleAddressOf` (a resolve to
the environment's own item, read environment-wide as before) is
unreachable in the probe matrix: replaced by no template, 0 of 31,104
answers move. It is kept as `main`'s answer for that resolve.
- `main` answers some one-holder sends beside the environment's item in
an order-dependent way (the en-US slot answers the holder's template in
one registration order and the environment's item in the other), the
same on both trees with nothing disabled. Not moved here; the pins use
no such CONTROL.
- A non-auth name the built-in package holds (unreachable: the built-ins
ship only `auth.*` names) answers like any other package holder;
measured in the matrix, not pinned.

## Verification

All at `4419624c1a` unless named.

<details><summary>Probe matrix (FROM = `main`'s loader, TO = this
head's, one process, same registry per answer)</summary>

31,104 answers: one or two holders with every subset disabled; beside
nothing, the environment's item registered first or last, or a
package-less stored row; with and without the pair's stored fr-FR row;
no dependent, the dependent enabled or disabled; no built-in, the
built-in holding a non-auth name, or an auth name; 9 callers; en-US and
fr-FR; both reads; both orders.

- Moved: 14,681; with nothing disabled: 0.
- A sent member stored outside the member rule (a disabled holder's own,
its pair's row, a disabled or base-disabled dependent's addition, or a
holder outside a package caller's closure): `main` 1,127; this head 107,
all 107 unmoved from `main` and all in nothing-disabled states (the
built-in package as caller of a one-holder non-auth name, R4-F's shape);
new ones: 0.

</details>

<details><summary>Ablations (each through
`scripts/ablation-replace.mjs`, restored to the HEAD blob)</summary>

- A1, the served branch removed (`bundleAddressOf` never calls
`servedBundleAddressOf`): 32 of 76 red, every disabled case in both
orders and both reads; the 12 CONTROL tests and the other 32 stay green.
- A2, not-found reads the environment-wide list instead of no template:
16 of 76 red (rows 31 and 37).
- A4, the disabled caller's own holding falls through to the re-resolve:
16 of 76 red (two holders with ALPHA or with BETA disabled, the
dependent-disabled case, and the auth name; rows 29, 36 and 38).
- A5, the re-resolve counts every holder: 12 of 76 red (two holders with
ALPHA disabled, the dependent-disabled case, and the auth name; rows 29
and 38).
- A6, the re-resolve's built-ins arm removed: 4 of 76 red (row 38).
- A3, a duplicate built-ins check before the re-resolve, ablated: 0 of
76 red, and 0 of 31,104 matrix answers moved; it was deleted
(`26768975c`). A2, A4 and A5 ran at `b82d77303`, whose
`template-loader.ts` differs from the head's only by that deleted line;
A1 ran again at the head.

</details>

<details><summary>Tests and gates</summary>

- `pnpm --filter @objectstack/plugin-email test`: Test Files 53 passed
(53), Tests 1010 passed (1010) (lock VERDICT command-exit 0).
- `pnpm --filter @objectstack/plugin-email typecheck` (tsc, then
`check:test-typecheck`): exit 0, `check:test-typecheck: OK`.
- `eslint --no-inline-config` on the two touched source files: exit 0.
- The derived local gate families (`dispatch-gates.mjs --commands`, 79
commands): 75 exit 0 on the first run; `check-adr-0087-registration`,
`check:engine-double-contract` and `check:test-source-alias` were red on
the first run and are exit 0 after `4419624c1a` (the ADR-0087
disposition, the pinned `findOne` and its ledger line, the protocol's
source alias). `check:dual-build-cjs-loads`: NOT MEASURED, reason:
PREREQUISITE NOT MET (it reads every package's `dist/`; CI runs it).
- Dependents of `@objectstack/plugin-email` (60 downstream packages,
through `rest` and `client`): not run locally; the public surface is
byte-unchanged (no export, type or signature moves; the change is
module-internal), and Test Core runs the affected set. The full dogfood
battery is owed by the narrowing arm and is reported with the dev
report.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants