From d42859d0567775ea9f16cd5ab16fc76afc67a06e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 11:32:06 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 --- ...121-fixed-read-leaf-seam-docblock-tense.md | 10 ++++++++ .../36121-shared-record-ids-docblock-tense.md | 10 ++++++++ packages/objectql/src/fixed-read-leaf-seam.ts | 16 ++++++------- packages/spec/src/data/shared-record-ids.ts | 23 +++++++++---------- 4 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 .changeset/36121-fixed-read-leaf-seam-docblock-tense.md create mode 100644 .changeset/36121-shared-record-ids-docblock-tense.md diff --git a/.changeset/36121-fixed-read-leaf-seam-docblock-tense.md b/.changeset/36121-fixed-read-leaf-seam-docblock-tense.md new file mode 100644 index 00000000000..7c316ef5877 --- /dev/null +++ b/.changeset/36121-fixed-read-leaf-seam-docblock-tense.md @@ -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. diff --git a/.changeset/36121-shared-record-ids-docblock-tense.md b/.changeset/36121-shared-record-ids-docblock-tense.md new file mode 100644 index 00000000000..8d6ec033a2e --- /dev/null +++ b/.changeset/36121-shared-record-ids-docblock-tense.md @@ -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. diff --git a/packages/objectql/src/fixed-read-leaf-seam.ts b/packages/objectql/src/fixed-read-leaf-seam.ts index 3bb40e642a6..3be4a3f979b 100644 --- a/packages/objectql/src/fixed-read-leaf-seam.ts +++ b/packages/objectql/src/fixed-read-leaf-seam.ts @@ -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}. */ @@ -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 { @@ -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. diff --git a/packages/spec/src/data/shared-record-ids.ts b/packages/spec/src/data/shared-record-ids.ts index c32415c68a5..7ca42678a96 100644 --- a/packages/spec/src/data/shared-record-ids.ts +++ b/packages/spec/src/data/shared-record-ids.ts @@ -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') } } @@ -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 @@ -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 * @@ -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