Skip to content

Commit bb7da10

Browse files
committed
docs(changeset): declare the wire surface grantsRefused reaches, and the client-type lag
The evaluate route is a ledgered SDK route whose handler passes the service return value through unfiltered, so the seventh key is on the response body every caller already receives. The SDK method's declared resolved type is the spec's six-field `SharingRuleEvaluationResult`, which cannot name it — a client-type lag, additive on the wire, tracked as #14969. Declared here rather than lifted, because the spec type is a `domain:spec` single-owner file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WXyGTWPbbreqXow7Z2pZCk
1 parent d6573d8 commit bb7da10

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.changeset/sharing-reconcile-per-grant-organization-refusal.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,24 @@ was refused` (#14143), which shipped `minor` for the same reason.
5656

5757
`grantsRefused > 0` does **not** mean the pass failed. It means the pass met a
5858
record it cannot grant on and carried on — which is the whole point.
59+
60+
**Wire surface — declared, not lifted.** `grantsRefused` reaches the wire.
61+
`POST /api/v1/sharing/rules/:idOrName/evaluate` is a ledgered **SDK** route —
62+
`packages/rest/src/rest-route-ledger.ts:390`, the row carrying
63+
`disposition: 'sdk'` and `client: 'shares.rules.evaluate'` — and its REST handler
64+
passes the service return value through **unfiltered**
65+
(`packages/rest/src/rest-server.ts:11108``:11109`:
66+
`const result = await svc.evaluateRule(req.params.idOrName, context ?? {})`
67+
followed by `res.json(result)`). So the seventh key is on the response body every
68+
caller of that route already receives. The SDK method declares
69+
`SharingRuleEvaluationResult` as its resolved type
70+
(`packages/client/src/index.ts:4766`, unwrapped at `:4771` through
71+
`unwrapResponse` parameterised on that same type), and that type is the spec's
72+
six-field contract — so the **declared client type cannot name the seventh key**.
73+
That is a client-type **lag**, not a contract break: the key is additive on the
74+
wire, every declared field is unchanged, and a consumer typed against
75+
`SharingRuleEvaluationResult` keeps compiling exactly as before. Lifting the type
76+
is not this PR's to do — `SharingRuleEvaluationResult` lives in
77+
`@objectstack/spec`, a `domain:spec` single-owner file — so the lag is declared
78+
here and tracked as the follow-up #14969, which lifts `grantsRefused?: number`
79+
(optional) into `SharingRuleEvaluationResult`.

0 commit comments

Comments
 (0)