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

Closed

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

  2. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-bill · session_01Utp6CZMkHvuDeVYgTD73qF

    Claim: PM loop round 1
    Session: session_01Utp6CZMkHvuDeVYgTD73qF (seat) · dev card thread session_01Utp6CZqHFs5GUFFGRbLgxy
    Account: os-bill
    Branch: claude/project-thread-jrj1rg (the card thread's designated push branch, the recorded platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-29818
    Domain: domain:server
    Seat: domain:server#4
    File surface: the UserDeviceSchema.locale description (packages/spec/src/system/push-device.zod.ts) and its regenerated spec artifacts, the sys_user_device.locale field description (packages/services/service-messaging/src/objects/user-device.object.ts), one messaging test that pins which language a push arrives in, changesets. ⛔ TEMPLATE_CHANNELS (option 2), docs/adr/**, .claude/**, repo-root AGENTS.md, ui/**, skills/** (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default judgment tier (opus) — dispatch-gates --tier: no path-derived mandate, effort: default
    Clause-②: no — description text and a test; nothing a caller sends is refused
    Metadata-protocol: none
    Responsibility: two descriptions promise pushes render in the device locale | none: pushes render in the recipient's sys_user.locale, then the deployment default, and no push template channel exists (card source reading on #29794's head) | anyone building on the contract text, e.g. a client setting device locale expecting localized pushes
    Thread-read: 6597419465
    Premise: holds (PR #29794 merged; the dev measures on main that a push to a device whose locale differs from the user's arrives in the user's language first)
    Serial constraints cleared: seats 2, 5 and 6 confirmed no overlap.

    Dispatch order: /mnt/project-files/server-seat4/dispatch-29818.md (project shared folder). Ruling section: triage 6597419465 (p3, "enforce or remove it", ADR-0049); seat picks the card's option 1 (make the text true to the tree); option 2 is a widening and is not dispatched. Dispatched on the maintainer's 「任务很多,车道尽量跑满并发」. Fixes #29818.

    Posted 2026-11-05T14:16Z.

  3. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 5, 2026
  4. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-bill · session_01Utp6CZMkHvuDeVYgTD73qF

    席位核对 · Amendment · 2026-11-05T14:21Z · claim 6660241524 file surface

    File surface adds: the RegisterDeviceRequest.locale description in packages/spec/src/api/protocol.zod.ts (the request contract carries the same promise, found by the dev), and the sys_user_device.locale help in the messaging package's translation bundles (en generated; zh-CN, ja-JP, es-ES hand-written). Same defect, same regenerated spec artifacts. Everything else in claim 6660241524 stands.

  5. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-bill · session_01Utp6CZMkHvuDeVYgTD73qF
    os-dev-report

    {
      "issue": 29818,
      "status": "done",
      "branch": "claude/project-thread-jrj1rg",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30544",
      "session": "session_01Utp6CZqHFs5GUFFGRbLgxy",
      "premise_still_valid": true,
      "summary": "Option 1 (make the text true to the tree). UserDeviceSchema.locale, RegisterDeviceRequestSchema.locale (seat-approved scope extension: the same promise in the request contract) and the sys_user_device.locale field description (with its en/zh-CN/ja-JP/es-ES help) now say the value is stored for the device and that a push arrives in the recipient's language (sys_user.locale, then the deployment default). Premise measured on main fa9c0aa2 first: a new pin with the real push channel over the real device registry, phones registered in a locale other than their user's, was green before any text changed (commit 8ab75e9f). No runtime behaviour changed; option 2 (TEMPLATE_CHANNELS push) not touched.",
      "tests": "at e541b3721: service-messaging test 66/66 files, 815/815 tests, typecheck exit 0; spec vitest 905/905 files, 27161 passed + 1 todo; keyed-notification-text.integration.test.ts 20/20 (3 new). No ablation: no tested behaviour changed (description text plus a pin of existing behaviour).",
      "gates": "dispatch-gates --commands: 107 families, each run with exit recorded before any pipe; --ran: 107 accounted, 106 run, 1 NOT-MEASURED (check:dual-build-cjs-loads exit 3, needs every package dist, left to CI). check-plugin-teardown-shape --self-test and check:skill-examples first exited 3 (shallow fixture commit; client/client-react unbuilt), re-run exit 0 after the prerequisite. spec check:generated 14/14 current; check-i18n-bundles --write exit 0; pnpm lint exit 0. PR check-runs: in_progress at report time. Record: /mnt/project-files/server-seat4/card-29818/gates-ran.txt.",
      "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
      "line_budget": "11 files changed, 91 insertions, 10 deletions",
      "files_changed": [
        ".changeset/29818-push-device-locale-descriptions.md",
        "content/docs/references/api/protocol.mdx",
        "content/docs/references/system/push-device.mdx",
        "packages/spec/src/api/protocol.zod.ts",
        "packages/spec/src/system/push-device.zod.ts",
        "packages/services/service-messaging/src/objects/user-device.object.ts",
        "packages/services/service-messaging/src/keyed-notification-text.integration.test.ts",
        "packages/services/service-messaging/src/translations/en.objects.generated.ts",
        "packages/services/service-messaging/src/translations/zh-CN.objects.generated.ts",
        "packages/services/service-messaging/src/translations/ja-JP.objects.generated.ts",
        "packages/services/service-messaging/src/translations/es-ES.objects.generated.ts"
      ],
      "deviations": [
        "packages/spec scope widened by one description (RegisterDeviceRequestSchema.locale), approved by the seat 14:22Z before the edit",
        "messaging i18n help rewritten in four locales (en regenerated, three hand-written translations), approved by the seat",
        "PR body carries the seat signature line, no assignee, no review request (dispatch order); the session-context assignee/reviewer step skipped for the same reason"
      ],
      "mcp_calls": "0",
      "api_writes": "2: POST repos/objectstack-ai/objectstack/dispatches (relay pr_create -> PR 30544); this os-dev-report comment via post-stamped. Plus git push (3 pushes of the designated branch).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud · push-relay.zod.ts:78 says the relay's visible line is shown in the device locale; no producer of it in this repository, not measured · noted in the PR's Acceptance notes, not filed"
      ]
    }

    Report taken 2026-11-05T15:03Z.

  6. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-bill · session_01Utp6CZMkHvuDeVYgTD73qF

    Landed · PR #30544 · card closed

    Reading Value
    PR #30544 MERGED 2026-11-05T16:41Z, merge commit bcdb1db00; Fixes #29818 closed this card. Seat record 6663076155 on head e541b372 (not BREAKING, not governed; one stalled CI shard re-run once, CI note 6662729629).
    main source packages/spec/src/system/push-device.zod.ts:63 'Device locale (BCP 47, for example zh-CN), as the registration named it. Stored for the device; no push renders by it: '
    Not here push-relay.zod.ts:78 says the same of the relay payload; no producer in this repo (carrier: cloud), named in the PR's Acceptance notes.

    The card's label pm:dispatched and the os-bill assignee come off with this comment.

    Posted 2026-11-05T16:42Z.

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:seatpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions