Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/36121-fixed-read-leaf-seam-docblock-tense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/objectql': patch
---

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)

Clause-②: no
Metadata-protocol: none

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.
10 changes: 10 additions & 0 deletions .changeset/36121-shared-record-ids-docblock-tense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': patch
---

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)

Clause-②: no
Metadata-protocol: none

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.
16 changes: 8 additions & 8 deletions packages/objectql/src/fixed-read-leaf-seam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
* a refusal at the door and one at the boundary log one line between them.
*
* ⛔ No boot refusal and no producer here: the class-② boot check and R2's
* share-arm answer land with the producer (ADR-0155 plan step 6), and until
* then nothing on main writes the leaf. `index.ts` re-exports two readers
* from this module and nothing else (plan step 5): {@link fixedReadLeafClassOfEngine}
* share-arm answer live with the producer, plugin-sharing (ADR-0155 plan
* step 6), which is the one writer of the leaf. `index.ts` re-exports two
* readers from this module and nothing else (plan step 5): {@link fixedReadLeafClassOfEngine}
* and {@link driverEvaluatesFixedReadLeaf}.
*/

Expand All @@ -82,8 +82,8 @@ const FIND_HOOK_EVENTS = Object.freeze(['beforeFind', 'afterFind'] as const);
/**
* [ADR-0155 D4, ② as ruled] Does `driver` evaluate the fixed-read leaf
* `name`? Its `DriverCapabilities.fixedReadLeaves` lists the name; absence is
* none. The one reader of the declaration: the seam's consult now, and the
* producer's up-front answer (R2) when it lands (ADR-0155 plan step 6), which
* none. The one reader of the declaration: the seam's consult, and the
* producer's up-front answer (R2, ADR-0155 plan step 6), which
* reaches the driver through `IDataEngine.getDriverForObject`.
*/
export function driverEvaluatesFixedReadLeaf(driver: { readonly supports?: unknown } | undefined, name: FixedReadLeafName): boolean {
Expand Down Expand Up @@ -118,9 +118,9 @@ export type FixedReadLeafClass =
* (`resolveDatasourceBinding`), so no driver evaluates the subquery.
* 2. **A registration for the table BY NAME**: an object-scoped middleware
* (`hasObjectMiddleware`) or a `beforeFind` / `afterFind` hook that names
* it (`hookNamesObject`), which today's read of the table runs and the
* subquery would read around. A registration that names no object, or
* `'*'`, is outside the class (D4's boundary).
* it (`hookNamesObject`), which the retired list's read of the table ran
* and the subquery would read around. A registration that names no
* object, or `'*'`, is outside the class (D4's boundary).
*
* At this step both answer with the refusal (R1). ⛔ The seam never reads
* around either.
Expand Down
23 changes: 11 additions & 12 deletions packages/spec/src/data/shared-record-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* user `recipient`"*: at every access level (the read form), or at the levels
* it names (the write form, ADR-0155 ③ ruled A).
*
* It sits where today's list of granted ids sits, as the comparand of `$in` on
* the object's `id`:
* It sits where the share arm's list of granted ids sat before the producer's
* switch (ADR-0155 plan step 6), as the comparand of `$in` on the object's `id`:
*
* ```ts
* { id: { $in: SharedRecordIds.read('account', 'u1') } }
Expand All @@ -19,9 +19,9 @@
* that is neither NULL nor empty and, on the write form, an `access_level` in
* the levels it carries. Read with system authority, with no organization
* predicate (ADR-0155 ① ruled A), with no cap and no ordering. The list the
* share arm binds today holds at most 5,000 members of G; the leaf is G at every
* count. A SQL driver compiles it in the list's own position, as
* {@link SharedRecordIds.innerRead} describes:
* share arm bound before the switch is retired; the share arm now carries this
* leaf, which is G at every count. A SQL driver compiles it in the list's own
* position, as {@link SharedRecordIds.innerRead} describes:
*
* ```sql
* id IN (SELECT record_id FROM sys_record_share
Expand Down Expand Up @@ -69,10 +69,10 @@
* non-enumerable.
*
* **The recipient is the producer's.** It is captured from the context the
* scope is built for, where today's `recipient_id` comes from. ⛔ No seam and no
* driver re-derives it from the reading context: the engine's seam (ADR-0155
* D4) compares it with the reading context's user and delegator and never
* replaces it.
* scope is built for, where the retired list's `recipient_id` came from. ⛔ No
* seam and no driver re-derives it from the reading context: the engine's seam
* (ADR-0155 D4) compares it with the reading context's user and delegator and
* never replaces it.
*
* ## It arrives composed
*
Expand All @@ -99,9 +99,8 @@
* No operator joins `FieldOperatorsSchema` or `VALID_AST_OPERATORS`
* (`./filter.zod.ts`), and there is no CEL function and no lint vocabulary. One
* producer writes it: plugin-sharing's read-scope builder, and its write-scope
* builder. No caller of the comparand-shape door admits it until the engine's
* card (ADR-0155 plan step 2), and nothing writes it until that producer's
* switch (plan step 6).
* builder. The engine's callers of the comparand-shape door admit it (ADR-0155
* plan step 2), and that producer writes it from its switch on (plan step 6).
*
* Like `./readable-ids.ts`, the module is tolerant of bare, un-parsed input:
* {@link isSharedRecordIds} accepts `unknown` and answers `false` for every
Expand Down
Loading