Repository navigation
fix(metadata-protocol)!: an App pair row declared for a package that still ships the name is never served at a bundle addition's address (ADR-0150 D4) - #33251
Conversation
… the name is never another package's moved edit (ADR-0150 D4)
…s the name at a bundle addition; changesets and ADR-0087 entry
📓 Docs Drift Check10 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 3df08d268a42f629ecaf9131be585e8c86f14c43 && git checkout 3df08d268a42f629ecaf9131be585e8c86f14c43
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d4fbb4dbb655f1d1527eabeea0ef3af64f152663 520a744547fd394936c89627da1289d9a1a21c16 && git checkout -B drift-repro d4fbb4dbb655f1d1527eabeea0ef3af64f152663 && git merge --no-ff 520a744547fd394936c89627da1289d9a1a21c16
node scripts/docs-audit/affected-docs.mjs --json d4fbb4dbb655f1d1527eabeea0ef3af64f152663 |
…printed guidance The migrate-meta engine guidance test refuses a tracker id in any printed field; the reason now names the moved-edit rule by what it does. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn
|
domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn Request: review · area E1 · head 520a744 · 2026-11-14T15:51Z Fixes #32606 (ADR-0150 D4 red line: a row declared for a package that still ships the name is never served at a bundle addition's address). |
|
Contract-review-claim: session_016WV4cwxS1ZpSu2hAMRcqbt · head 520a744 · 2026-11-14T15:52Z review#1 (E1) takes this head. |
Contract reviewServed-tier: Face: schema (a ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn ACCEPT · area E1 · 2026-11-14T15:55Z
|
|
domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn Dogfood · head 520a744 · 2026-11-14T16:17Z
|
…mization pair's row of a name every holder of which is disabled (ADR-0150 D3) (objectstack-ai#33383) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D75mRNRrsy6GfiJD9q7La4j)_ Fixes objectstack-ai#32814 Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none — no skill and no doc teaches what the read naming no package answers at a member only a customization pair stores (`skills/**` and `content/docs/**` grepped for disabled packages: the hits are action and component `disabled` predicates, package lifecycle references and a release page); `content/docs/deployment/marketplace-handbook.mdx` already says a disabled module is hidden. > **BREAKING** (ADR-0087 `registered`, semantic entry `disabled-holder-pair-row-bare-read-withheld`): the read naming no package, at a member only a customization pair (an App's `PACKAGE.custom`) stores, for a name every installed package holding it has disabled, answers the holder's withheld item (404 `RESOURCE_NOT_FOUND`) where it served the pair's row. First-party count: 0. Remedy: re-enable a holder. ## 维护者速读 - 改了什么:某个名字(如 email_template `welcome`)的所有持有包都被停用、而某个语言成员(如 `fr-FR`)只存在于 App 定制配对包(`APP.custom`)的存储行里时,不带 `?package=` 的裸读(`GET /meta/TYPE/NAME?member=`、`/layers`、执行读)现在答 404(停用持有者的“已隐藏”条目),以前会把那行配对定制返回出来。 - 为什么改:停用包的内容不应再被服务(专题红线 1,ADR-0150 D3);带 `?package=APP.custom` 的精确读早已答 404,裸读却还漏出这一行。裸读以前只在“什么都没读到”时才判断持有者是否全部停用,读到配对行就直接返回了。 - 风险与回滚:收紧(narrowing,BREAKING,metadata-protocol patch,Metadata-protocol: none——作者能写的东西没有变),第一方 0 处。重新启用持有者、同一配对另有启用的持有者、持有者自己的行、无包行、精确读,答案都不变。回滚 = revert 本 PR。 - 先看:`packages/metadata-protocol/src/protocol-meta-item-face.ts` 的 `isHoldersPairRow` 与 `readMetaItemFace` 里 `withheldHolder` 的三元判断(风险 hunk:裸读分支新增的判定);`packages/objectql/src/package-scoped-exact-qualifier.test.ts` 末尾的 `[objectstack-ai#32814]` 组;`packages/rest/src/meta-disabled-package-doors.test.ts` 末尾的 `[objectstack-ai#32814]` 组。 - 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/package-scoped-exact-qualifier.test.ts -t 32814`,预期 12 个全部通过:两种保存顺序 × 是否水合 × 模块/App 自身作持有者,裸读都答 404;重新启用后与两持有者 CONTROL 仍返回配对行。 - 需要你做的:无,席位落地。 ## What changes `readMetaItemFace` (`@objectstack/metadata-protocol`, the body behind `getMetaItem` and `getMetaItemForExecution`) judges whether every package holding the name is disabled (`disabledOnlyHolderOf`, objectstack-ai#32183) only when the read reached nothing, or, on an exact read, when it reached a row not stored under the named package (epic ruling R4-B). On the read naming no package, a row it did reach was returned unjudged. For a bundled type such as `email_template`, the member a customization pair adds (an App pair's `fr-FR` row beside a module's shipped `en-US`) is reached that way, so with the module disabled the bare read served the pair's row, while `?package=APP.custom` at the same member already answered the withheld item (ruling R4-C, `disabledExactAddressHolder`). Now, on the read naming no package, a row stamped with a customization pair (`pairsOf`) of a package holding the name (`isHoldersPairRow`) is judged the same way: when every holder is disabled, the answer is the holder's withheld item, the answer the same read gives with no row stored. A pair row is bound over the holders it is a pair of and is never a holder of its own (objectstack-ai#32354 contract review N2, objectstack-ai#32408), so it is withheld with them. | state (member `fr-FR` stored only under `APP.custom`) | door, naming no package | FROM `main` e540baf | TO this head | arm | |:--|:--|:--|:--|:--| | the only holder (a module of the App, or the App itself) disabled; row saved before or after the disable; hydrated or not | plain read `?member=fr-FR` | 200, the pair's row | 404 `RESOURCE_NOT_FOUND` (protocol: no item, `packageId` = the holder) | narrowing | | the same | `/layers?member=fr-FR` (`RestServer`) | 200, the pair's row as the effective layer | 404 `RESOURCE_NOT_FOUND` | narrowing | | the same | execution face (`getMetaItemForExecution`) | the pair's row | no item | narrowing | | the holder enabled again | all of the above | the pair's row | the pair's row | none (CONTROL) | | two modules of the App hold the name, one disabled, either registration order | plain read | the pair's row | the pair's row | none (CONTROL) | | both modules disabled | plain read | 404 | 404 | none | | no row stored, holder disabled | plain read | 404 | 404 | none (CONTROL) | | a package-less row, a row of a package outside the App, the holder's own row | plain read | as before | as before | none (not judged here, measured) | The other doors of the same name were measured but are outside this card: the list reads (`getMetaItems`, `getMetaItemsForExecution`) still list the pair's row while every holder is disabled (`protocol-meta-list-reads.ts`, an E1 hot file this order may not edit; see Acceptance notes). ## Tests - `packages/objectql/src/package-scoped-exact-qualifier.test.ts`, new top-level `describe` `[objectstack-ai#32814]` at the end of the file (no overlap with the `[objectstack-ai#32561]` block objectstack-ai#33251 edits): 8 negative pins (module of the App / the App itself × row before / after the disable × hydrated or not) asserting no item, `packageId` = the holder, no byte of the pair's row, and no item on the execution face, each followed by a re-enable CONTROL; 2 pins that the answer with the pair's row stored equals the answer with none (the envelope's `version` left out, see Acceptance notes); 2 CONTROLs (two modules of the App, both registration orders: one enabled serves the pair's row, both disabled withhold it). - `packages/rest/src/meta-disabled-package-doors.test.ts`, new top-level `describe` `[objectstack-ai#32814]` at the end: the plain read and `/layers` at the member answer 404 `RESOURCE_NOT_FOUND` in both save orders, then the pair's row once re-enabled; CONTROL: no row stored answers the same 404. ## Acceptance notes - **Metadata-protocol: none, by measurement.** The card expected `narrowed`. Nothing an author can write is refused, re-shaped or changes meaning: the pair row is still accepted on save and served again on re-enable. Only what a read serves while every holder is disabled moves, the same classification objectstack-ai#33130 (the served-set sibling) declared. The narrowing is carried by `Clause-②: no (narrowing)`, the BREAKING banner and the registered semantic entry. - **Not moved on purpose: a package-less row.** With the only holder disabled, a package-less `fr-FR` row is still served by the bare read (measured on `main` and on this head). `servedRowHolderOf` documents that a name with a package-less row is "judged as before" (a customization of no one holder); whether it is the disabled holder's customization is not ruled, so it is reported, not guessed. - **List reads.** `getMetaItems` / `getMetaItemsForExecution` with no package list the pair's row while every holder is disabled (measured on `main` e540baf, both save orders). Reported for a separate card; `protocol-meta-list-reads.ts` is a hot file for this order. - **Envelope `version`.** The protocol's withheld envelope keeps the `version` of what the read reached on every withheld arm (a disabled holder's own stored row keeps its row's version, measured), so the no-row equality pin compares everything else. No door serves it: both REST doors answer 404. - **`/published`** takes no member, and the bare read at the canonical member was already withheld on `main`; not moved. ## Verification Premise, on `origin/main` e540baf (a probe over the same fixtures, not committed): with the only holder disabled, the bare read at `fr-FR` served the pair's row in all four save/hydration orders, for a module of the App and for the App itself; with no row stored it answered the holder's withheld item. Every other probed state (holder enabled, two holders, a package outside the App, a package-less row, the holder's own row) answered the same on this head as on `main`. <details><summary>Pins and ablation (one mutation: the bare-read arm of the new judgment replaced with a constant false)</summary> - Fix head 51b589e, `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/package-scoped-exact-qualifier.test.ts -t 32814`: `Tests 12 passed`. - Ablated (`scripts/ablation-replace.mjs`, then `pnpm --filter @objectstack/metadata-protocol build`, `ablation-dist-preflight.mjs` marker present in `dist/index.js` and `dist/index.cjs`): `Tests 10 failed | 2 passed` — the 8 withheld pins and the 2 no-row equality pins red, the 2 two-module CONTROLs green. - Restored (blob == HEAD, `git diff HEAD` empty, rebuilt, preflight `--absent` and whole-tree clean): `Tests 12 passed`. - REST, `pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-disabled-package-doors.test.ts`: `Tests 44 passed (44)`. Ablated: `-t 32814` `Tests 2 failed | 1 passed` (both save orders red, the no-row CONTROL green). Restored: `Tests 3 passed`. </details> <details><summary>Local gates and type checks (head 28c3513, after merging origin/main 199e362)</summary> - `pnpm --filter @objectstack/metadata-protocol typecheck`, `@objectstack/objectql typecheck`, `@objectstack/rest typecheck`: `VERDICT command-exit 0` each. - `node scripts/pm/dispatch-gates.mjs --commands` (86 families) run locally, reconciled with `--ran`: `86 derived, 84 run, 2 NOT-MEASURED, 0 UNRUN`. The two exit 3 (prerequisite: a full workspace build): `check:dual-build-cjs-loads`, `check:type-check-debt`. Every other family exit 0. - NOT MEASURED locally, reason: the shared verify lock was held for 88+ minutes by another session's full affected-set test run while this was written: `@objectstack/spec` typecheck (queue-timeout), the full `@objectstack/metadata-protocol`, `@objectstack/objectql`, `@objectstack/rest` suites on the merged head, `pnpm lint`. CI runs them on this PR. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn --------- Co-authored-by: Claude <noreply@anthropic.com>
…ome back in the caller's language (objectstack-ai#32656, 1/2) (objectstack-ai#33276) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DXuamRUC67fx2TTYrFfyuSH)_ Part of objectstack-ai#32656 (PR 1 of 2; the follow-up PR objectstack-ai#33290 closes it). ## Maintainer quick read A metadata write's advisories, and the issues of its 422 refusal, now carry `userMessage` written in the caller's language: the request's language, else the workspace default, else English (ruling C on objectstack-ai#32440). `rule`, `message`, `hint`, `path` and `where` are unchanged. A rule with no user sentence carries no `userMessage`, as before. ## What changes - **spec (minor):** `SaveMetaItemRequestSchema` and `PublishMetaItemRequestSchema` gain optional, server-stated `userTextLocales` (array, max 2, ladder order); the doors build these requests member by member, so a wire body never sets it (the `client` precedent). `PublishPackageDraftsRequestSchema` is the batch door's body parser, so it is unchanged: that door hands the locales to `publishPackageDrafts` directly, and a body `userTextLocales` is not read (pinned). `ExecutionContextSchema` gains optional `workspaceLocale`: the workspace default on its own, because `locale` folds the request locale and the workspace default into one value and the ladder needs both. - **core:** `assembleExecutionContext*` fills `workspaceLocale` from the entry localization (never on a guest envelope). New helper `userTextLocalesOf(ctx)` returns `[locale, workspaceLocale]`, absent/empty values dropped. - **metadata-protocol:** `evaluateRuntimeAuthoringGate` composes `userMessage` per issue with `findingUserMessage(finding, userTextLocales)` (objectstack-ai#32790's catalog). `userTextLocales` is threaded from save, single-item publish, and the package publish promotion into the gate (pass-through only; checked: E1's open PR objectstack-ai#33251 touches none of these files). - **rest / runtime doors:** `PUT /meta/:type/:name`, `POST /meta/:type/:name/publish`, the dispatcher's `/meta` save and the `packages` domain's publish-drafts state `userTextLocalesOf(executionContext)`. ## Why Ruling C on objectstack-ai#32440 (tracking objectstack-ai#32654): the producer of a finding composes its user-facing sentence in the request locale, falling back to the workspace default and then `en`, and every client renders it as received. objectstack-ai#32790 shipped the catalog and the `userMessage` member (layer 1); its acceptance note 7 left this layer: compose it at the door that knows both locales. ## Verification - New `packages/runtime/src/domains/meta-save-user-text-locale.test.ts`, on both `/meta` save doors (runtime dispatcher and `RestServer`) over a real protocol and SQLite store: the stated locales are read off the execution context (`['zh-CN','de']`, and `[]` with none); a zh-CN request gets the `security-private-no-readscope` advisory in Simplified Chinese while `rule`/`message`/`hint` equal the en answer; an unsupported request locale (`tlh`) falls back to the workspace default, then to `en`. 6/6. - `protocol-publish-drafts-advisories.test.ts`: the package publish hands the stated locales to the gate for every promoted draft, and none when unstated. - `assemble-execution-context.test.ts`: the frozen parity pins subtract `workspaceLocale` and assert it positively (present exactly when an authenticated principal's localization names one); new pins for the request-locale-wins / workspace-default-kept split, the guest envelope, and `userTextLocalesOf`. - Exact pins updated for the new server-stated members: `http-dispatcher.test.ts`, `packages-publish-drafts-request-conformance.test.ts` (also: a body `userTextLocales` is not read), `rest-exec-ctx-principal-kind.test.ts`, `rest-server-meta-door-closed-sets.test.ts`, `rest-server-meta-member-selector.test.ts`. - Local: `@objectstack/metadata-protocol` full suite 22843 passed; `@objectstack/core` security 1394 passed; spec api+kernel 3546 passed; test-source alias gate clean; spec `check:generated`, `check:liveness`, `check:authorable-surface`, `check:docs`, `check:strictness-ledger`, ADR-0087 registration, changeset checks green. Not in this PR (follow-up objectstack-ai#33290 on objectstack-ai#32656): refusal sentences written outside the authoring rules (the packaged permission-set lock's static English, and the permission middleware's denials, which today read only the folded `locale`) move onto the same ladder. Clause-②: yes Metadata-protocol: added Skills-docs: none — `skills/**` and `content/docs/**` teach what a metadata author writes; `userTextLocales` and `workspaceLocale` are stated by the server from the caller's request and workspace, never authored or sent by a client, so no taught sentence moves. The generated reference pages are regenerated. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [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: its generated artifacts are regenerated and committed. - [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. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM --------- Co-authored-by: Claude <noreply@anthropic.com>
…package's customization pair or a dependent's added bundle member carries for it (ADR-0150 D3) (objectstack-ai#33405) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D75mRNRrsy6GfiJD9q7La4j)_ Fixes objectstack-ai#32354 Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none — `skills/**` and `content/docs/**` teach that a disabled module is hidden (`content/docs/deployment/marketplace-handbook.mdx`) and never teach a list serving a disabled package's customization or a dependent's addition to its bundle, so no taught sentence moves. > **BREAKING** (ADR-0087 `not-required (no-migration-prescription)`): while a package is disabled, the metadata lists no longer serve the rows its customization pair stores for its names, nor a dependent's added bundle member of them. Area-lease pilot objectstack-ai#33059, area E1. The list-door remainder of this card: PR objectstack-ai#33130 (merged) did the bare, exact and layered reads. ## 维护者速读 - 改了什么:某个包停用后,元数据列表不再列出它的定制包(`包名.custom`)为它的名字存的行,也不再列出依赖它的包给它的邮件模板追加的语言版本。涉及:不指名包的列表及其执行列表、指名停用包的列表、指名其定制包的列表。不指名包的发信读的就是这个执行列表,所以也不再发出这两类内容。 - 为什么改:专题 ADR-0150 D3「停用的包不持有任何名字」。按名读取早已对这些地址答 404,列表却还按注册和保存顺序列出它们;停用一个包应在每个读门上都消失(epic note 6820147040)。 - 风险与回滚:只在有包被停用时生效,没有包停用时所有列表与之前完全相同;依赖包自己的地址(`?package=DEP`)仍列出它追加的语言。过渡期内从依赖包本身发信(读不指名列表)在基础包停用时找不到该语言,等 objectstack-ai#32670 让发信按在用持有者判定后恢复。回滚即 revert 本 PR,不改任何存储数据。 - 先看:`packages/metadata-protocol/src/protocol-meta-list-reads.ts` 的 `disabledHolderListing`(新增谓词,`'unscoped'` 分支里依赖包追加的判定)以及它在停用过滤处的调用。 - 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run src/package-scoped-exact-qualifier.test.ts -t 32354`,预期 14 例全过。 - 需要你做的:无,席位落地 ## What changes One function, in `@objectstack/metadata-protocol`'s list read (`readFlattenedMetaItems`), next to the existing disabled-package filter, on the effective and execution faces only (the per-package layer, which the package export reads, keeps a disabled package's items as before): - `disabledHolderListing(host, type)` answers whether an item the list serves at a package is a disabled holder's. It is `undefined` (nothing moves) for a type the registry does not read by package and while no installed package is disabled. - **A list scoped to a package** serves no name whose exact read at that package is a disabled package's withheld item. The predicate is the exact read's own, `disabledExactAddressHolder` (`protocol-exact-qualifier.ts`, unchanged): the package is disabled, or it is a customization pair whose every base holding the name is. - **The list naming no package** leaves out an item whose own package's address is withheld that way (a disabled holder's pair row), and, for a bundle (`ITEM_KEY_DISCRIMINATORS`), an addition to a disabled holder's bundle: the item's package holds the name only as an addition (the registry's holders read as any other caller leave it out, read as itself keep it) and every holder in its declared dependency closure is disabled. Every holder is read with `includeDisabledPackages`, so a disable never promotes an addition to a holder. ## Moved answers Measured over a real `SchemaRegistry` and `ObjectStackProtocolImplementation`, on `2b2e5b41` (FROM: objectstack-ai#33251's head, `main` plus objectstack-ai#32606) and on this branch: A ships `welcome` in `en-US`; A's pair `A.custom` stores a `fr-FR` row of it, or DEP (depends on A) ships a `fr-FR` addition; with one holder, or beside B, an enabled second holder of `welcome`. Both registration orders, the pair row stored before and after the registrations. A disabled: | read | FROM | TO | |:--|:--|:--| | `getMetaItems` / `getMetaItemsForExecution`, no package (`GET /meta/email_template`) | the pair's `fr-FR` row, or DEP's `fr-FR` (beside B's `en-US` with two holders) | neither (B's `en-US` only with two holders, else nothing) | | the same, `?package=A` | the pair's `fr-FR` row | `[]` | | `?package=A.custom` | the pair's `fr-FR` row | not listed | | a send naming no package, `fr-FR` (`createRegistryEmailTemplateLoader` over the protocol) | the pair's row, or DEP's member | no template | | a send from DEP, `fr-FR` | DEP's member | no template (declared; see below) | **Not moved.** With nothing disabled every list answers as on FROM (CONTROL in every pin). `?package=DEP` keeps DEP's `fr-FR`, as `?package=DEP&member=fr-FR` serves it. `?package=B` and B's items, the pair's own item of a name A ships nothing of (CONTROL, both orders), the per-package layer, and every by-name read answer as before. Re-enabling A restores every list (asserted in every pin). **Declared interim move.** A send from DEP itself resolves to the list naming no package for this name (`bundleAddressOf` finds one holder), so it no longer finds DEP's `fr-FR` while A is disabled. objectstack-ai#32670 (the send judges the served holders, nested under this card and landing after it) reads such a send at DEP's own address, which keeps the member. ## Red lines 1. **Resolution never loosened.** Only items leave lists, and only items the by-name read of the same address already withholds. Nothing refused or absent is now served. 2. **Ambiguity reported, never guessed.** The answer no longer depends on registration or save order: every pin runs both orders and both save orders, and reads twice after the first read hydrated the stored row. 3. **Independently releasable.** No stored row, key or export changes; it moves nothing while no package is disabled, and re-enabling restores every answer. ## Tests - `packages/objectql/src/package-scoped-exact-qualifier.test.ts`, top-level `[objectstack-ai#32354] the list doors serve nothing a disabled holder's pair or dependent carries for it` (real registry and protocol, `environmentId` unset so the list hydrates rows): 12 cases (four states × both registration orders × both save orders for the pair row) asserting seven lists with nothing disabled, A disabled (read twice), and A re-enabled; plus 2 CONTROLs for the pair's own item. - `packages/rest/src/meta-disabled-package-doors.test.ts`, `[objectstack-ai#32354] RestServer: the list doors and the send naming no package beside a disabled holder` (an environment-scoped protocol): `GET /meta/email_template` unscoped and with `package=` A, A.custom, DEP through the `RestServer` route, and the email loader's send with no package and from DEP; 6 cases. ## Acceptance notes - The bare by-name read is not this PR's: measured through the `RestServer` route on this branch, with A the sole holder and disabled, `GET /meta/email_template/welcome?member=fr-FR` (no package) answers 200 with the pair's `fr-FR` row, and 200 with DEP's `fr-FR` in the addition state. With two holders (B enabled) it answers 404 in both states. That path is `protocol-meta-item-face.ts`, held by objectstack-ai#32814's work, so it is reported for a card, not changed here. - Stacked on objectstack-ai#33251 while it was open; it has merged (`51ceb433`), and this branch merged `origin/main` `87330e8959` once (no rebase). The diff against `main` is this card's four files: the list read, two test files and one changeset. - The send door's own rule (a send returns only members of the resolved holder, its pair, its dependents, or no package) stays objectstack-ai#32670's. ## Verification Head `333edb0868` (this branch with `origin/main` `87330e8959` merged). <details><summary>Pins and ablations</summary> - objectql `src/package-scoped-exact-qualifier.test.ts -t 32354`: 14 passed. REST `src/meta-disabled-package-doors.test.ts`: 47 passed (the 6 new cases among them). - Ablations (source changed with `scripts/ablation-replace.mjs`, `@objectstack/metadata-protocol` rebuilt under the verify lock, `ablation-dist-preflight` saw the marker in `dist/`, then restored: `git diff HEAD` empty, rebuilt, marker `--absent` exit 0): - A1, the exact-address arm off (`disabledExactAddressHolder` never withholds): objectql 8 failed (every pair-row case: one and two holders, both orders, both save orders), 6 passed (the four addition cases and both CONTROLs); REST 4 failed (every pair-row case), 43 passed. - A2, the addition arm off (`bases.every(disabled)` never true): objectql 4 failed (every addition case), 10 passed; REST 2 failed (both addition cases), 45 passed. - A first A2 attempt never reached the lock (queue-timeout), so the preflight refused (marker absent from `dist/`) and its green run was discarded; the rerun above is the leg. </details> <details><summary>Package tests, typecheck, lint</summary> - `turbo run test --concurrency=2 --continue` over the affected set against `main` (82 packages, `@objectstack/dogfood` left to its own battery), under the verify lock: stopped on the area lead's order once it held the lock too long, after 68 packages had finished, with 0 failed test files. Among them `@objectstack/metadata-protocol` 339 files passed (9 skipped), `@objectstack/objectql` 595, `@objectstack/rest` 410, `@objectstack/runtime` 599, `@objectstack/cli` 637 (2 skipped), `@objectstack/plugin-email` 53. The rest of the set (UI packages) is CI's Test Core. - `pnpm --filter` metadata-protocol, objectql, rest `run typecheck`: exit 0 (VERDICT command-exit 0). - `pnpm lint`: exit 0. - NOT MEASURED locally: the full dogfood battery (owed by the `(narrowing)` arm; not run, because the shared lock was the bottleneck and the area lead asked for the narrowed pre-push set; the queue's `Dogfood Regression Gate` runs it), and the derived gate families (CI's `Lint & Repo Gates`). </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn --------- Co-authored-by: Claude <noreply@anthropic.com>
…, falling back to the workspace default (objectstack-ai#32656, 2/2) (objectstack-ai#33290) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DXuamRUC67fx2TTYrFfyuSH)_ Fixes objectstack-ai#32656 Stacked on objectstack-ai#33276 (PR 1 of 2, base branch). Retarget to `main` once objectstack-ai#33276 merges. The claim on objectstack-ai#32656 names this branch. ## Maintainer quick read The refusals a permission admin or end user reads now come back in their language: request language, else workspace default, else English (ruling C on objectstack-ai#32440). Codes, statuses and the diagnostic `message` are unchanged. ## What changes - **plugin-security, packaged permission-set lock:** `PackagedPermissionSetLockedError` and `PackagedPermissionSetProvenanceUnknownError` compose `userMessage` from an 11-language text table on the caller's ladder (each code matched by `resolveBundleLocale`, the platform's one locale ladder), instead of static English. The gate reads the ladder from its context; `assertPermissionSetNotPackageDeclared` and both constructors take it as an optional last argument (no locales ⇒ the English text, byte-identical to before). - **plugin-security, authz middleware:** `userFacingDenialMessage` / `fieldEditDenialMessage` take `[ctx.locale, ctx.workspaceLocale]` and render in the first that has text (a deployment `errors.<key>` override, else the built-in operation-message catalog); none ⇒ `en` as before. Field labels are translated in the language the sentence resolves to. - **metadata-protocol (pass-through):** `MetadataAuthoringGateContext` gains optional `userTextLocales`; `runAuthoringGate` forwards the save request's `userTextLocales` (from objectstack-ai#33276) to the type's gate. Checked: E1's open PR objectstack-ai#33251 touches none of these files. ## Why objectstack-ai#32656 asks every `userMessage` producer to compose in the request locale with the declared fallback. objectstack-ai#33276 did the save door's advisories and authoring-rule refusals; these are the remaining server producers that composed English only, or that read only the folded `locale`. ## Verification - `packaged-permission-set-lock.test.ts`: zh-CN, ja-JP (request wins over workspace), `tlh`→zh-TW workspace fallback, `tlh`/`tlh` = unstated = English; code/status/diagnostic identical in every language; the provenance-unknown refusal in de-DE. - `permission-denied-user-copy.test.ts`: de-DE request with zh-CN workspace ⇒ zh-CN sentence; ja-JP request wins; de-DE/de-DE ⇒ en. - `mutation-listeners.test.ts`: the gate receives the stated locales (empty entries dropped) and no key when none are stated. - `meta-save-user-text-locale.test.ts` (runtime, both `/meta` doors): the permission gate receives `['zh-CN','de']`, and `[]` with none. - Local: `@objectstack/plugin-security` full suite 6610 passed; metadata-protocol / runtime targeted tests green; typecheck clean; test-source alias gate clean. Clause-②: no Metadata-protocol: none ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [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: its generated artifacts are regenerated and committed. - [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. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #32606
Clause-②: no
Metadata-protocol: semantic
Skills-docs: none —
skills/**andcontent/docs/**teach a declared override served at the package it declares and a tenant's edit following an item that moved between an App's packages (#31593); neither teaches a row declared for one package served at another, so no taught sentence moves.维护者速读
.custom存了一行邮件模板fr-FR,声明覆盖模块 X(X 只发en-US),同一 App 的附加包 Z 发fr-FR。以前 Z 的精确地址、Z 的列表、发给 Z 的执行列表都把这行当成 Z 自己的条目给出(盖着 Z 的戳,校验 invalid);现在 Z 只给自己的fr-FR,这行只在 X 的地址给出。fr-FR就被当成已迁走;但 X 仍发这个名字,所以这行仍是 X 的。一行同时出现在两个包的地址上,违反专题红线 2。packages/metadata-protocol/src/suite-moved-overlay.ts(ShipsName两个粒度,前任所有者按名字问),然后protocol-overlay-merge.ts列表合并里名字粒度的取法。pnpm --filter @objectstack/objectql exec vitest run src/package-scoped-exact-qualifier.test.ts -t 32606,4 条全绿。What changes
The moved-edit rule (#31593,
suite-moved-overlay.ts) serves a row that declares, or is bound to, a former owner of an item at the package that ships the item now. It is meant to fire only when the former owner "no longer ships the name" (its own module header). Every caller built itsShipsNamereading at the member grain (shippedArtifactsOf(type, name, undefined, member); the list merge from the slot's own contributions), so for a bundle the former owner X, which shipsen-US, read as not shippingfr-FR, and a bundle addition Z that shipsfr-FRtook X's declared row as its own moved edit.ShipsNameis now two readings:item(the address's package ships the item at its member, as before) andname(the former owner ships any member of the name).isMovedOverrideRowOf/isMovedBaseRowOfaskships.item(base)andships.name(former).findServedOverlayRow(protocol-environment-rows.ts) andlistServedOverrides(protocol-served-overrides.ts) readshippedArtifactsOf(type, name)for the name; the list merge (mergePackageAwareOverlay) reads every slot of the name among its own base items, plus the caller'sshipsNamereading of the registry (protocol-meta-list-reads.ts), because a list scoped to Z draws its base items from Z alone.declared-row-not-moved-to-addition(ADR-0087) and two changesets.Moved answers (both registration orders; measured on
maine540baf first)?package=Z&member=fr-FRpair fr-FR(declared for X) stamped Z,_diagnostics.valid: falsezeta fr-FR, valid['pair fr-FR']['zeta fr-FR']['pair fr-FR']['zeta fr-FR']listServedOverrides({ packageId: Z })welcome:fr-FR[]getPackageScopedItem(Z, fr-FR)zeta fr-FR?package=A.custompair fr-FR?member=fr-FRRed lines
[#32606] CONTROL — X ships nothing of the name, both orders), and the runtimemeta-overlay-follows-suite.test.ts(flat → composed, composed → flat, still-shipping CONTROL) stays green.Tests
packages/objectql/src/package-scoped-exact-qualifier.test.ts, in the #32561 block that already holds this exact arrangement:[#32606] NARROWING — a row declared for X is never served at an addition Z that ships its locale(addition installed first / row stored first): Z's address, list, execution list and customizations read answer Z's own; X's address, lists and customizations read keep the row.[#32606] CONTROL — X ships nothing of the name: the row declaring X is the moved edit, served at Z(both orders, UNCHANGED).Ablations (source mutated,
@objectstack/metadata-protocolrebuilt, mutation seen indist/, restored and rebuilt after, tree clean):ships.name(former)→ships.item(former)in both predicatesshipsNamereading forcedfalseZ's list: expected [ 'pair fr-FR' ] to deeply equal [ 'zeta fr-FR' ]); both CONTROLs greenAcceptance notes
fr-FR,?package=Zand Z's lists serve the override, but the bare?member=fr-FRread still serveszeta fr-FR. That is the bare read's path (protocol-meta-item-face.ts), a different function; it follows in its own PR.listServedOverrideswas not named by the card; it reads the same candidates, so the same row was listed under Z. Fixed and pinned here.Verification
Local, on head
520a7445(fix commits2b2e5b41+520a7445):pnpm --filter @objectstack/metadata-protocol test— 22843 passed, 43 skipped;typecheck0.pnpm --filter @objectstack/objectql test— 12940 passed (includes the four[#32606]pins, both hydration orders);typecheck0.pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-overlay-follows-suite.test.ts— 12 passed (the A tenant's edit of a packaged view stops applying when its item moves to another package of the same suite (composed upgrade, rollback) #31593 moved-edit rule is unchanged where the former owner ships nothing of the name).ships.name(former)→ships.item(former)) fails both NARROWING pins, CONTROLs green; A2 (the list'sshipsNameforced false) fails both onZ's list: expected ['pair fr-FR'] to deeply equal ['zeta fr-FR']. Both restored.node scripts/pm/dispatch-gates.mjs --commands— 89/89 derived gates exit 0 (8 re-run after a whole-treepnpm turbo run build), incl.check-adr-0087-registration.520a7445: 56 success, 11 skipped, 0 failed. The first head's Test Core 7/8 failure (migrate-meta-engine-guidance: the entry's printed reason cited a tracker id) is fixed by520a7445.@objectstack/dogfoodtest: running at the time of this edit; result follows in a comment.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn