Skip to content

fix(plugin-email,service-settings): a sender with no From name goes out under the product name - #30548

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-6lyvuf
Nov 5, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-6lyvuf

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

domain:server#5 · os-bill · session_01Utp6CYVV6fcAQrNTDQRvPb

维护者速读

  • 改了什么:发件人名没设置时,邮件不再署名 ObjectStack,而是用产品名(Setup → 品牌 里设的产品名,没设就用部署名,再没有才是 ObjectStack);Setup → 邮件 的“发件人名称”去掉了默认值 ObjectStack。
  • 为什么改:管理员只填了发件地址,收件人看到发件人是 ObjectStack,而主题和正文写的是产品名,显得像别家发的信(卡 Setup small fixes: impersonation landing, account email lifetime, sender name, agent sets in pickers #30212 第 3 行)。
  • 风险与回滚:只影响“没设发件人名”的默认发件人;设过名字的照旧优先,调用方自带的发件人不改。回滚即 revert 本 PR。以前保存过的“ObjectStack”会被当作管理员显式设的名字继续生效,清空该栏即跟随产品名。
  • 先看:packages/plugins/plugin-email/src/email-plugin.ts(namedSender / applyDefaultSender 与 branding 绑定)、packages/services/service-settings/src/manifests/mail.manifest.ts、packages/plugins/plugin-email/src/email-plugin.mail-settings.test.ts 末尾新 describe。
  • 两分钟验证:pnpm --filter @objectstack/plugin-email exec vitest run src/email-plugin.mail-settings.test.ts,预期 34 条全过,其中“sender display name follows the product name”一组 10 条。
  • 需要你做的:无,席位落地。第 2 行(导入账号设密码链接 60 分钟)按席位裁定不在本 PR,留在卡上待决。

Part of #30212
Clause-②: no
Metadata-protocol: none — a server default changes (the sender's display name, and the Mail settings page's From name default); nothing a metadata author writes changes.
Skills-docs: none — git grep -n -i -E "from_name|mail\.from|from name|sender name|defaultFrom|resetPasswordTokenExpiresIn|set-password link|60 minutes" -- skills names no sentence about the mail sender or the link lifetime (its one hit is defaultFromRow in skills/objectstack-ui/rules/actions.md, an action-param key).

Row 3 of the card. Row 2 (the bulk-import set-password link lifetime) is not in this PR: the seat ruled it out after the measurement (a credential-setting link's lifetime, the security seat vacant), so the card stays open for it. Rows 1 and 4 landed earlier.

What changes

  • @objectstack/plugin-email. EmailServicePlugin names a default sender that has no display name of its own with the product name the auth mails' subject and body already read: the Setup → Branding product name (branding.workspace_name) when an administrator SET one, else the deployment's name (defaultTemplateContext.appName, which os serve resolves from OS_APP_NAME and the config chain), else ObjectStack. This is the chain plugin-auth binds to the auth mails' {{appName}}.
    • The Branding value is read on kernel:ready and again on every Branding save, so a rename reaches the next mail with no restart. A manifest default is not taken for a set value. The namespace is bound only where the settings service lists it; a walled posture withholds it, and the deployment's name applies there.
    • Which senders: the Setup → Mail sender saved with the From name empty, and a boot sender declared without a name (OS_EMAIL_FROM holding an address alone, or config.email.defaultFrom with address alone).
    • A From name somebody set always wins: a Mail settings From name whose source is not default, or a boot-declared name. A sender a send passes as input.from, and a template's own sender, are never renamed.
    • "Send test email" sends under the same name real mail goes out with.
    • The plugin keeps the declared sender apart from the live one, so a later Branding save renames only a sender that has no name. EmailService's public surface is unchanged: the plugin installs the named sender through the existing setDefaultFrom.
  • @objectstack/service-settings. mail.from_name drops its default: 'ObjectStack': an unsaved field reads empty, and the resolver answers value: null, source: 'default', as Branding's product name already does. The field gains help text in en, zh-CN, ja-JP and es-ES saying that an empty value uses the product name. The Branding manifest's header names plugin-email as a reader of workspace_name.

Tests

  • packages/plugins/plugin-email/src/email-plugin.mail-settings.test.ts, new top-level describe "sender display name follows the product name when none is set" in the existing harness (the harness's fake settings service now lists namespaces and serves a branding snapshot): Branding name set; Branding unset falls back to the deployment name; nothing configured gives ObjectStack; an explicit From name wins; a From name that is only a manifest default does not; a Branding save and a Branding clear take effect without a restart; a boot sender without a name is named; a caller's own from is untouched; no Branding read under a walled posture; the test mail carries the name.
  • packages/services/service-settings/src/manifests/mail.manifest.test.ts: from_name declares no default, stays optional, and carries the help text.

Acceptance notes

  • A From name stored before this change (for example ObjectStack, if a save sent the prefilled default) is an explicit value and keeps winning. Clearing the field makes the sender follow the product name.
  • The boot fallback sender that resolveEmailCapabilityArg builds when nothing declares one keeps its derived name (the deployment's name). Setup → Branding does not rename that one. It is the sender for a deployment with no From address configured anywhere.
  • Non-auth templates render {{appName}} from the boot-time template context (the deployment's name), not from Setup → Branding. This PR does not change that. Only the auth mails read the Branding product name today.

Verification

Head a2519c047, merged with origin/main fa9c0aa2a (up to date).

Tests and typecheck (both touched packages)
  • Red first on origin/main fa9c0aa2a: the new describe ran 8 failed / 1 passed (the passing one is the control: a caller's own from is untouched); for example "expected 'no-reply@acme.test' to be 'Acme Portal (no-reply@acme.test)'", angle brackets spelled as parentheses here.
  • pnpm --filter @objectstack/plugin-email test then typecheck under the verify lock: VERDICT command-exit 0; Test Files 48 passed (48), Tests 795 passed (795); check:test-typecheck OK.
  • pnpm --filter @objectstack/service-settings test then typecheck under the verify lock: VERDICT command-exit 0; Test Files 68 passed (68), Tests 1157 passed (1157).
  • pnpm exec eslint --no-inline-config on the 9 changed source files: exit 0. The repo-wide pnpm lint is left to CI (Lint & Repo Gates).
Ablation (once, through scripts/ablation-replace.mjs)
  • Anchor in email-plugin.ts namedSender: the line that keeps a sender's own name, replaced by an unconditional return sender; (marker ABLATED-30212). Mutation landed (anchor 1 to 0, blob b4930823f853 to 6572e816ed05).
  • vitest run src/email-plugin.mail-settings.test.ts: Tests 8 failed / 26 passed (the 7 naming pins plus the existing sys_email delivery pin that expects the named sender).
  • Restored: blob back to HEAD b4930823f853, git diff HEAD empty, marker count 0. The tests import src directly, so no dist rebuild is involved.
Derived gates (dispatch-gates --commands, reconciled with --ran)
  • 60 derived, 59 run with exit 0, 1 NOT MEASURED: pnpm check:dual-build-cjs-loads exit 3, PREREQUISITE NOT MET (it reads every package's built output; only this diff's closure is built here). Left to CI.
  • node scripts/check-plugin-teardown-shape.mjs --self-test exited 3 on the shallow clone (its pinned fixture commit was missing); after git fetch origin 621a487607881c66b2899b7e3477115229a156b4 it exited 0 (48 cases pass).
  • --ran verdict: "60 derived famil(ies) accounted for, 59 run, 1 NOT-MEASURED". Changed lines 366 (+344 / -22), under the 3000 threshold.

Generated by Claude Code

…out under the product name

WIP: implementation and pins; gates follow.

Claude-Session: https://claude.ai/code/session_01Utp6CbJtwiuT8bs47ARmYb
Co-authored-by: Claude <noreply@anthropic.com>
…g EmailService's surface unchanged

Claude-Session: https://claude.ai/code/session_01Utp6CbJtwiuT8bs47ARmYb
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the size/m label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-email, @objectstack/service-settings, touching 11 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/services/service-settings/src/manifests/branding.manifest.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/automation/email-templates.mdx (via EmailServicePlugin (symbol, a top-level class))
  • content/docs/kernel/services.mdx (via EmailServicePlugin (symbol, a top-level class))
What this run could not see
  • 1 changed file(s) yielded no anchor (packages/services/service-settings/src/manifests/branding.manifest.ts) — pages documenting those are invisible to this run
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 61 of 219 client-bound route-ledger rows — the other 158 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 158: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 103 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 — 14 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 c045c341329ddcd83abe4adf12428e100b7a700a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9abb0d49bba823ce1fbf94b7749c7074a1c5c356 — the merge of head a2519c047868b21653e0f91af041af35fcf3c846 into base c045c341329ddcd83abe4adf12428e100b7a700a, 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 9abb0d49bba823ce1fbf94b7749c7074a1c5c356 && git checkout 9abb0d49bba823ce1fbf94b7749c7074a1c5c356
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c045c341329ddcd83abe4adf12428e100b7a700a a2519c047868b21653e0f91af041af35fcf3c846 && git checkout -B drift-repro c045c341329ddcd83abe4adf12428e100b7a700a && git merge --no-ff a2519c047868b21653e0f91af041af35fcf3c846

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

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs c045c341329ddcd83abe4adf12428e100b7a700a → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added 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 5, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · os-bill · session_01Utp6CYVV6fcAQrNTDQRvPb

维护者速读

  • 改了什么:发件人名没设置时,邮件不再署名 ObjectStack,改用产品名。产品名优先取 Setup → 品牌 里设的值,没设就用部署名,两者都没有才回落到 ObjectStack。Setup → 邮件 的「发件人名称」也去掉了默认值 ObjectStack,并在帮助文字(四个语种)里说明留空会怎样。
  • 为什么改:管理员只填了发件地址时,收件人看到的发件人是 ObjectStack,而主题和正文写的是产品名,看上去像别家发来的信。
  • 风险与回滚:只影响没设发件人名的默认发件人。设过名字的仍优先,调用方自带的发件人和模板发件人都不改。以前保存过的「ObjectStack」会当作显式设的名字继续生效,清空这一栏后就跟随产品名。回滚只需撤掉本 PR。
  • 先看:packages/plugins/plugin-email/src/email-plugin.ts 里的 senderBrandName、namedSender 和 applyDefaultSender,以及它对 branding 的绑定;packages/services/service-settings/src/manifests/mail.manifest.ts。
  • 两分钟验证:运行 pnpm --filter @objectstack/plugin-email exec vitest run src/email-plugin.mail-settings.test.ts,预期 34 条全过。
  • 需要你做的:无,席位落地。第 2 行(导入账号的设密码链接只有 60 分钟)不在本 PR 里。它是安全边界上的取舍,落地时退回队列待决。

席位意见:同意落地,作为 #30212 的一部分。补名放在插件里,走现有的 setDefaultFrom,EmailService 的公开面没有变化。补名的顺序和认证邮件主题读的顺序一致。去掉 manifest 默认值的做法有 #25347 处理 workspace_name 的先例。

席位核对

Head a2519c047868b21653e0f91af041af35fcf3c846 · 2026-11-05T15:08Z

  • 形态: row 3 matches the Claim amendment. An unnamed default sender takes the name chain workspace_name (explicit) → deployment name → ObjectStack, and an explicit From name always wins. A caller's input.from is never renamed. The test mail shows the same name. A Branding save renames the next mail with no restart.
  • 前提实测: mail.manifest.ts:109 declared default: 'ObjectStack'. Auth mail reads workspace_name → OS_APP_NAME chain → ObjectStack (auth-plugin.ts:1281, auth-manager.ts:3721). There are 8 red-first tests, and one ablation.
  • 门禁 check-runs: in progress at this head. Auto-merge waits on the required checks. check-governed-merges.mjs --pr 30548 reports NOT governed (+344 / −22).
  • 接受的偏差: eslint was run on the 9 changed files rather than the whole repo (os-dev.md; CI runs the full lint). dual-build-cjs-loads was not measured locally and is left to CI.
  • 范围外去向 + Skills-docs:: row 2 goes back to the queue as a decision, with the measurement in server-seat5/measure-30212-row2.md. Skills-docs: none, with the grep.
  • 落地条款: Part of #30212, non-governed, Clause-②: no, landed by the seat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m 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.

1 participant