Skip to content

Commit d42859d

Browse files
committed
docs(spec,objectql): SharedRecordIds and fixed-read leaf seam docblocks describe the share arm after the switch
The share arm's capped list of granted ids is retired (ADR-0155 step 6); the docblocks no longer describe it, or the missing producer, in the present tense. Comment-only. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7
1 parent 3aa008d commit d42859d

4 files changed

Lines changed: 39 additions & 20 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/objectql': patch
3+
---
4+
5+
docs(objectql): the fixed-read leaf seam's docblocks name plugin-sharing as the leaf's producer, in the present tense (ADR-0155 step 6)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Comment-only. The seam's docblocks no longer say the producer, its boot check and its up-front answer (R2) are still to land, or that nothing writes the leaf: plugin-sharing writes it and reads `driverEvaluatesFixedReadLeaf` for R2. No export or runtime behaviour changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
docs(spec): the `SharedRecordIds` docblock describes the share arm after the switch — the capped list of granted ids is retired and the share arm carries the leaf (ADR-0155 step 6)
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
Comment-only. The module docblock of `@objectstack/spec/data`'s `SharedRecordIds` no longer says the share arm binds a list of at most 5,000 granted ids today, nor that nothing writes the leaf yet: plugin-sharing's read and write scopes carry the leaf, which is the whole grant set at every count. No schema, export or runtime behaviour changes.

‎packages/objectql/src/fixed-read-leaf-seam.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
* a refusal at the door and one at the boundary log one line between them.
5656
*
5757
* ⛔ No boot refusal and no producer here: the class-② boot check and R2's
58-
* share-arm answer land with the producer (ADR-0155 plan step 6), and until
59-
* then nothing on main writes the leaf. `index.ts` re-exports two readers
60-
* from this module and nothing else (plan step 5): {@link fixedReadLeafClassOfEngine}
58+
* share-arm answer live with the producer, plugin-sharing (ADR-0155 plan
59+
* step 6), which is the one writer of the leaf. `index.ts` re-exports two
60+
* readers from this module and nothing else (plan step 5): {@link fixedReadLeafClassOfEngine}
6161
* and {@link driverEvaluatesFixedReadLeaf}.
6262
*/
6363

@@ -82,8 +82,8 @@ const FIND_HOOK_EVENTS = Object.freeze(['beforeFind', 'afterFind'] as const);
8282
/**
8383
* [ADR-0155 D4, ② as ruled] Does `driver` evaluate the fixed-read leaf
8484
* `name`? Its `DriverCapabilities.fixedReadLeaves` lists the name; absence is
85-
* none. The one reader of the declaration: the seam's consult now, and the
86-
* producer's up-front answer (R2) when it lands (ADR-0155 plan step 6), which
85+
* none. The one reader of the declaration: the seam's consult, and the
86+
* producer's up-front answer (R2, ADR-0155 plan step 6), which
8787
* reaches the driver through `IDataEngine.getDriverForObject`.
8888
*/
8989
export function driverEvaluatesFixedReadLeaf(driver: { readonly supports?: unknown } | undefined, name: FixedReadLeafName): boolean {
@@ -118,9 +118,9 @@ export type FixedReadLeafClass =
118118
* (`resolveDatasourceBinding`), so no driver evaluates the subquery.
119119
* 2. **A registration for the table BY NAME**: an object-scoped middleware
120120
* (`hasObjectMiddleware`) or a `beforeFind` / `afterFind` hook that names
121-
* it (`hookNamesObject`), which today's read of the table runs and the
122-
* subquery would read around. A registration that names no object, or
123-
* `'*'`, is outside the class (D4's boundary).
121+
* it (`hookNamesObject`), which the retired list's read of the table ran
122+
* and the subquery would read around. A registration that names no
123+
* object, or `'*'`, is outside the class (D4's boundary).
124124
*
125125
* At this step both answer with the refusal (R1). ⛔ The seam never reads
126126
* around either.

‎packages/spec/src/data/shared-record-ids.ts‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* user `recipient`"*: at every access level (the read form), or at the levels
77
* it names (the write form, ADR-0155 ③ ruled A).
88
*
9-
* It sits where today's list of granted ids sits, as the comparand of `$in` on
10-
* the object's `id`:
9+
* It sits where the share arm's list of granted ids sat before the producer's
10+
* switch (ADR-0155 plan step 6), as the comparand of `$in` on the object's `id`:
1111
*
1212
* ```ts
1313
* { id: { $in: SharedRecordIds.read('account', 'u1') } }
@@ -19,9 +19,9 @@
1919
* that is neither NULL nor empty and, on the write form, an `access_level` in
2020
* the levels it carries. Read with system authority, with no organization
2121
* predicate (ADR-0155 ① ruled A), with no cap and no ordering. The list the
22-
* share arm binds today holds at most 5,000 members of G; the leaf is G at every
23-
* count. A SQL driver compiles it in the list's own position, as
24-
* {@link SharedRecordIds.innerRead} describes:
22+
* share arm bound before the switch is retired; the share arm now carries this
23+
* leaf, which is G at every count. A SQL driver compiles it in the list's own
24+
* position, as {@link SharedRecordIds.innerRead} describes:
2525
*
2626
* ```sql
2727
* id IN (SELECT record_id FROM sys_record_share
@@ -69,10 +69,10 @@
6969
* non-enumerable.
7070
*
7171
* **The recipient is the producer's.** It is captured from the context the
72-
* scope is built for, where today's `recipient_id` comes from. ⛔ No seam and no
73-
* driver re-derives it from the reading context: the engine's seam (ADR-0155
74-
* D4) compares it with the reading context's user and delegator and never
75-
* replaces it.
72+
* scope is built for, where the retired list's `recipient_id` came from. ⛔ No
73+
* seam and no driver re-derives it from the reading context: the engine's seam
74+
* (ADR-0155 D4) compares it with the reading context's user and delegator and
75+
* never replaces it.
7676
*
7777
* ## It arrives composed
7878
*
@@ -99,9 +99,8 @@
9999
* No operator joins `FieldOperatorsSchema` or `VALID_AST_OPERATORS`
100100
* (`./filter.zod.ts`), and there is no CEL function and no lint vocabulary. One
101101
* producer writes it: plugin-sharing's read-scope builder, and its write-scope
102-
* builder. No caller of the comparand-shape door admits it until the engine's
103-
* card (ADR-0155 plan step 2), and nothing writes it until that producer's
104-
* switch (plan step 6).
102+
* builder. The engine's callers of the comparand-shape door admit it (ADR-0155
103+
* plan step 2), and that producer writes it from its switch on (plan step 6).
105104
*
106105
* Like `./readable-ids.ts`, the module is tolerant of bare, un-parsed input:
107106
* {@link isSharedRecordIds} accepts `unknown` and answers `false` for every

0 commit comments

Comments
 (0)