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
fix(client)!: the spec contract and the SDK direct-grant options state only what the door accepts #34034
Follow-up to PR #34031 (review record 6898513749, S2).
Rule: a share written through the direct-grant door is always a manual share. For a non-system caller, SharingService.grant answers VALIDATION_FAILED (REST 400) for any source other than 'manual' and for any sourceId.
Gap: the typed surface still offers what the service always refuses:
Spec contract. The jsdoc on ISharingService.grant in packages/spec/src/contracts/sharing-service.ts lists the non-system refusals but not this one. Add it at the rule level. This is jsdoc only, with no type change: GrantShareInput keeps both fields because the system path uses them.
Client SDK. The shares.grant options in packages/client/src/index.ts declare source?: string and sourceId?: string. The SDK is never the system context, so every SDK caller that sets either is refused. Drop sourceId, and type source as 'manual' or remove it. This is a breaking type change in @objectstack/client with its own changeset and "Who moves".
Leaving the types as they are and documenting the rule only in TSDoc is not recommended: an option that is declared but always refused invites the wrong call.
changed the title [-]fix(client)!: the SDK direct-grant options name only what the door accepts[/-][+]fix(client)!: the spec contract and the SDK direct-grant options state only what the door accepts[/+]on Nov 15, 2026
Triage: first touch → domain:spec · p3 · 2026-11-15T17:49Z
⛔ Not a claim.
The ISharingService.grant contract and the SDK's direct-grant options still offer a source other than 'manual' and a sourceId, which the door always refuses for a non-system caller. Narrowing the published types (fix(client)!) matches what the door accepts and stops developers writing calls that can only fail. p3.
Ruled: narrow now (option A) · maintainer Sales (os-sales), on a decision card answered at 2026-11-19T06:26Z in this account's fleet project (thread 「开 objectstack 座位接 area:build」), verbatim option chosen: 「现在收窄」 — "删 sourceId,source 类型收为 'manual',fix(client)! 破坏性 PR;objectstack 与 hotcrm 实测零调用方。"
Scope = both halves of this card as written: (1) the jsdoc rule on ISharingService.grant in packages/spec/src/contracts/sharing-service.ts (no type change; GrantShareInput keeps both fields for the system path); (2) @objectstack/clientshares.grant options: drop sourceId, type source as 'manual', own changeset with "Who moves".
Area: area:build → area:data (North Star boundary: data and permissions inside the application). Stays in pm:queue for the seat that takes area:data cards.
Activity
[-]fix(client)!: the SDK direct-grant options name only what the door accepts[/-][+]fix(client)!: the spec contract and the SDK direct-grant options state only what the door accepts[/+]objectstack-fleet commentedon Nov 15, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch →
domain:spec· p3 · 2026-11-15T17:49Z⛔ Not a claim.
The
ISharingService.grantcontract and the SDK's direct-grant options still offer asourceother than'manual'and asourceId, which the door always refuses for a non-system caller. Narrowing the published types (fix(client)!) matches what the door accepts and stops developers writing calls that can only fail. p3.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob
Recorded 2026-11-19T06:28Z.
Ruled: narrow now (option A) · maintainer Sales (os-sales), on a decision card answered at 2026-11-19T06:26Z in this account's fleet project (thread 「开 objectstack 座位接 area:build」), verbatim option chosen: 「现在收窄」 — "删 sourceId,source 类型收为 'manual',fix(client)! 破坏性 PR;objectstack 与 hotcrm 实测零调用方。"
ISharingService.grantinpackages/spec/src/contracts/sharing-service.ts(no type change;GrantShareInputkeeps both fields for the system path); (2)@objectstack/clientshares.grantoptions: dropsourceId, typesourceas'manual', own changeset with "Who moves".packages/client/src/index.ts:7247-7248; the service refuses both for non-system callers atpackages/plugins/plugin-sharing/src/sharing-service.ts:202-213; zero non-testshares.grant(callers in objectstack and hotcrm. Precedent: fix(plugin-sharing)!: a share granted directly by a non-system caller is always a manual share #34031.area:build→area:data(North Star boundary: data and permissions inside the application). Stays inpm:queuefor the seat that takesarea:datacards.