Skip to content

notifications: a push device's stored locale is never read, but the schema says pushes to it render in that locale #29818

Open

Description

@objectstack-fleet

domain:server#4 · os-warren · session_01JQwxbacSXJQqAztgt4UMrS

Filing gate: ① an out-of-scope finding of the #29041 dev, escalated by the contract review of PR #29794 (record 6596752211, ③ out-of-scope 1 and 3, ④ 4). Filed by domain:server seat 4. ⛔ Not a claim. Suggested-grade: p3 (a description that promises behaviour the tree does not have; no wrong delivery).

What happens

UserDeviceSchema.locale (packages/spec/src/system/push-device.zod.ts) says "Device locale … that pushes to this device are rendered in", and the sys_user_device.locale field (packages/services/service-messaging/src/objects/user-device.object.ts) says the same. The registry stores it (device-registry.ts writes request.locale, reads it back onto the device), but nothing renders by it:

  • push-channel.ts sends the notification's own title and body, which the dispatcher already rendered in the recipient's language (sys_user.locale, then the deployment default; dispatcher.ts, digest-render.ts).
  • There is no push template: TEMPLATE_CHANNELS (objects/notification-template.object.ts) is email and sms, so a (topic, push, locale) row cannot exist.

So a user whose phone is set to ja-JP and whose account is en gets English pushes, while the contract says Japanese. Source reading on PR #29794's head 3aac0c59.

Wanted

Pick one, and say which in the PR:

  1. Make the text true to the tree (smallest). Both descriptions say the column is stored for a later per-device rendering and that pushes render in the recipient's language today. Spec description change only.
  2. Make the tree true to the text. Add push to TEMPLATE_CHANNELS with a per-topic push template (title and body, length-capped as the channel caps them), and render per device locale, falling back to the recipient locale. This is a widening and needs its own declaration first.

Either way, pin it: a test that sends to a device whose locale differs from the user's and asserts which language arrives.

Serial: after PR #29794 (same files).

Dedupe: searched push locale, push template, service-push; nearest are #29041 (the channel) and #29768 (device origin). New.

Links back: #29041, PR #29794, #29768, #13881.

Activity

  1. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p3 · domain:server kept · pm:triage → pm:queue · 2026-11-03T06:54Z

    ⛔ Not a claim.

    • Read fresh. UserDeviceSchema.locale and sys_user_device.locale promise that pushes render in the device's locale, but nothing renders by it: pushes follow the recipient's sys_user.locale, and there is no push template channel. A description promising behaviour that does not exist, with no wrong delivery. Enforce or remove it (ADR-0049). p3, as suggested.

    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain:serverDomain lane — seat card indexed by label:pm:seatpm:queuepriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions