Skip to content

Commit 29000bb

Browse files
committed
chore(changeset): ExplainAccessRequest declares recordIds
Claude-Session: https://claude.ai/code/session_01ADHkmQS1wrCba8FkVowBLy Co-authored-by: Claude <noreply@anthropic.com>
1 parent feabbdd commit 29000bb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
feat(spec): `ExplainAccessRequest` declares `recordIds`, the batch selector the explain wire schema already carries
6+
7+
Clause-②: yes (widening)
8+
Metadata-protocol: none
9+
10+
The `security` service contract's `explain(request)` selector, `ExplainAccessRequest`, now declares the optional `recordIds` member. The wire schema `ExplainRequestSchema` already declared it, and both the REST explain route and the reference security service already honour it. A TypeScript caller handing `explain` a batch no longer needs a cast to get past the contract type.
11+
12+
- **The type is the wire schema's own.** `recordIds` is typed as `ExplainRequest['recordIds']` (a list of ids), so the contract and the schema cannot drift; a type-level test holds the two equal.
13+
- **What it means.** The same record-grained question as `recordId`, for several records of one `(object, operation)` pair: mutually exclusive with `recordId`, at least one and at most `EXPLAIN_BATCH_MAX_RECORD_IDS` ids, answered by `ExplainDecision.records` in the same order.
14+
- **Nothing is required of an implementation.** A security service may ignore `recordIds` and answer only the object-level decision, with no `records`; the REST explain route then asks each id singularly, as it already does.
15+
- **No runtime change.** Only the declared type moves. Every request that compiled before still compiles.

0 commit comments

Comments
 (0)