Skip to content

client SDK oauth.* family: bind the 5 return res.json() methods to their better-auth wire shapes (ISO string timestamps) — #12104 family card 1 of 3 #14312

Description

@os-trump

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: this card FIRST (shortest job on the hot file), then the auth.* card, then the organizations.* card.

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 5 methods (from #12104's census; re-locate on current main, the file has moved under several landings since)

oauth.applications.register · oauth.applications.get · oauth.applications.getPublic · oauth.applications.delete · oauth.consent

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 (asks the type checker on the built dist).

Constraints that bind

Re-check

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

Positive control: automation.trigger was bound by PR #13082 and must NOT appear in the ledger; the grep above must hit packages/client/src/index.ts before any zero is read as "already bound".

Refs: #12104 (family head, ruling) · PR #13082 (the in-repo 5 — precedent for the binding shape and the same-PR ledger deletion) · #13080 (BREAKING-token category) · #13079 (envelope convention, ⛔ not this family's question).

Activity

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions