Repository navigation
fix(plugin-email): a name an enabled and a disabled package hold sends what it sends when only the enabled one holds it - #33678
Conversation
…s what it sends when only the enabled one holds it With a holder of the name disabled, the send's address over the protocol's execution list is now chosen on the served count, as it is chosen on the holder count with nothing disabled: one served holder reads the environment-wide list, which since the list doors withhold a disabled holder's side holds none of its members. The registry's own list keeps the per-holder address, since it withholds neither. The environment-item branch of servedBundleAddressOf (unreachable while a holder is disabled) now answers no template, so no read is made beside a disabled holder for it. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cx5ZPCyTk8ckTsx4ut
📓 Docs Drift Check3 anchor(s) derived from 1 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 — 7 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 6ddfa252c563e720e2f2e41f15ec371746ea1003 && git checkout 6ddfa252c563e720e2f2e41f15ec371746ea1003
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d4e3dcc6e4c46d6b14ba832a838e4dab3cdec33e 9754555cc8cc8bfe01b56cc2155f25e8aa5795d5 && git checkout -B drift-repro d4e3dcc6e4c46d6b14ba832a838e4dab3cdec33e && git merge --no-ff 9754555cc8cc8bfe01b56cc2155f25e8aa5795d5
node scripts/docs-audit/affected-docs.mjs --json d4e3dcc6e4c46d6b14ba832a838e4dab3cdec33e |
|
domain:server#5 · os-elon-musk · session_016WV4cx5ZPCyTk8ckTsx4ut Part of #32670. Item ③ of review 6882047833 on #33361 (the separate, declared move owed once #32354 landed; it landed in #33405) plus #33361 nit N1. Only |
|
Contract-review-claim: session_016WV4czb1FQB8j27FVgnMye · head 9754555 · 2026-11-15T06:06:36Z review#3. |
Contract reviewServed-tier: The PR's file list is ① Derived judgments
② Semver levelClause-② ruling:
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
domain:server#5 · os-elon-musk · session_016WV4cx5ZPCyTk8ckTsx4ut
|
Requested by Elon · project thread
Part of #32670
Clause-②: no
Metadata-protocol: none
The card stays open: its
_envhalf is #33385 (area E1, still open). This PR is the "separate, declared move" that #33361's acceptance notes and its contract review (record 6882047833, item ③) left owed once #32354 landed. #32354 landed in #33405 (merged 2026-11-14T22:08Z, before #33361).维护者速读
servedBundleAddressOf中不可达的环境项分支改为"找不到模板"(复审 nit N1)。packages/plugins/plugin-email/src/template-loader.ts的servedBundleAddressOf(onServedCount与servedCountDecides参数)以及readBundle中viaProtocol的传入;template-loader.test.ts中two holders, BETA disabled一例的期望与新的one holderCONTROL。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):undefined), two or more ⇒ the answering holder's own address, exactly asbundleAddressOfchooses 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 anauth.*name).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).readBundlepassesviaProtocolintobundleAddressOfasservedCountDecides.resolved.holder.kindother thanpackage) now answersNO_BUNDLEinstead 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.bundleAddressOfandservedBundleAddressOfrestate the rule. Changeset:@objectstack/plugin-emailpatch.Moved answers
Probe: the #33361 world (a real
SchemaRegistryand the protocol's realgetMetaItemsForExecutionover stored rows), 8 disabled states × 2 registration orders × 2 reads × 9 callers × 2 locales = 1,152 answers, onbabd5d4a(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).PAIR fr-FR)ADDER fr-FR)ADDER fr-FR12 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 #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, describea disabled package holds no name at the send (ADR-0150 D3, #32670):two holders, BETA disabledcase's protocol expectations move fr-FR fromPAIR fr-FRtoADDER fr-FRfor the six callers above (its registry-read override is unchanged:no template).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 onmain).Acceptance notes
no template(ALPHA's own address, which the registry list narrows by_packageId), where ABSENT answersADDER fr-FR. The move cannot be applied there becauseregistry.listItemsstill 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.main's answer for a name one package holds with nothing disabled (the new CONTROL, both orders, and 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's R4-F note), not a rule this PR adds: the move only makes the disabled case equal to it._envcell of 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 row 17 (ADR-0150: the _env qualifier admits a name held only by disabled packages (404, not 409) on the item face (#32183 row 17, R4-B2) #33385, area E1,packages/metadata-protocol/src/**) and the R4-G flow doors, as 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 recorded. SoPart of #32670, not a closing line.Verification
Read at
7612a59d(the change). The head9754555cadds one merge oforigin/main(dd291b83era, no conflict); the incoming commits touch no file ofplugin-emailand nothing in the list reads or the package-scoped resolver the loader calls (they changeobjectqlengine-update, search and validation files andmetadata-protocol's seed loader and registry question), so the readings below are not re-run on the merge; CI reads the head.Tests, typecheck and lint (plugin-email), at 7612a59
Ablation 1: the pins against main's loader (template-loader.ts restored from babd5d4)
Ablation 2: the move forced onto the registry read (servedCountDecides passed as true)
Gate families
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat 7612a59 (64 commands), each run locally with its exit code captured before any pipe:Generated by Claude Code
🤖 Generated with Claude Code