Skip to content

client SDK organizations.* family: bind the 19 return res.json() methods (organizations 11 · invitations 3 · teams 5) to their better-auth wire shapes — #12104 family card 3 of 3 #14314

Description

@os-trump

Blocked-by: (released — #14313 delivered 13/14 via PR #16537, merged b1b978c; the packages/client/src/index.ts hard serial releases on MERGE)
Filed by the domain:cli execution PM seat (#6024), session session_016yfqQh2dBgPAymYd7xipza, R65 — one of the three family cards the maintainer's ruling on #12104 ordered this lane to file. Part of #12104 (the family head). ⛔ domain:* / type left to triage; the lane is fixed by the parent. Family order: THIRD — after the auth.* card MERGES (hot-file serial). Largest job, last, so it does not lock the file over the two smaller ones.

Ruling (verbatim, 2026-08-31, maintainer, comment 5472614711 on #12104 — ⛔ 不译)

裁定:SDK 绑定的时间戳声明为线上真发的 ISO string,⛔ 不声明 Date、不建运行时复活层。 理由即本仓的第一戒律:声明一个运行时不兑现的能力(类型说 Date,运行时给 string,.getTime() 即炸)正是要结构性禁止的形状;wire 契约是唯一事实源,better-auth 的 Date 是序列化前的服务端形状,不是 wire 事实。JSDoc 注明 ISO-8601;branded 别名(IsoDateTimeString)可作后续增强,⛔ 不作本族工作的先决。

执行形状:按族三张卡 —— organizations 19 / auth 14 / oauth 5,由 domain:cli 车道立卡派发;packages/client/src/index.ts 是实测硬串行热点,三卡跨轮串行;每卡 Clause-② yes(收窄已发布返回类型),PR 建立时挂 needs:contract-review 走复审链;changeset 的 BREAKING 记号照 #13080 的类别(该门禁卡独立,⛔ 不在本族顺手做)。

Scope — the 19 methods (from #12104's census; re-locate on current main)

  • organizations.* (11): create · update · setActive · get · listMembers · invite · leave · delete · removeMember · updateMemberRole · getActiveMember
  • organizations.invitations.* (3): cancel · accept · reject
  • organizations.teams.* (5): create · update · delete · addMember · removeMember
  • Plus the delegating organizations.invitations.resendinvite: bound implicitly when invite is (the census counts it under whichever card binds invite, i.e. this one).

Each is an exported callable of @objectstack/client with no return annotation that ends return res.json(), so its published type is Promise< any > from lib.dom. ⛔ Grep cannot count this class — use pnpm --filter @objectstack/client check:exported-any-returns.

Constraints that bind

Re-check

pnpm --filter @objectstack/client check:exported-any-returns    # 42 ledgered sites at filing
git grep -n "updateMemberRole\|getActiveMember\|invitations" -- packages/client/src/index.ts

Positive control: automation.trigger was bound by PR #13082 and must NOT appear in the ledger.

Refs: #12104 (family head, ruling) · PR #13082 (precedent) · #13080 (BREAKING-token category) · #13079 (envelope convention, ⛔ not this family's question) · #7781 (closed; the invitation status union hand-typed and missing expired — the divergence class to avoid while binding invitations.*).


Triage housekeeping (R+98): Blocked-by: #14313 written into this body, domain:cli + priority:p2 + needs:contract-review applied, and pm:queuepm:blocked. This card was one of the two long-standing label gaps on the triage worklist; grading it surfaced that the family's declared HARD SERIAL on packages/client/src/index.ts existed only as prose in the three bodies, with all three sitting in pm:queue. The chain is now #14312#14313#14314. Only #14312 is dispatchable today.

Generated by Claude Code


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions