Repository navigation
feat(service-automation)!: two packages of two namespaces may each declare a connector of the same name (ADR-0150 child B, the narrowing) - #33431
Conversation
…clare a connector of the same name, and a flow, a pull and the connection door address one by package The connector, the last type of ADR-0150 child B, narrows its one-holder rule to the namespace: it joins the namespace-scoped type sets (core, objectql, metadata), the declared-connector reconcile materializes each package's instance under its package (the backstop is lifted), the engine resolves a bare name for every caller over the served holders, a pull resolves its connector from the mapping's package, and the namespace connection door connects the addressed package's instance. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
510a840 to
1530146
Compare
📓 Docs Drift CheckThis PR changes 7 package(s): 33 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 186 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 f797f5d07ebadc911000ee311aa3f80bcdab8ff9 && git checkout f797f5d07ebadc911000ee311aa3f80bcdab8ff9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin f068cde84d272d25c451003996f3752bd016001b 35a988b6bba31b9973c95fb5c2f0798fc213f3ec && git checkout -B drift-repro f068cde84d272d25c451003996f3752bd016001b && git merge --no-ff 35a988b6bba31b9973c95fb5c2f0798fc213f3ec
node scripts/docs-audit/affected-docs.mjs --json f068cde84d272d25c451003996f3752bd016001b
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review brief — #31699 narrowing PR (connector, last PR of ADR-0150 child B)Reviewer: an isolated agent with no part in writing the change. Read the code, not the author's summary, and judge it yourself. What to read
What to judge
OutputWrite the report to
Do not edit the worktree, push, or post anywhere. Running tests read-only is fine ( Generated by Claude Code |
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review r1 — #31699 narrowing PR (connector), commit 4a9d32b9Reviewer: isolated agent, no part in the change. Read: every hunk of 4a9d32b9, the changeset, the PR body draft, issue comments 6871869590, 6879929803, 6816295828, 6820178514, 6882996364, and the surrounding code the hunks depend on. Five claims below were measured with probe tests run from a scratch directory against the worktree's source (nothing in the worktree was written; Verdict: PASS-WITH-CHANGESRed lines 1 and 2 hold on every path I traced: I found no caller served or sent another package's instance, and no instance picked by order. Two defects block landing: one answer moves for a one-holder deployment without being declared (red line 3), and one bare-name key still mixes two packages' instances. Must-fixM1. The credential listing loses
|
|
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT Contract review, delta after r1 — #31699 narrowing PR (connector), head de90aedbScope: Verdict: PASSNo must-fix item remains, and the delta introduces none that I found. What was run
Per finding
Notes, none blocking
Clause-② judgement
delta-2 — head 510a840 (
|
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx 维护者速读 · PR #33431 @
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43644860217 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
… namespace rule The cold boot of two namespaces holding the four names logs no bare-name warning; a third namespace's package declaring the held connector name installs; the bare /meta/connector/NAME refuses the name naming every holder, each namespace address reads its own holder's declaration, and a co-owner of alpha's namespace is still refused by the bare-name rule. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract reviewServed-tier: The seat's own read of the part of this head that no record covers, ① Derived judgments
② Semver levelUnchanged. A test-only delta, with nothing published. ③ Boundary flagsNone new. One finding outside this PR is filed as #33507: ④ Design judgmentNo design moves. The card thread reports a full dogfood run at this head: 467 test files passed, 3 skipped; 3953 tests passed, 42 skipped. The check-runs on this head, which are the evidence: 58 success, 10 skipped, 0 failed, 0 in progress. Implemented-by: VERDICT: PASS |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Re-land · 2026-11-14T23:22Z · PR #33431 @
|
…ree installs (objectstack-ai#33772) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9Ubb5soSS5cRV6WrfiW2kCmgEp)_ Fixes objectstack-ai#33680 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:AI 家族 bare-name 测试里三条在 `it` 里装包的用例(无包工具行、CONTROL、第三命名空间),把行保存和 install-local 挪进嵌套 describe 的 beforeAll,读断言留在 it 里,断言逐字未改。 - 为什么改:每次 install-local 都会重同步整个 showcase(123 个对象 schema、33 条流程),装包占了用例的大部分耗时;在 merge queue 的分片负载下整条用例越过 vitest 默认 5 秒,两次把 PR 踢出队列(objectstack-ai#33451、objectstack-ai#33653)。 - 风险与回滚:只改测试文件,不改产品代码,不发布;回滚即 revert 本 PR。 - 先看:`packages/qa/dogfood/test/bare-name-one-holder-ai-family.dogfood.test.ts` 新的三个嵌套 describe(beforeAll 的 60 秒装包预算与其后的 it)。 - 两分钟验证:`cd packages/qa/dogfood && pnpm exec vitest run --reporter=verbose test/bare-name-one-holder-ai-family.dogfood.test.ts`,预期 28 个全绿,三条用例的 it 各在 0.5 秒内。 - 需要你做的:无,席位落地。 ## What changes Three pins in `packages/qa/dogfood/test/bare-name-one-holder-ai-family.dogfood.test.ts` move their setup out of the test clock: - The `[objectstack-ai#31985]` package-less tool row case becomes a nested `describe`. Its setup (two `PUT /meta/tool/NAME` saves, three `POST /marketplace/install-local` calls in the same two install orders) runs in that describe's `beforeAll` with a declared 60 s loading budget, like the file's own boot hook. Its reads become `it.each(['before the hydrator', 'after the hydrator'])`, run in declaration order; the assertions are byte-identical to the old loop body. - Folded in 9ebd6e3 (loose end R5): the `CONTROL — install-local ... fresh ... names` (epsilon) and `[objectstack-ai#31701, objectstack-ai#31985] ... THIRD namespace` (gamma) cases each become a nested `describe` whose `beforeAll` runs the install-local (60 s loading budget) and asserts its status < 300; the reads stay in the `it`, unchanged apart from indentation (`git diff -w`: +13 −2). Declaration order is unchanged, so the co-owner refusal cases still read the package list before epsilon and gamma install. No assertion, test clock of a behaviour read, or product file changes. ## Why Diagnosis (card objectstack-ai#33680, triage 6890622593): - Both victims fail the same test at line 381 with REASON `Error: Test timed out in 5000ms.`: 5139 ms in job 132667862849 (PR objectstack-ai#33451) and 5046 ms in job 132715484165 (PR objectstack-ai#33653). The dogfood config sets no `testTimeout`, so this is vitest's default 5 s. - The same test in 14 green merge_group runs of 2026-11-15 (43688903702 to 43695401645): 2220 to 4447 ms, median about 3.2 s. It sits at 45 to 90 % of its clock. - Measured locally on an idle box (instrumented copy, not committed): setup 2840 ms of the test, each install-local 828 to 1033 ms, the reads 164 ms and 147 ms. Each install logs `syncSchemas() ran`, `Schema sync complete {"synced":123}` and `Re-synced 33 flow(s) after metadata reload`. - The triage's `No driver available for object 'sys_session'` lead does not hold: 0 hits in victim 1, 1 hit in victim 2, and that line sits inside another worker's boot log while this file's stack was still up. - Sibling anchor objectstack-ai#33479 (flow family) has a different root: its root PR objectstack-ai#33431 fails four assertions, a semantic conflict, not a clock. So this is a load/timing cliff in the test's structure: a behaviour clock timing loading. Not a flake in the product, not a race, not a conflict between queued PRs. ## Tests - Red before the fix, reproduced: the file under 6 CPU-bound node loops on a 4-core box failed exactly like CI (`Test timed out in 5000ms`, 5630 ms). - Green after, same load, twice on 24c4208 and once on the merged head fad7b8d: 28/28; the two hydrator reads took 220 to 381 ms. - On 9ebd6e3: the file 28/28 idle and twice under 6 CPU hogs on 4 cores; the epsilon and gamma `it`s now take 131 to 320 ms (1030 and 1159 ms idle as single `it`s before). - `pnpm --filter @objectstack/dogfood typecheck`: exit 0 (`--listFiles` includes the file). - `pnpm lint`: exit 0. ## Acceptance notes - No ablation: the diff changes no tested behaviour, only where the setup's time is clocked. - The two sibling cases are folded in 9ebd6e3 (see What changes). - Not done here (one loose-ends card after landing): each install-local re-syncing the whole deployment (123 schemas, 33 flows) is a product cost worth its own measurement if the queue keeps hitting install-heavy files. - Full dogfood battery not run locally (no `!` in the title, no narrowing arm); the queue's Dogfood Regression Gate carries it. ## Verification <details><summary>Derived gates (dispatch-gates --commands)</summary> At 24c4208: 52 derived, 52 run, every one exit 0; `dispatch-gates --ran` reconciles 52/52 with 0 NOT-MEASURED. `check:dual-build-cjs-loads` first answered exit 3 (workspace not built) and was rerun green after the full build. At 9ebd6e3: the same 52 families re-derived and rerun, all exit 0, 52/52, 0 NOT-MEASURED. </details> ## 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_01QsR2jRabTH2KkTRU4d62Uq <!-- signed: domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ess holder after the connector narrowing (objectstack-ai#33931) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi94S8UtSyvzeRtdCRGMp5267)_ Fixes objectstack-ai#33860 domain:devx#2 · os-steve · session_01ADHkmPpXkFyZ2VKdbuPu3d Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:只改测试清单 `platform-core.json` 里 `platform-core.bare-name-one-holder-refusal` 这一项(rev 5 → 6)。「第二个持有者被 422 拒绝」和「冷启动告警」两条改为用一个不声明 namespace 的包来触发;「按 namespace 各持一份」那条加上 connector。 - 为什么改:connector 已按 namespace 收窄(objectstack-ai#33431),所有受管类型现在都按 namespace 持有,旧条目要驱动的「不在列表里的类型」已经不存在,QA 实跑两条判不了分。产品没错,过时的是清单。 - 风险与回滚:只改一份 QA 清单,不动产品、不发布。回滚即还原本 PR。 - 先看:`docs/qa/platform-checklist/areas/platform-core.json` 该项的 acceptance[0] 与 acceptance[3] 的 verify,以及 fixtures.requires 里新增的 qa_e 和改为无 namespace 的 com.qa.addr-d。 - 两分钟验证:`pnpm check:platform-checklist`,预期退出码 0。 - 需要你做的:无,席位落地。 ## What changes `docs/qa/platform-checklist/areas/platform-core.json`, item `platform-core.bare-name-one-holder-refusal` only, revision 5 → 6 with a history row: - **acceptance[1]** now lists connector with the webhook, the flow and the agent as held per namespace (connector since objectstack-ai#33431), and drops "connector alone at this revision". It keeps the instruction to re-read the complement before a run. - **acceptance[0]** is re-pointed, not retired. Two namespaces never clash any more, but a holder with no namespace still meets every holder (`bareNameHoldersMeet` over `namespacedHoldersMeet`). A new fixture package qa_e (`com.qa.addr-e`, no namespace, connector `qa_conn` only) is installed after qa_a and qa_b, and the clause expects 422 `PLUGIN_REGISTER_FAILED` naming `qa_conn`, `com.qa.addr-e` and both holders, with no rename (`bareNameRenameFor` has no prefix to suggest). The reason sentence in that message is objectstack-ai#33507's product copy and is marked as not scored here. - **acceptance[3]** is re-pointed, not retired. `sealBareNameHolders` still reports a pair that meets, so the cold-boot fixture's `com.qa.addr-d` drops its namespace. The fixture otherwise stays as written (the `composeStacks(..., { manifest: 'preserve' })` shape QA run objectstack-ai#33853 built and booted). The verify text says the warning names a rename only when the later-registered holder declares a namespace. - Title, `steps[1]` (the qa_b rebuild becomes the qa_e install), `negative[0]`, `negative[2]`, `variants` and `source` follow. Why the namespace-less shape and not a same-namespace co-owner: it needs no dependency or object prefix in the fixture, and it is the shape QA measured live (the card's com.qa.addr-e probe). ## Tests Readings at `origin/main` `895783a1`: - `packages/core/src/package-scoped-resolution.ts`: `BARE_NAME_ONE_HOLDER_TYPES` (lines 103-122) has 13 members, and every one is in `NAMESPACE_SCOPED_BARE_NAME_TYPES` (lines 160-178, `connector` last under `objectstack-ai#31699 PR 3`). The complement is empty. - A throwaway `ObjectKernel` probe, using the flow-family pin's boot harness (`packages/objectql/src/registry-bare-name-one-holder-flow-family.test.ts`) and **not committed**, run under the verify lock after building the objectql closure: <details><summary>4 probe cases, plus the flow-family file: 2 files, 94/94 passed, VERDICT command-exit 0</summary> ```text A cold boot: com.qa.addr-c (ns qa_c) then com.qa.addr-d (no ns), each connector qa_conn → one warning: "Bare-name conflict at boot: a second holder among the installed packages — package "com.qa.addr-d" declares the connector "qa_conn", already held by package "com.qa.addr-c". …" B CONTROL cold boot: qa_c and qa_d, two namespaces → no warning C cold boot: com.qa.addr-d (no ns) then com.qa.addr-c (ns qa_c) → one warning, with — rename it to "qa_c_qa_conn" in "com.qa.addr-c" D after the seal: qa_a (ns qa_a) 200, qa_b (ns qa_b) 200, qa_e (no ns) refused → code NAMESPACE_CONFLICT, status 422, "cannot register 2 names another holder already holds — … already held by package "com.qa.addr-a"; … already held by package "com.qa.addr-b". …" ``` </details> No ablation is owed: the diff is a checklist document (os-dev.md). ## Acceptance notes - `skip-changeset`: `docs/qa/**` ships in no package. - The CLI build, the install door and the boot log are not driven live by this edit; the readings above are at the registry and kernel layer. - The history row's `ref` is written `#PENDING-33860` in the first commit and replaced with this PR's number in a second commit that changes only that string. ## Verification On head `a4254c56` (merge base `origin/main` `895783a1`), `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derives 16 commands. Each exit code was captured before any pipe: <details><summary>16 derived, 16 run, all exit 0; --ran reconciliation exit 0</summary> ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:platform-checklist :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` `dispatch-gates --ran`: "16 run, 0 NOT-MEASURED (a DERIVED zero …)", exit 0. Also `node scripts/check-platform-checklist.mjs --changed-from origin/main` exit 0, and the control-byte scan found 0 hits. The ref-only follow-up commit is re-run in the card's report. </details> No package is touched, so no package build, test or typecheck is owed. Every other family belongs to CI. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (n/a) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (no lintable file touched) - [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. (publishes nothing: `skip-changeset`) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (n/a) - [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. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmPpXkFyZ2VKdbuPu3d)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmPpXkFyZ2VKdbuPu3d <!-- signed: domain:devx#2 · os-steve · session_01ADHkmPpXkFyZ2VKdbuPu3d --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…narrowed type (objectstack-ai#33902) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbTGhxJSYAmQXU7efVdNqrpw)_ Fixes objectstack-ai#33507 Part of objectstack-ai#33670 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:包重名被拒(安装时的 `Bare-name conflict` 与启动告警)给出的原因句,对已按命名空间收窄的类型改为说明新规则;另改 hook-binder 一段过时注释。 - 为什么改:原因句仍说「每个部署只能有一个同名项、按注册顺序选一个」,而 main 上 13 个受管类型都已收窄到命名空间,管理员读到的是一条不再成立的规则,不知道该改哪个名字。 - 风险与回滚:只改文案和注释,拒绝的判定、错误码 `NAMESPACE_CONFLICT` 与 422 状态都不变;回滚即撤销本 PR。 - 先看:`packages/objectql/src/bare-name-one-holder.ts` 的 `bareNameReason`;其次 `registry-bare-name-one-holder-ai-family.test.ts` 里模拟未收窄类型的新用例。 - 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/registry-bare-name-one-holder-flow-family.test.ts`,预期全绿,其中 flow 的原因句整句命中新文案。 - 需要你做的:无,席位落地。 ## What changes - **objectstack-ai#33507** `bareNameReason` (`packages/objectql/src/bare-name-one-holder.ts`) branches on `isNamespaceScopedBareNameType`. A narrowed type is told its rule: "A flow holds one name per namespace: a package of another namespace may ship the same name, but within one namespace, or beside a package that declares no namespace, a name has one holder, and a bare name two holders share is refused naming both." A type not yet narrowed keeps today's one-name-per-deployment sentence with its consumers' clause; a list carrying both gets one sentence per rule, narrowed first. The doors' refusal and the cold-boot warning (`registry.ts`, untouched) both read this one function. - Measured on origin/main 1e65a38: `NAMESPACE_SCOPED_BARE_NAME_TYPES` holds all 13 covered types (`BARE_NAME_ONE_HOLDER_TYPES`), connector included since PR objectstack-ai#33431. So no real type reaches the per-deployment sentence today; the branch is kept per the card's ruling and core's documented path (a type joining the covered list keeps one holder per deployment until its own narrowing lists it). - **objectstack-ai#33670 item 1** `packages/objectql/src/hook-binder.ts`: the function-bind comment no longer says the refusal "stays until the trailing backstop child (ADR-0150 D9) narrows it". It says what happens now: the rule is narrowed to the namespace, `claimBareNameFunctions` throws after the seal, the throw is not caught in the binder, and the runtime's `bindAppArtifactHandlers` catches it per owner group and logs at `error`, leaving that group's functions and hooks unbound. Comment only; no bind behaviour changes. Item 2 (`registry.ts` `bareNameColdBootWarning`) stays open on objectstack-ai#33670. - Changeset `.changeset/33507-bare-name-reason-namespace.md`, `@objectstack/objectql` patch. ## Tests - Three unit pins that quoted the old sentence moved to the new one (`registry-bare-name-one-holder-{ai,flow,request}-family.test.ts`, describe retitled "states the rule of the types it lists"). - Narrowed type: `bareNameReason(['flow'])` pinned as the whole sentence, plus `bareNameReason()` (every covered type) never says "one name per deployment" or "chosen by registration order". - Unnarrowed type: no covered type is unnarrowed on main, so the pin reads `tool` as not narrowed through `vi.doMock('@objectstack/core')` on a fresh module copy and pins the per-deployment sentence, and the two-sentence order for a mixed list. - No dogfood pin quotes the reason (they match only the `Bare-name conflict` prefix), so none moved. ## Update at 3036245 - Seat review, changeset item: `.changeset/33507-bare-name-reason-namespace.md` gains one sentence. For an email template, the reason also names, after "save the exceptions below", the two holdings that still meet whatever the namespaces: a platform-requested bare name (the `auth.*` mails) keeps one holder per deployment, and a dependent package's addition to its base's template is refused as before. The wording matches `bareNameReason`. No code change. `check-changeset-no-major`, `check-empty-changeset` (and its `--self-test`), `check:changeset-gate-self-tests`, `check:doc-authoring`, `check-adr-0087-registration` and `check:nul-bytes` each exit 0. ## Update at 8284267 Review-a (comment 6895373233) must-fix 1, route (a). The delta changes `packages/objectql/src/bare-name-one-holder.ts` and adds pins to `registry-bare-name-one-holder-flow-family.test.ts`. `registry.ts` is untouched. - Under a narrowed type, two holdings still meet across namespaces. One is a name the platform requests by its bare spelling (`PLATFORM_REQUESTED_BARE_NAMES_BY_TYPE`, as `bareNameHoldersMeet` asks it). The other is a bundle addition (`isBundleAdditionPair`, for a type keyed by an `ITEM_KEY_DISCRIMINATORS` entry). Today both apply to `email_template` only. - A new helper, `crossNamespaceExceptionClauses(type)`, reads the same tables. When a listed narrowed type has either exception, the narrowed sentence says "may ship the same name, save the exceptions below". It is followed by: "For an email template, whatever the namespaces: a name the platform requests by its bare spelling ("auth.password_reset", "auth.verify_email", "auth.magic_link", "auth.invitation", "auth.account_invitation", "auth.two_factor_otp", "auth.email_change_notice" and "auth.existing_account_sign_up") keeps one holder per deployment and a package that depends on the name's holder (which does not depend on it back) and ships the name only in locales the holder does not ship is refused as an addition to the holder's email template." A type with neither exception (the flow, for example) keeps the sentence unchanged. - Pins: the cross-namespace refusal of `auth.password_reset` asserts the qualified claim and the platform-requested clause. The bundle addition's package-door refusal asserts the qualified claim and the addition clause. - Ablations, each through `scripts/ablation-replace.mjs`, each "ok mutation landed", then "ok restored: blob == HEAD (e721889) and `git diff HEAD` is empty": - Platform-requested clause removed: 1 failed, 86 passed; the failure was `expected 'Bare-name conflict: package "com.acme…' to match /For an email template, whatever the n…/`. - Bundle-addition clause removed: 1 failed, 86 passed; the failure was `expected 'Bare-name conflict: package "com.acme…' to contain 'a package that depends on the name\'s…'`. - At 8284267: closure build exit 0; the four bare-name files plus `hook-binder.test.ts` gave Test Files 5 passed and Tests 366 passed; objectql typecheck exit 0; `pnpm lint` exit 0. Derived gates: 67 derived; the 65 run locally all exited 0. `check:type-check-debt` ran under the lock and exited 0. `check:dual-build-cjs-loads` was left to CI. - CI: the "TypeScript Type Check" red at f1706ea (run 43721033546) was the aggregator reading lane `typecheck-workspace` as `cancelled`. That lane logged "The operation was canceled." at 13:59:03Z, 13 s after the push of 8284267 started new runs (13:58:50Z). The cause was the cancel of a superseded run, not this diff. ## Acceptance notes - The card's "pin the sentence for one unnarrowed type" has no real subject on main (every covered type is narrowed); the pin is simulated, see above. - `CONSUMER_CLAUSE` is now read only by the per-deployment branch, so on main it is unreachable from a real type. Kept with the branch. - (Resolved at 8284267, see the update below.) The first version's "another namespace may ship the same name" was false for a platform-requested name and a bundle addition. ## Verification Readings on objectstack-ai/objectstack. Tests and typecheck re-run on the merged head `f1706ea92` (origin/main 45dee17 merged in); the gate sweep ran on `fe90b7362` (same diff before the merge, derivation identical on both), with the ratchet and changeset gates re-run on `f1706ea92`. <details><summary>objectql suite and typecheck</summary> - `pnpm --filter @objectstack/objectql test` (fe90b73): Test Files 596 passed (596), Tests 13138 passed (13138), exit 0. - `pnpm --filter @objectstack/objectql typecheck`: exit 0 on fe90b73 and on f1706ea. - f1706ea, the four bare-name files plus `hook-binder.test.ts`: Test Files 5 passed (5), Tests 366 passed (366). - Direct dependents: no package outside objectql quotes the reason (`git grep` over packages for the old and new phrases). Spot check `@objectstack/cloud-connection` `marketplace-install-local-bare-name-conflict.test.ts`: 11 passed. The other dependents' suites are left to CI's Test Core. </details> <details><summary>Ablation (the narrowed-type pin)</summary> `node scripts/ablation-replace.mjs` on `bare-name-one-holder.ts`, the two filter lines replaced by `narrowed = []` and `perDeployment = listed` (every type gets the old sentence back): "ok mutation landed: anchor 1 -> 0". Three family files: Tests 5 failed, 245 passed. One failure reads `expected 'A flow holds one name per deployment:…' to be 'A flow holds one name per namespace: …'`. Restore: "blob == HEAD (f94389a) and `git diff HEAD` is empty". A first ablation emptied both filters, so the function returned an empty string, not the old sentence. It also went red (5 failed), but it did not test the intended mutation, so it is not counted. </details> <details><summary>Gates</summary> - `dispatch-gates --ran`: 67 derived, 66 run, each with exit code 0, 0 NOT-MEASURED. 1 UNRUN: `pnpm check:dual-build-cjs-loads`, left to CI. - `pnpm lint`: exit 0. `node scripts/check-nul-bytes.mjs`: exit 0. - Re-run on f1706ea, each exit 0: durability-log-level, issue-citations, doc-authoring, test-source-alias, cross-package-test-inputs, type-check-coverage, changeset-no-major, adr-0087-registration, empty-changeset, nul-bytes, registry-log-declared. - Dogfood: no `!` in the title and no `(narrowing)` arm, so the full battery is not run. No dogfood pin quotes the reason. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5 <!-- signed: domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5 --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
domain:server#7 · os-tesla · session_01L9qibzKCovWpJoMZD6U3NT
Requested by Tesla · project thread
Fixes #31699
Clause-②: yes (narrowing)
Metadata-protocol: added
维护者速读
none,只有插件代码注册的连接器例外;拉取按映射所在的包解析连接器;带命名空间地址的连接门(/automation/connectors/:ns/:name/connection)连接该命名空间那个包的实例。GET /connectors加?package=。本 PR 用已有的命名空间地址代替第二种写法,GET /connectors不加过滤,每个描述符带packageId。认领修订 6882996364 事先说明了这一点。packages/services/service-automation/src/engine.ts(resolveConnectorInstanceFor)、src/plugin.ts(协调器的期望集合与judgedByPackage、connectionDoorSubject)、src/connector-pull.ts(第 2 步)、packages/runtime/src/domains/automation.ts(准入块)。What changes
connectorjoinsNAMESPACE_SCOPED_BARE_NAME_TYPES(core),PACKAGE_SCOPED_READ_TYPES(objectql) andPACKAGE_SLOTTED_STORE_TYPES(metadata). Every covered type has now narrowed.plugin.ts):refusedDeclaredConnectorNames, andrefusedConnectorNamesinconnector-package-scope.ts).connectorInstanceRefusal).desired, the materialized, degraded and credential-refusal maps, retry, dematerialize andgrantHandlesare keyed by instance (connectorInstanceKey:name, orPACKAGE/NAME).judgedByPackage, red line 1).(package, name): an unstamped artifact item is stamped with its manifest id at capture, so a reload of one package leaves the other package's instance of the name live. With no manifest id, or no package-scoped registry, it supersedes by name, as before.engine.ts,resolveConnectorInstanceFor):none.none, unless the name has a connector a plugin registers in code (packagenull, originplugin), which is served as before. That keeps a package's catalog descriptor plus a plugin's connector working.getConnectorDescriptorssetspackageId.connector-pull.ts): the mapping's connector is resolved from the mapping's holder package through the registry's optionalresolveConnectorInstanceFor, and its origin, degraded state, provider (materializedProviderOf), action andinputSchemaare read from that instance. New reasonconnector_name_refused(409).ConnectorConnectionRequest.package(spec, optional). The runtime admits a namespace address of a two-holder connector name to the addressed holder (admitAutomationAddressanswers a slot, as for a flow) and passes the package. The bare door keeps its 409.packageIdis the entry's stamp, as on main.content/docs/automation/connectors.mdxgains "Two packages, one connector name" and two failure-mode rows. The objectql, core and metadata module docs say the connector narrowed.Verification
connector-connection-door.test.ts(7): both instances materialize; the bare door 409 and the addressed begin, read and revoke per package, each with its own row and token; revoke one, the other keeps serving; an unowned entry under two holders refused; a duplicate within a package; the no-registry CONTROL; N6.flow-package-scoped-resolution.test.ts: the narrowingnonepin (FROM the fallback arm); the plugin catalog CONTROL; the disabled holder in both registration orders (A's caller never served B's or A's instance; a caller with no package served B; CONTROL both enabled) and a lone disabled holder; the null caller refused naming both; the no-registry CONTROL.connector-pull.test.ts(4) andconnector-pull-service-door.test.ts(1): each package's mapping pulls its own instance; the provider read per instance; holder with no instance isconnector_not_registered; an environment mapping over two holders is409 connector_name_refused.connector-materialization.test.ts: two holders of different namespaces both materialize (FROM the boot refused); a reload of one holder's artifact leaves the other's instance live; the credential listing reports each of two instances' states, and asys_metadataor__runtime__entry over a one-holder name reads the holder's state.connector-connection-door.test.ts(review round): a disabled holder at the bare door and at its own namespace address (404, nothing written), both orders; a revoked instance is held degraded; the unstamped entry's handle reads its fixed package.flow-package-scoped-resolution.test.ts(review round): a caller inside the disabled package reads its own instance (both orders, and alone); two catalog holders beside a plugin connector (each package served the plugin's, the null caller refused naming both).connector-pull.test.ts(review round): one of two holders disabled, the environment's mapping pulls through the served holder.connector-descriptor-audit.test.ts: a package's catalog entry is not silenced by another package's live instance of its name.automation-addressed-route.test.ts: each namespace address reads its own package's instance (FROM 409).marketplace-install-local-bare-name-conflict.test.ts: the refusal case is now a same-namespace co-owner; a cross-namespace connector install is admitted (FROM 422).scripts/ablation-replace.mjs, each restored with an emptygit diff HEAD), each red on its pins: the fallback arm back (3), the disabled branch off (1), the null caller not asking the resolver (8), no plugin instance (1), the unowned entry not refused (1), no registry judged (6), grant handles by name (5), the pull by bare name (4), the door ignoring the package (3), the provider by name (1), no connector slot at the runtime address (1); the reload merge by bare name (1, A12); the credential listing by stamp (1, A13); the inert audit by name (1, A14). Record:server-seat-7/r2026-11-14/31699-narrow-ablations.txt.df9fe946: service-automation 3941, runtime 12060 (19 skipped), core 3480, objectql 12976, metadata 2479, metadata-protocol 22848 (43 skipped), cloud-connection 1210, CLI stored-references 13. All passed. Rebased again on4ace1fa9over fix(metadata-protocol)!: history and rollback doors refuse a bare two-holder name and address one holder by ?package= #33193 (head1530146d): metadata 2490, metadata-protocol 22865 (43 skipped), service-automation 3941, runtime 12074 (19 skipped), spec 28422 (1 todo), speccheck:generatedgreen.tsc --noEmit(service-automation, runtime), ESLint on every changed file, tenant-audit, system-context, route-ledger and engine-double censuses, changeset no-major / empty / fixed, doc-authoring, doc-anchors, speccheck:generated(its test-typecheck leg needs a larger Node heap here:NODE_OPTIONS=--max-old-space-size=12288; then OK, no debt moved).dispatch-gates --ran: 124 derived families accounted for, 122 run green, 2 NOT-MEASURED for prerequisites this checkout lacks and the diff does not touch:check:dual-build-cjs-loads(nostudio/embedder-openaidist) and thecheck-plugin-teardown-shapeself-test (shallow clone).check:dts-closurewas red once in the sweep and green when re-run alone (311/311 declaration files present).Contract review
An isolated contract reviewer read the card, ADR-0150, the handoff and the diff with no anchor on mine.
4a9d32b9: PASS-WITH-CHANGES. Two must-fix items: M1, the credential listing lost an environment row's state; M2, a reload of one package's artifact tore down the other package's instance. Five should-fix items (S1 to S5) and four nits.de90aedb: PASS. Three notes; I acted on all three: no-registry reloads supersede by name as on main, a changeset clause, and a__runtime__pin.510a8400: PASS.e467615b, the rebase over fix(metadata-protocol)!: history and rollback doors refuse a bare two-holder name and address one holder by ?package= #33193: PASS.connectorjoinsPACKAGE_SLOTTED_METADATA_TYPES(@objectstack/spec), the one list the history and rollback doors and the metadata store read; the changeset says what moves on those doors.The brief, the r1 record and the delta record are posted as comments on this PR.
Human Minimum
packages/specholds no runtime logic. (Two optional members on TypeScript interfaces; no schema.)pnpm lintpasses on the changed files.main, one pull request.packages/spectouched:check:generatedis green for its artifacts.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzKCovWpJoMZD6U3NT