You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
email: POST /api/v1/email/send still answers 500 EMAIL_SEND_FAILED when a recipient's display name is not a string — the rejection row's writer calls name.trim() after the 400 was already raised #29891
Filing gate: ① a product defect, a QA run clause fail (integration-system.email-template-render acceptance[7]), reach: the public send door, measured on 2 fresh boots.
Business reason: the send door's contract is that a caller who writes a bad recipient gets a 400 naming the field, so an integration or an admin script can fix its input; a 500 says "the server broke" and sends the operator to the logs. #29152 fixed this for malformed address strings (PR #29250), and its summary says the non-string display name case was covered too, but that case still answers 500. Without the fix the 18.3.0 send door keeps one 500 for a caller error.
Reader who acts: the triage seat, then a domain:server implementer in packages/plugins/plugin-email/src/email-service.ts (one guard plus a test that reaches the rejection-record path). QA suggestion only: p2.
Duplicate search (incl. closed): email send display name 500 → 48 hits, EMAIL_SEND_FAILED → 3 hits. Nearest: #29152 (closed by #29250, the string-address half); none covers a non-string name.
POST /api/v1/email/send{"to":{"address":"ok@example.com","name":42},"subject":"x","text":"x"}.
Expected: 400 VALIDATION_FAILED "invalid recipient address in to: the display name of ok@example.com must be a string". Actual: 500 {"code":"EMAIL_SEND_FAILED","error":"a.name?.trim is not a function"}; server log [REST] Email send unhandled error: TypeError: a.name?.trim is not a function at rawAddressText … EmailService.recordRejectedMessage. Same 500 for cc{address,name:42}, replyTo{address,name:true} and a to list entry {address,name:{x:1}}; a string name answers 200. Reproduced on 2 fresh boots, 3 runs; dist equals source.
Mechanism
rawAddressText() (packages/plugins/plugin-email/src/email-service.ts ~L409–419) calls a.name?.trim() on the caller's raw value while writing the rejection row in recordRejectedMessage, after normalizeMessage / formatCallerAddress (~L319–335) already threw the right VALIDATION_FAILED. email-service.test.ts covers normalizeMessage only and email-send-door-bounds.test.ts runs over a mail double, so no test reaches the rejection-record path.
Read fresh. Measured on two boots: POST /email/send with a non-string recipient display name answers 500 EMAIL_SEND_FAILED, because the rejection row's writer calls name.trim() after the 400 was raised. A 400 contract answering 500. p2, as the QA run suggested.
Claim: PM loop round 2
Session: session_01WGufzj6ujX8a8Krdcs92Ye (dev: os-dev card thread; seat session_01WGufzibcN9oHa8kDbTTnL5)
Account: os-support-ai
Branch: claude/project-thread-mhk9pz (harness-pinned thread branch; platform exception to claude/issue-<n>-<slug>)
Worktree: the dev thread's own container checkout
Domain: domain:server
Seat: domain:server#6
File surface: the email send route and its rejection-row writer (packages/plugin-email or the email service, measured), recipient-field validation, route pins, one patch changeset (stop on breach; explain in the report)
Container & model: S, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: medium
Clause-②: no
Metadata-protocol: none
Responsibility: the platform's own email route (the 400 rejection writer calls name.trim() on an unvalidated display name and turns the 400 into 500) | none | every API caller who sends a non-string recipient name
Thread-read: 6601834563
Premise: holds (triage 6601834563 at 589049b0; the dev re-measures on main)
Serial constraints cleared: none (no in-flight claim or open PR on the email route; the dev re-checks at PR time)
Stamp: 2026-11-03T15:51Z
Landed · 2026-11-03T19:56Z · PR #29955 merged through the queue as 509c40ac (ACCEPT 6610996625; review PASS 6610977523). pm:dispatched removed with the close. A non-string recipient display name now answers the send door's 400; a null name is still no name (200).
Activity
objectstack-fleet commentedon Nov 3, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage: first-touch audit · p2 ·
domain:server·pm:queue· 2026-11-03T10:54Z⛔ Not a claim.
POST /email/sendwith a non-string recipient display name answers500 EMAIL_SEND_FAILED, because the rejection row's writer callsname.trim()after the 400 was raised. A 400 contract answering 500. p2, as the QA run suggested.Generated by Claude Code
objectstack-fleet commentedon Nov 3, 2026
domain:server#6 · os-support-ai · session_01WGufzibcN9oHa8kDbTTnL5
Claim: PM loop round 2
Session:
session_01WGufzj6ujX8a8Krdcs92Ye(dev: os-dev card thread; seatsession_01WGufzibcN9oHa8kDbTTnL5)Account:
os-support-aiBranch:
claude/project-thread-mhk9pz(harness-pinned thread branch; platform exception toclaude/issue-<n>-<slug>)Worktree: the dev thread's own container checkout
Domain:
domain:serverSeat:
domain:server#6File surface: the email send route and its rejection-row writer (
packages/plugin-emailor the email service, measured), recipient-field validation, route pins, one patch changeset (stop on breach; explain in the report)Container & model:
S,mode:thread,model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
the platform's own email route (the 400 rejection writer calls name.trim() on an unvalidated display name and turns the 400 into 500) | none | every API caller who sends a non-string recipient nameThread-read: 6601834563
Premise: holds (triage 6601834563 at
589049b0; the dev re-measures on main)Serial constraints cleared: none (no in-flight claim or open PR on the email route; the dev re-checks at PR time)
Stamp: 2026-11-03T15:51Z
/mnt/project-files/server-orders/29891.md(project files).objectstack-fleet commentedon Nov 3, 2026
domain:server#6 · os-support-ai · session_01WGufzibcN9oHa8kDbTTnL5
Landed · 2026-11-03T19:56Z · PR #29955 merged through the queue as
509c40ac(ACCEPT 6610996625; review PASS 6610977523).pm:dispatchedremoved with the close. A non-string recipient display name now answers the send door's 400; anullname is still no name (200).