Skip to content

fix(plugin-email)!: the email template send judges the served holders, so a disabled package holds no name at the send (ADR-0150 D3) - #33361

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-E2-32670
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-E2-32670

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread
Part of #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 完全相同。
  • 为什么改:objectql + metadata-protocol + runtime: by-name doors judge a name's holders over the served list, so a disabled package neither refuses nor is named (ADR-0150 D3; #32101 F4 class) #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 落地须等 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。

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 #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 #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, #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

Verification

All at 4419624c1a unless named.

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

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.
Ablations (each through `scripts/ablation-replace.mjs`, restored to the HEAD blob)
  • 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.
Tests and gates
  • 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.

Generated by Claude Code

When a holder of a template name is disabled, the send resolves the name
over the served holders, so a disabled package is never the answer and a
refusal names only the packages that serve the name. The answer is only
ever an address whose list holds no member of a disabled holder's side:
the resolved served holder's own address, the environment-wide list for
the environment's own item, or no template when the caller's own holding
is the disabled one or no served holder answers it. With no holder
disabled, every read is the one it was.

Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw
Co-authored-by: Claude <noreply@anthropic.com>
…r a real stored pair row

Replaces the parity pin (a disabled holder still counted at the send) with
the declared answers: two holders with each set disabled, a dependent's
addition enabled and disabled, one holder beside the environment's item
(registered first or last) or a package-less stored row, and an auth name
one package overrides, every caller class, en-US and fr-FR, both reads and
both registration orders, over the protocol's execution list with a real
stored customization-pair row. CONTROLs: nothing disabled; one holder.

Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw
Co-authored-by: Claude <noreply@anthropic.com>
… the closure re-resolve

The first check repeated what the re-resolve answers: a send resolved to
the built-ins is resolved again over the served holders and read at the
built-ins' own address. Ablating it moved no answer of the pins or of the
probe matrix.

Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw
Co-authored-by: Claude <noreply@anthropic.com>
…ocol to source, and answer the ADR-0087 question

The engine double the send pins read stored rows through opens findOne with
assertEngineFindOnePredicate, and the pinned ledger records it. The protocol
the pins read through resolves to this checkout's source. The changeset says
why no ADR-0087 entry is owed: every moved answer follows a package's
enabled state.

Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

6 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/plugins/plugin-email/vitest.config.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/plugins/plugin-email/vitest.config.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 7 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e3f0cfd422d69100448ccd4f6a329c90a25715f7 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 04d65c18570b5d951f535bc4b833a2c0f7690528 — the merge of head 019a4f028dfde8b27a1fe504404b492bbb5cf29f into base e3f0cfd422d69100448ccd4f6a329c90a25715f7, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 04d65c18570b5d951f535bc4b833a2c0f7690528 && git checkout 04d65c18570b5d951f535bc4b833a2c0f7690528
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e3f0cfd422d69100448ccd4f6a329c90a25715f7 019a4f028dfde8b27a1fe504404b492bbb5cf29f && git checkout -B drift-repro e3f0cfd422d69100448ccd4f6a329c90a25715f7 && git merge --no-ff 019a4f028dfde8b27a1fe504404b492bbb5cf29f

node scripts/docs-audit/affected-docs.mjs --json e3f0cfd422d69100448ccd4f6a329c90a25715f7

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
Request: review · area E2 · head 4419624

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract-review-claim: session_016WV4d1PGptBW3QRQNmy5e6 · head 4419624 · 2026-11-14T18:12:36Z

review#3.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 4419624c1a5eab1741ba6f47502180d001bd6b93
Local-runs: none
Scope: packages/plugins/plugin-email/src/template-loader.ts, .changeset/32670-email-send-served-holders.md + packages/plugins/plugin-email/src/template-loader.test.ts, packages/plugins/plugin-email/vitest.config.ts, packages/plugins/plugin-email/package.json, scripts/engine-double-contract.pinned.json, docs/adr/0150 (D3, D4)

① Derived judgments

  • The nothing-disabled path is main's. bundleAddressOf computes holders (all, built-ins filtered) and served (without includeDisabledPackages), and branches only when served.length < holders.length. Otherwise the code is main's: the old inline shared registry is now withoutCallerHolding(scoped, { includeDisabledPackages: true }), the same object. The probe reports 0 of 31,104 answers moved with nothing disabled. That satisfies the red line "one-holder behaviour unchanged" for every enabled composition.
  • servedBundleAddressOf. It resolves over the served holders only, so a refusal names only serving packages (rows 29–30) and a disabled package is never the answer:
    • resolved to a served package: that package's own address, the same list main already used for a two-holder name;
    • resolved to a package that is not served: only reachable when the caller's own holding is the disabled one, and it answers NO_BUNDLE (row 36);
    • not resolved: NO_BUNDLE (rows 31, 37);
    • an addition-only caller, or the built-ins: re-resolved from the caller's closure over the served holders, and read only at the built-ins' address or a served holder's address (rows 29, 38).
      Every answer that can carry a member is a package-own or built-ins address. The environment-wide list is never read while a disabled holder exists, except on the environment-item branch.
  • Choosing the address rather than filtering after the read is justified: the execution list's _packageId is the slot an item fills, not where it is stored. A post-read filter on it would either leak a pair row or drop a dependent's locale. This is the only way to meet the member rule of 6819947096 until 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 lands. Measured: out-of-rule sends drop from 1,127 to 107, none new, and all 107 are the unmoved R4-F nothing-disabled shape.
  • nit N1: the environment-item branch (resolved.holder.kind !== 'package' → undefined, the environment-wide read) is unreachable in the matrix, because the registry answers no environment item for a name any package holds. If it ever became reachable, it is the one branch that would read the environment-wide list beside a disabled holder. NO_BUNDLE there would make "no disabled side member is ever read" hold by construction instead of by reachability. This is optional, since the author keeps main's answer deliberately.
  • Pins. 11 cases × 2 orders × 2 reads (protocol real list and registry list) × 9 callers × 2 locales. Built on a real SchemaRegistry and the real getMetaItemsForExecution over stored rows, with no double over listItems; the findOne double is pinned in the engine-double ledger (+1 row). Each ablation (A1, A2, A4, A5, A6) turns its rows red, and A3 was measured as dead code and deleted.

② Semver level

@objectstack/plugin-email: patch, fix(plugin-email)!, Clause-②: yes (narrowing) with the widening rows in prose, a BREAKING paragraph, and one adr-0087: not-required (no-migration-prescription) marker. Correct for a non-protocol narrowing (AGENTS.md). Metadata-protocol: none and Skills-docs: none — reason hold.

③ Boundary flags

④ Design judgment

Row 37, as asked: accepted as declared (no template). Under ADR-0150 D4, an environment item or package-less row for a name a package holds is that package's customization. The registry already answers it that way (getEnvironmentScopedItem is undefined for a held name, and the execution list stamps the item with the holder's slot). A dependent's addition and the pair row also belong to the holder's side. When the only holder is disabled, its whole side, customization included, holds no name at the send (D3 as ruled on #32183). Serving the environment's item there would treat a customization as an independent environment item, which would loosen resolution and depend on the disable state in a way D4 does not provide. Withholding it is reversible: re-enabling the package restores the same answer. This is a judgment on a declared row, not a new seat ruling. If the seat wants the opposite answer, that would be a behaviour-changing ADR interpretation and needs its Fable pass.

The rest holds: judging the send over the served holders completes D3 at the last door #32183 left at main (R4-A). Choosing the address over filtering is forced by what the execution list carries, and it keeps the member rule.

Implemented-by: claude/area-E2-32670
Reviewed-by: session_016WV4d1PGptBW3QRQNmy5e6

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
ACCEPT · area E2 (area-lease pilot #33059) · Part of #32670 · head 019a4f0

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 00:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 9951f46 Nov 15, 2026
68 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-E2-32670 branch November 15, 2026 04:13
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…s what it sends when only the enabled one holds it (objectstack-ai#33678)

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

Part of objectstack-ai#32670

Clause-②: no
Metadata-protocol: none

The card stays open: its `_env` half is objectstack-ai#33385 (area E1, still open).
This PR is the "separate, declared move" that objectstack-ai#33361's acceptance notes
and its contract review (record 6882047833, item ③) left owed once
objectstack-ai#32354 landed. objectstack-ai#32354 landed in objectstack-ai#33405 (merged 2026-11-14T22:08Z, before
objectstack-ai#33361).

## 维护者速读

-
改了什么:邮件模板名有一个持有包被停用、只剩一个在服务的持有包时,发送(经元数据协议的执行列表)改为读环境级列表,与"只有这一个包持有该名"时完全一致;另把
`servedBundleAddressOf` 中不可达的环境项分支改为"找不到模板"(复审 nit N1)。
- 为什么改:ADR-0150
D3「停用的包不持有任何名字」。objectstack-ai#32354(objectstack-ai#33405)落地后,环境级列表已不再列出停用包一侧的成员(自身项、定制对行、依赖包追加的语言),所以地址可以只按在服务持有包数量来选;此前读该包自己的地址,会漏掉依赖它的包追加的语言。
-
风险与回滚:只在有持有包被停用、且只剩一个在服务持有包时生效。实测唯一变化:该持有包的定制对行与依赖包追加语言落在同一语言时,答案从定制对行变为依赖包的语言,与停用包根本不持有该名时的答案相同。没有包停用时、或无协议只读注册表时,答案不变。回滚即
revert 本 PR。
- 先看:`packages/plugins/plugin-email/src/template-loader.ts` 的
`servedBundleAddressOf`(`onServedCount` 与 `servedCountDecides` 参数)以及
`readBundle` 中 `viaProtocol` 的传入;`template-loader.test.ts` 中 `two
holders, BETA disabled` 一例的期望与新的 `one holder` CONTROL。
- 两分钟验证:`pnpm --filter @objectstack/plugin-email exec vitest run
src/template-loader.test.ts`,预期 80 个测试全部通过。
- 需要你做的:无,席位落地

## What changes

`packages/plugins/plugin-email/src/template-loader.ts`,
`servedBundleAddressOf` (the branch taken only while a holder of the
name is disabled):

- **The address is chosen on the served count when the bundle is read
from the protocol's execution list.** One served holder ⇒ the
environment-wide list (`undefined`), two or more ⇒ the answering
holder's own address, exactly as `bundleAddressOf` chooses on the holder
count when nothing is disabled. This applies to both answers that read a
package's bundle: the name resolving to a served holder, and the closure
re-resolve (a caller holding an addition only, or the built-ins for an
`auth.*` name).
- **Why it is safe now:** since objectstack-ai#33405 (objectstack-ai#32354) the environment-wide
execution list holds no member of a disabled holder's side: its own
items were already filtered, and the list naming no package now
withholds its customization pair's rows and a dependent's added bundle
members. So the read beside a disabled holder answers what it answers
when that holder holds nothing of the name.
- **The registry's own list keeps the per-holder address.**
`registry.listItems` (read only when no protocol is registered)
withholds neither, so there the move would leak a dependent's addition
to the disabled holder (measured, see the second ablation). `readBundle`
passes `viaProtocol` into `bundleAddressOf` as `servedCountDecides`.
- **Nit N1:** the environment-item branch (`resolved.holder.kind` other
than `package`) now answers `NO_BUNDLE` instead of the environment-wide
read. It is unreachable while a holder is disabled (a name a package
holds resolves to no environment item), so no answer moves; "no read is
made beside a disabled holder for it" now holds by construction.
- Doc comments on `bundleAddressOf` and `servedBundleAddressOf` restate
the rule. Changeset: `@objectstack/plugin-email` patch.

### Moved answers

Probe: the objectstack-ai#33361 world (a real `SchemaRegistry` and the protocol's real
`getMetaItemsForExecution` over stored rows), 8 disabled states × 2
registration orders × 2 reads × 9 callers × 2 locales = 1,152 answers,
on `babd5d4a` (FROM, `main`) and on this branch (TO), plus the same
worlds with the disabled package's side removed instead of disabled
(ABSENT: it ships nothing of the name; for ALPHA also no pair row and no
dependent's addition).

| Read | State | Caller | Locale | FROM | TO | ABSENT |
|:--|:--|:--|:--|:--|:--|:--|
| protocol | two holders, BETA disabled (ALPHA carries a pair row and a
dependent's addition, both fr-FR) | omitted, null, ALPHA, BOTH,
VIA_ALPHA, ADDER | fr-FR | the pair's row (`PAIR fr-FR`) | the
dependent's addition (`ADDER fr-FR`) | `ADDER fr-FR` |

12 answers move (6 callers × 2 orders), all toward the ABSENT answer; 0
of the 1,152 move away from it. The answers that still differ from
ABSENT number 204 (216 on FROM), and every one is a declared row of
objectstack-ai#33361: the disabled package's own send (row 36), the environment's item
or a package-less stored row beside a name only a disabled package holds
(row 37), and the registry-only read (below). With nothing disabled the
code path is unchanged (`bundleAddressOf`'s first branch), and the
pinned CONTROLs hold.

## Tests

`packages/plugins/plugin-email/src/template-loader.test.ts`, describe `a
disabled package holds no name at the send (ADR-0150 D3, objectstack-ai#32670)`:

- The `two holders, BETA disabled` case's protocol expectations move
fr-FR from `PAIR fr-FR` to `ADDER fr-FR` for the six callers above (its
registry-read override is unchanged: `no template`).
- A new CONTROL, state `one holder` (ALPHA alone holds the name, nothing
disabled), pins the answers the BETA-disabled case must equal for every
caller but BETA itself. 1 case × 2 orders × 2 reads = 4 new tests; the
file runs 80 (76 on `main`).

## Acceptance notes

- **The registry-only read keeps a disabled-vs-absent difference.** With
no protocol registered and BETA disabled, a fr-FR send for ALPHA's
callers answers `no template` (ALPHA's own address, which the registry
list narrows by `_packageId`), where ABSENT answers `ADDER fr-FR`. The
move cannot be applied there because `registry.listItems` still lists a
dependent's addition to a disabled holder (ablation 2 measures the
leak). A host with no protocol has no metadata door; noted, not filed.
- **The moved answer prefers the dependent's addition over the holder's
pair row at the same locale.** That is `main`'s answer for a name one
package holds with nothing disabled (the new CONTROL, both orders, and
objectstack-ai#33361's R4-F note), not a rule this PR adds: the move only makes the
disabled case equal to it.
- **Not in this PR:** the `_env` cell of objectstack-ai#32183 row 17 (objectstack-ai#33385, area E1,
`packages/metadata-protocol/src/**`) and the R4-G flow doors, as objectstack-ai#33361
recorded. So `Part of objectstack-ai#32670`, not a closing line.
- The probe files were temporary and are not committed.

## Verification

Read at `7612a59d` (the change). The head `9754555c` adds one merge of
`origin/main` (`dd291b83` era, no conflict); the incoming commits touch
no file of `plugin-email` and nothing in the list reads or the
package-scoped resolver the loader calls (they change `objectql`
engine-update, search and validation files and `metadata-protocol`'s
seed loader and registry question), so the readings below are not re-run
on the merge; CI reads the head.

<details><summary>Tests, typecheck and lint (plugin-email), at
7612a59</summary>

```
pnpm --filter @objectstack/plugin-email test       Test Files 53 passed (53) · Tests 1018 passed (1018)
pnpm --filter @objectstack/plugin-email typecheck  exit 0 · check:test-typecheck OK (0 errors)
pnpm exec eslint (the two changed source files)    exit 0
os-verify-lock: VERDICT command-exit 0
```
</details>

<details><summary>Ablation 1: the pins against main's loader
(template-loader.ts restored from babd5d4)</summary>

```
on-disk mutation: servedCountDecides count=0 (HEAD has 6)
× read: protocol > registered as listed > two holders, BETA disabled
× read: protocol > registered reversed  > two holders, BETA disabled
Tests 2 failed | 78 passed (80)          VERDICT command-exit 1
restored: git checkout HEAD -- the file; blob hash equals HEAD's; git status clean
```
</details>

<details><summary>Ablation 2: the move forced onto the registry read
(servedCountDecides passed as true)</summary>

```
anchor before: 1 · after: 0 · injected: 1
× read: registry > two holders, ALPHA disabled            (both orders: ADDER fr-FR leaks)
× read: registry > two holders, BETA disabled             (both orders)
× read: registry > an auth name one package overrides, ALPHA disabled (both orders: ADDER fr-FR leaks)
Tests 6 failed | 74 passed (80)          VERDICT command-exit 1
restored: blob hash equals HEAD's; git status clean
```
</details>

<details><summary>Gate families</summary>

Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at 7612a59 (64 commands), each run locally
with its exit code captured before any pipe:

```
61 of 64 exit 0 (check-adr-0087-registration, check-changeset-no-major, check-empty-changeset,
  check-issue-citations, check:engine-double-contract, check:test-source-alias,
  check:registry-log-declared, check:cross-package-test-inputs, check:nul-bytes,
  check:published-files, check:type-check-coverage, the comment-mask corpus and the rest)
NOT MEASURED, 3 (prerequisites of this checkout, not readings of the diff; CI runs each):
  check-plugin-teardown-shape --self-test   exit 3: shallow clone, positive control commit unreachable
  check:dual-build-cjs-loads                exit 3: PREREQUISITE NOT MET, reads every package's dist/
  check:type-check-debt                     exit 3 under the 4096 MB heap cap; re-run uncapped, it
                                            began a whole-closure build under the shared lock, stopped (not read)
```
</details>

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

🤖 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
…ders, so a disabled holder's slot answers no bare name (ADR-0150 D3) (objectstack-ai#33646)

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

Clause-②: yes (narrowing) — widened: a bare flow or connector name an
enabled and a disabled package hold, read with no package or from a
caller whose closure holds both, is served the enabled holder's slot or
instance where it was refused naming both. Narrowed: the disabled
holder's own callers, a caller reaching the name only through it, its
address and its runs find no flow; refusals name only the packages that
serve the name. With no holder of the name disabled, every answer is
unchanged.
Metadata-protocol: none

## 维护者速读

- 改了什么:一个流程名(或连接器名)被两个包持有、其中一个包被停用时,`/automation`
的按名门(裸名、命名空间地址、`_env`)、连接器连接门、流程动作/端点、启动准入的记录读取走查、MCP
恢复门,以及引擎的裸入口(`execute` / `getFlow` /
`toggleFlow`)和运行中的子流程调用,改为只按"仍在服务的持有包"判断:剩一个就走它自己的槽位,剩两个以上 409
只点名在服务的包,一个不剩就是"没有该流程"。停用包自己的调用方拿不到流程,也绝不会被换成别的包的流程。
- 为什么改:座席裁决 6884403301(含 9 条修正)与 Q2 裁决 6888807772;此前这些门按 R4-G 保持 main
的答案(把停用包也算作持有者)。形状与邮件模板发送(objectstack-ai#33361)相同。
- 风险与回滚:收窄一侧:停用包自己的流程动作和子流程调用、只经停用包可达的闭包调用方、指向停用包的地址、停用包槽位里的运行(含 MCP
恢复),都不再拿到流程。持久坐标(槽位键、运行键、调度键、凭据作用域、子流程守卫的武装判定)仍按全部持有者判断,停用是可逆的,不移动任何键,无需迁移。定义写入(PUT/DELETE/克隆)在指向停用包、`_env`
或第三命名空间的地址上,409 只点名在服务的包,两个都停用时地址答
404;在服务包自己的地址上仍点名全部持有者。停用包的触发器仍会触发它的槽位(与 main 相同),延后到 objectstack-ai#33748。回滚即还原本 PR。
- 先看:`packages/services/service-automation/src/engine.ts` 的
`resolveFlowKey` /
`servedBareFlowKey`(引擎裸入口与子流程调用);`packages/runtime/src/flow-slot-view.ts`
的 `servedFlowResolution` 与 `absentFlowView`(修正
4:停用包自己的调用方);`packages/runtime/src/domains/automation-address.ts` 的
`bareNameAdmission` 与 `admitAutomationAddress`。
- 两分钟验证:`pnpm --filter @objectstack/runtime exec vitest run
src/flow-caller-package.test.ts
src/domains/automation-addressed-route.test.ts`,预期全部通过;其中 `[objectstack-ai#33386]` 两个
describe 按两种注册顺序逐行断言下表。
- 需要你做的:无,席位落地。

## What changes

A flow name two packages hold has one engine slot per holder (ADR-0150
D4/D9, objectstack-ai#31696), and a connector name one instance per holder (objectstack-ai#31699).
Every door that reads such a name now judges the **served** holders (a
disabled package holds no name, ADR-0150 D3), under seat ruling
6884403301 and its nine amendments, and the Q2 ruling 6888807772 for the
connector address:

- `packages/runtime/src/domains/automation-address.ts`:
`bareNameAdmission` (new) judges a bare by-name door. It answers the one
served holder's slot, or a 409 naming the served holders, or nothing
(the bare path, which answers its own 404). `admitAutomationAddress`
judges the qualifier over the served holders. The slot is still chosen
when the name is held by two or more packages over every holder, because
the slots are keyed that way (amendment 7). `bareNameRefusal` (over
every holder) is unchanged and still read by the MCP resume door to tell
a run row's slot.
- `packages/runtime/src/domains/automation.ts`: the admission arm serves
a bare name's single served holder from its slot (`flowSlotView`) or
instance (`ConnectorConnectionRequest.package`), the same way its
address is served. A bare flow name on an engine with no slot entries
keeps the bare service, whose bare entries judge the served holders
themselves.
- `packages/runtime/src/flow-slot-view.ts`: `flowServiceForCaller`,
`flowWalkReads` (`rootPackage`, `callee`) and `flowHolderForCaller`
judge a name two packages hold over the served holders. A caller whose
own holding is the disabled one gets no flow (`absentFlowView`, new),
never a closure holder's (amendment 4). `runSlotPackage` no longer
answers a key's own package when that package is not among the holders
the caller judges by (amendment 3). `endpointPackageOf` stays judged
over every holder: it names the package an endpoint belongs to, and the
flow is then resolved for that package.
- `packages/services/service-automation/src/engine.ts`: `resolveFlowKey`
judges a name two slots hold over the served holders (`servedCaller`).
One served holder gives its slot, two or more are refused naming them,
and none is `absent` (no flow). `execute`, `getFlow` and `toggleFlow`
read it (`servedBareFlowKey`, amendment 9). The removal and history
entries (`unregisterFlow`, `withdrawFlow`, `rollbackFlow`,
`getFlowVersionHistory`) keep `bareFlowKey`, over every holder. The
subflow guards' recorded arming verdicts (`flowCallKey`) ask `{ durable:
true }`, over every holder, as before.
- `packages/services/service-automation/src/plugin.ts`:
`flowNameResolver` takes `servedCaller`. A caller whose own holding
answers, inside a disabled package, gets `not-found`. Without that
option the resolver answers as before, so the activation ledger's
`stillHolds` still finds a disabled package's own flow.

### Clause-② table

CRM and HR each hold the flow `convert` (one engine slot each) and the
connector `mail` (one instance each). OPS depends on CRM, BOTH depends
on both, NONE on neither. Every row is pinned in both registration
orders, and with HR disabled too (symmetric). With nothing disabled,
every row answers as `main` does (the CONTROLs).

| Row | Door / caller | State | FROM (`main`) | TO | Arm | Ruling |
|:---|:---|:---|:---|:---|:---|:---|
| F1 | bare name, no package: `/automation/convert` read, trigger,
toggle, runs; `/automation/trigger/convert`; engine `execute` /
`getFlow` / `toggleFlow`; a flow action with no package | CRM disabled |
409 naming CRM and HR | HR's slot | widening | (2), am. 1, 9 |
| F2 | a caller whose closure holds both (BOTH's action, a subflow call
from BOTH's flow, the walk's callee) | CRM disabled | 409
`ambiguous-in-closure` naming both | HR's slot | widening | am. 5 |
| F3 | CRM's own caller (its flow action, a subflow call from CRM's
flow, the walk's callee) | CRM disabled | CRM's slot ran | no flow (not
found), never HR's | narrowing | am. 4 |
| F4 | a caller reaching the name only through CRM (OPS) | CRM disabled
| CRM's slot ran | 409 `outside-closure` naming HR | narrowing | am. 4,
6 |
| F5 | a caller reaching neither (NONE) | CRM disabled | 409 naming both
| 409 naming HR | names fewer | am. 6 |
| F6 | address naming CRM: `/automation/crm/convert/…`,
`/automation/trigger/crm/convert` | CRM disabled | CRM's slot | 409
`not-held-by-qualifier` naming HR | narrowing | am. 2 |
| F7 | address naming HR | CRM disabled | HR's slot | HR's slot | none |
am. 1 |
| F8 | `/automation/_env/convert/…`, a third namespace | CRM disabled |
409 naming both | 409 naming HR | names fewer | am. 6 |
| F9 | bare run door (`/automation/convert/runs/:runId[/…]`), a run
filed under CRM's slot key | CRM disabled | served from CRM's slot (the
run's own) | answered as a run nobody holds; no verb called | narrowing
| am. 3 |
| F10 | bare run door, a run of HR's slot; HR's address | CRM disabled |
served | served (HR's slot) | none | am. 3, 8 |
| F11 | MCP `resume_run` of a run filed under CRM's slot key, through
CRM's or HR's flow action | CRM disabled | CRM's own action resumed it |
refused (403), stays parked | narrowing | am. 3, 4 |
| F12 | start admission's walk: the started flow's package
(`rootPackage`) for the bare name | CRM disabled | `null` | HR |
widening (the slot that executes) | am. 8 |
| F13 | every caller, every door, the engine's bare entries | both
disabled | 409 naming both, or a slot ran | no flow; an address answers
404; the bare name and `_env` take the bare path, which answers not
found | narrowing | (1) |
| F14 | durable coordinates: slot keys (`flowSlotKey`), run keys,
`flowDispatchHolder`, the credential channel's `at()` / `isShared`, the
subflow guards' verdicts, `bareNameRefusal` | any | judged over every
holder | unchanged | none | am. 7 |
| F15 | definition writes (`PUT` / `DELETE /automation/:ns/convert`,
`POST …/convert/clone`) at an address naming CRM, at `_env`, at a third
namespace | CRM disabled | 409 naming CRM and HR | 409 naming HR | names
fewer | am. 2, 6 |
| F15b | the same writes at HR's address | CRM disabled | 409 naming CRM
and HR | unchanged | none | am. 7 |
| F15c | the same writes at CRM's or HR's address | both disabled | 409
naming both | 404 | narrowing | (1) |
| F16 | MCP `resume_run` of HR's parked run through a package-less flow
action, or through BOTH's (depends on CRM and HR) | CRM disabled |
refused (403) | resumed, once | widening | am. 1, 5 |
| C1 | `/automation/connectors/crm/mail/connection` (names the disabled
holder) | CRM disabled | the service answered 404 | 409
`not-held-by-qualifier` naming HR; the service is not asked | refusal
shape | Q2 (1) |
| C2 | `/automation/connectors/hr/mail/connection` (names the served
holder) | CRM disabled | HR's instance (`package: HR`) | unchanged |
none | Q2 (1), (2) |
| C3 | `/automation/connectors/mail/connection` (bare) | CRM disabled |
409 naming both | HR's instance (`package: HR`) | widening | Q2 (1) |
| C4 | `/automation/connectors/_env/mail/connection`, a third namespace
| CRM disabled | 409 naming both | 409 naming HR | names fewer | Q2 (1)
|
| C5 | every connector address; the bare name and `_env` | both disabled
| the slot (then the service's 404), or 409 naming both | an address
answers 404; the bare name and `_env` reach the service with no package
| narrowing | Q2 (1) |

**Q2 condition 2 (legacy package-less row).** C2 was checked against a
legacy connection row that names no package
(`connector-connection-door.test.ts`, the case "a package-less row a
second (disabled) holder makes no one package's"). Through the served
holder's package, the service answers that state with the same 409
("stored-references bind") as it answers the bare read, and the row
stays. The address names the served holder's slot before and after this
PR, so C2 does not move. The new case pins that answer, and it is the
answer C3 now hands the bare door in that state (before: the door's own
409 naming both). Condition 3: the service's address case for the
disabled holder (404) is kept as it is.

A name one package holds, or none, is judged as before (CONTROLs).
First-party count: no first-party composition ships a flow or connector
name two packages hold and disables one of them.

**Deferred:** amendment 3's trigger binding (a runtime-disabled holder's
trigger still fires its slot, as on main) → objectstack-ai#33748.

**No migration.** No schema key, stored row, slot key, run key or
dispatch key changes, so there is nothing to rewrite: the answers that
move follow a reversible package state. The changeset says the same in
visible text.

## Tests

- `packages/runtime/src/flow-caller-package.test.ts`: the R4-G parity
describe, whose premise this card reverses, is replaced by `the objectstack-ai#31696
flow doors judge the served holders (ADR-0150 D3, objectstack-ai#33386)`. It runs over
a real `SchemaRegistry` (`disablePackage`, the served filter), with an
engine double whose bare entries judge the served holders. Per
registration order it has a CONTROL with nothing disabled, CRM disabled
and HR disabled (each a full answer table over six callers, four
namespaces and `_env`: rows F1 to F8 and F12 to F14), both disabled
(F13), one disabled holder (CONTROL), and no holder (CONTROL).
- `packages/runtime/src/domains/automation-addressed-route.test.ts`:
`[objectstack-ai#33386] the by-name doors judge the served holders…`, through the real
`HttpDispatcher` over a real `SchemaRegistry`, in both orders. It covers
the flow rows F1, F6, F7 and F8, the definition writes F15 to F15c, and
the connector rows C1 to C5.
- `packages/runtime/src/domains/automation-run-doors-per-slot.test.ts`:
`[objectstack-ai#33386] the run doors while a holder is disabled` covers rows F9 and
F10 at all five run doors, with both disabled.
- `packages/runtime/src/mcp-resume-run.test.ts`: rows F11 and F16, and
the CONTROL (HR's run through HR's action).
-
`packages/services/service-automation/src/flow-slots-per-package.test.ts`:
the engine's R4-G parity describe is replaced by `[objectstack-ai#33386] a run of a
name two slots hold judges the served holders`. It runs on the real
engine and the real `flowNameResolver` over a real `SchemaRegistry`,
with a runtime disable (both slots armed) and a boot disable (one
armed), in both orders. It covers F1 to F5, the slot keys and dispatch
key unmoved (F14), and both disabled (`execute` / `getFlow` /
`toggleFlow`: not found).
-
`packages/services/service-automation/src/connector-connection-door.test.ts`:
the Q2 condition 2 case (above).
- Refusals are asserted by envelope (`code` `RESOURCE_CONFLICT`, status
409) and candidates.

## Acceptance notes

- **The definition writes (amendments 2, 6, 7).** `PUT` / `DELETE
/automation/:ns/:name` and the clone, at the served holder's own
address, keep their 409 naming every holder (F15b). At an address naming
the disabled holder, at `_env` or at a third namespace, the address
admission now refuses them 409 naming the served holder only (F15), and
with both holders disabled an address answers 404 (F15c). An earlier
draft of this note and of the changeset said every such write keeps its
409 naming every holder; that was wrong and is corrected. A bare
definition write (`PUT /automation/convert`) is refused by the metadata
store over its stored rows (`flowWriteRefusal`), which this PR does not
touch; it is not pinned here.
- **Deferred: amendment 3's trigger binding.** A runtime-disabled
holder's trigger still fires its own slot (the engine's `triggerRun`
executes the armed slot key with no served check), as on `main`; nothing
is substituted. Deferred by the seat to objectstack-ai#33748.
- **Not moved: the anonymous inbound hook** (`inboundHookSlot`,
`/automation/hooks/:name`). Its bare form for a name two slots hold
stays refused, and its log names every holder. The ruling's nine
amendments do not name it. It is an anonymous door whose refusal is
logged, not answered. A design question, raised in the report.
- **Not moved: `endpointPackageOf`.** An endpoint's own package is read
over every holder of its `api` name, and the endpoint's flow is then
resolved for that package (served, F3/F4). An `api` name two packages
hold, one disabled, still names no package there. Raised in the report.
- **Not moved: a name one package holds, disabled.** Read from the code,
not pinned here: the bare doors and the engine's bare entries still
serve the one disabled holder's flow (a not-shared name is outside R4-G;
its address already answers 404, pinned). Raised in the report as a
separate question.
- The subflow guards (`flowCallKey`: arming verdicts recorded at
registration) keep reading over every holder. A disable re-judges
nothing, so a served reading there would record a verdict the next
enable contradicts (AGENTS.md, startup registry reads).

## Verification

**At head `99fca269`** (review#3 should-fixes, on top of a merge of
`origin/main` at `9bb45bb9`). Since `4a3db01c` only tests and text
changed: `.changeset/33386-flow-doors-served-holders.md` (+6/-1),
`automation-addressed-route.test.ts` (+31/-2: one pin, F15 to F15c, and
a body argument for its call helper), `mcp-resume-run.test.ts` (+19:
F16). No source file changed, so the dependents and the dogfood battery
were not re-run.

- `pnpm --filter @objectstack/runtime test`: Test Files 603 passed
(603), Tests 10902 passed, 19 skipped (10921). VERDICT command-exit 0.
- `pnpm --filter @objectstack/service-automation test`: Test Files 282
passed (282), Tests 3977 passed (3977). VERDICT command-exit 0.
- `pnpm --filter @objectstack/service-automation --filter
@objectstack/runtime typecheck`: VERDICT command-exit 0 (both
`check:test-typecheck: OK`).
- `check-adr-0087-registration --base origin/main`,
`check-changeset-no-major`, `check-empty-changeset`,
`check-changeset-fixed`, `check-nul-bytes`, `eslint --no-inline-config`
on the two touched tests: each exit 0.

The readings below are at `4a3db01c` (after merging `origin/main` at
`dd291b83`), unless named.

**Status: done.** All nine amendments of ruling 6884403301 and the three
Q2 conditions are implemented and pinned, except amendment 3's trigger
binding, deferred to objectstack-ai#33748 (table rows above; amendment 9's engine bare
entries `execute` / `getFlow` / `toggleFlow` move in this PR). Not done:
see the last list.

<details><summary>Tests (lock VERDICT per step, every step exit
0)</summary>

- `pnpm --filter @objectstack/runtime test`: Test Files 603 passed
(603), Tests 10857 passed, 19 skipped (10876).
- `pnpm --filter @objectstack/service-automation test`: Test Files 282
passed (282), Tests 3977 passed (3977).
- `pnpm --filter @objectstack/service-automation --filter
@objectstack/runtime typecheck`: exit 0 (both `check:test-typecheck:
OK`).
- `src/mcp-resume-run.test.ts`: 45 passed.
- Direct dependents of runtime and service-automation, `test`: hono 258,
example-crm 51, connector-mcp 119, connector-openapi 111, connector-rest
57, connector-slack 10, plugin-dev 89, cloud-connection 1211,
trigger-record-change 122, trigger-schedule 256, client 812,
plugin-approvals 1652, example-todo 249, example-showcase 545,
http-conformance 292, verify 437: all passed. `@objectstack/cli` unit
layer: Test Files 421 passed (421), Tests 5979 passed (integration layer
declared to CI). `objectstack-blank`: NOT MEASURED, reason: not a
workspace project (the filter matches nothing).
- Full dogfood battery (owed by the narrowing arm), `pnpm --filter
@objectstack/dogfood test` at `4a3db01c`: Test Files 467 passed, 3
skipped (470); Tests 3958 passed, 42 skipped (4000).
- `eslint --no-inline-config` on the touched files: exit 0.

</details>

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

Run at `e4729b39` (pre-merge; the four source files are identical at the
head):

- A1, the engine's `resolveFlowKey` asks over every holder (`{
includeDisabledPackages: true }` for the run):
`flow-slots-per-package.test.ts` 10 of 51 red.
- A2, `admitAutomationAddress` judges a shared name over every holder:
runtime 3 files, 22 of 158 red.
- A3, `servedFlowResolution` without the disabled-own-caller branch
(amendment 4): 6 of 158 red.
- A4, the plugin resolver's `servedCaller` branch disabled:
`flow-slots-per-package.test.ts` 6 of 51 red.
- A5, `bareNameAdmission` reads the served resolution over every holder:
22 of 158 red.

</details>

<details><summary>Gates</summary>

- Derived local families (`dispatch-gates.mjs --commands`, 74 at
`4a3db01c`): 71 exit 0. `check-adr-0087-registration --base origin/main`
exit 0 (`not-required (no-migration-prescription)` read). `node
scripts/check-plugin-teardown-shape.mjs --self-test`: NOT MEASURED, exit
3 PREREQUISITE (the shallow clone cannot reach its pinned positive
control). `pnpm check:dual-build-cjs-loads`: NOT MEASURED, it reads
every package's `dist/`; CI runs it. `pnpm check:type-check-debt`: exit
0 at `e4729b39`; NOT MEASURED at `4a3db01c` (its closure build lost the
lock to the dogfood run, then the re-run was stopped at hand-over).
- The CI families: in progress at hand-over; the seat reads the PR's
check-runs.

</details>

### Not done

- `check:type-check-debt` re-run at the head (exit 0 at `e4729b39`; NOT
MEASURED since). The CI families at `99fca269`: the seat reads the PR's
check-runs.
- Amendment 3's trigger binding: deferred to objectstack-ai#33748 (see above).
- The PR body is still the draft's: this text is for the seat to post
(the dev does not PATCH a PR body).
- Raised for decision (not changed here): the anonymous inbound hook's
bare refusal, `endpointPackageOf` for an `api` name two packages hold,
and a one-holder disabled name at the bare doors (Acceptance notes).

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

https://claude.ai/code/session_016WV4cx5ZPCyTk8ckTsx4ut
<!-- signed: domain:server#5 · os-elon-musk ·
session_016WV4cx5ZPCyTk8ckTsx4ut -->

---------

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

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants