Skip to content

Commit fa23d69

Browse files
os-justinclaude
andauthored
test(qa): re-sync the authz-matrix sharing-rules recipient summary with the authorable enum (#17465)
* test(qa): re-sync the authz-matrix sharing-rules row with the authorable recipient enum The `sharing-rules` row enumerated five recipients; `ShareRecipientType` has carried six since the `field` kind became enforced. Two corrections, both inside the row: - `summary` now transcribes the authorable enum member-for-member in declaration order (user/team/position/unit_and_subordinates/business_unit/ field), marking `field` as per-record. `queue` stays out: it is reserved, expands to [] and is not authorable, so naming it on an `enforced` row would make the row false in the other direction. - `enforcement` claimed "every authorable recipient expands in expandRecipient". That is now false: `field` deliberately does NOT expand there — expandRecipient throws for it, and the per-record pairs are derived in desiredGrantsForRule / expandRecipientForRecord. The prose now names the real split. A new `note` records the stance the card asked for: these summaries are exhaustive, not indicative. Measured across the file — 0 of 49 summaries hedge, and the closest twin (`scope-depth`) transcribes ObjectAccessScopeSchema member-for-member — so the drift was a defect rather than a stylistic gap, and declaring the summaries indicative was refused because it would retro-weaken the 16 rows that enumerate. Nothing mechanical reads these strings; the row is hand-maintained. Claude-Session: https://claude.ai/code/session_01DapQyvYrFb1MxSYe7BL2nt Co-authored-by: Claude <noreply@anthropic.com> * test(qa): keep the tracker ids out of the sharing-rules row's strings `check:doc-authoring` reds on new internal issue ids in sibling-package string prose: a ledger string reaches readers who cannot resolve `#NNNN`, and its baseline is shrink-only (adding an entry is maintainer-only, so that route was not taken). The ids move to the adjacent `//` comment the gate prescribes, where the reader who can resolve them already is. Claude-Session: https://claude.ai/code/session_01DapQyvYrFb1MxSYe7BL2nt Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2a79726 commit fa23d69

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎packages/qa/dogfood/test/authz-conformance.matrix.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,16 @@ export const AUTHZ_CONFORMANCE: AuthzPrimitive[] = [
318318
note: 'Proof file carries the forged owner_id/organization_id submit case; the route-level matrix is covered unit-side in rest public-form-routes.test.ts + plugin-security security-plugin.test.ts (publicFormGrant strip suite).' },
319319
{ id: 'record-share', summary: 'manual record shares (sys_record_share)', state: 'enforced',
320320
enforcement: 'plugin-sharing/sharing-service.ts buildReadFilter/canEdit' },
321-
{ id: 'sharing-rules', summary: 'criteria sharing rules (recipients: user/team/position/unit_and_subordinates/business_unit)', state: 'enforced',
322-
enforcement: 'plugin-sharing/sharing-rule-service.ts (materialized into sys_record_share); every authorable recipient expands in expandRecipient. The never-enforced owner-type rules + group/guest recipients were removed from the authoring spec (ADR-0078; group renamed → team)', proof: 'showcase-bu-hierarchy-sharing.dogfood.test.ts' },
321+
// The recipient enumeration below is re-synced with the authorable enum
322+
// `ShareRecipientType` after #15072 landed the `field` kind (card #15240;
323+
// maintainer ruling 2026-09-02 on #14103, B). ⛔ The ids stay in this
324+
// comment and out of the row's STRINGS: a ledger string reaches readers who
325+
// cannot resolve a tracker id (check:doc-authoring, whose baseline is
326+
// shrink-only), while the reader who can resolve one is already in the source.
327+
{ id: 'sharing-rules', summary: 'criteria sharing rules (recipients: user/team/position/unit_and_subordinates/business_unit/field — `field` expands per RECORD)', state: 'enforced',
328+
enforcement: 'plugin-sharing/sharing-rule-service.ts (materialized into sys_record_share). The five RULE-WIDE recipients expand in expandRecipient; `field` deliberately does NOT — it has no rule-wide expansion, so expandRecipient THROWS for it rather than answering [] (answering [] is how a rule-wide caller turns "per record" into "nobody": reconcile would then revoke every grant, and revokeRuleGrantsForRetiredRecipients would retire every recipient). Its pairs are derived per record in desiredGrantsForRule (whole-rule pass) and expandRecipientForRecord (caller holding a record), re-materialising on the record\'s own write. The never-enforced owner-type rules + group/guest recipients were removed from the authoring spec (ADR-0078; group renamed → team)',
329+
proof: 'showcase-bu-hierarchy-sharing.dogfood.test.ts',
330+
note: 'Recipient list re-synced when the `field` kind became enforced. ⭐ These summaries are EXHAUSTIVE, not indicative — recorded here so the gap is not re-filed a third time. The parenthetical list is an order-faithful transcription of the AUTHORABLE enum `ShareRecipientType` (spec/security/sharing.zod.ts), and the file backs that reading: of the 49 `summary` strings, 0 hedge (none carries an `e.g.`, a `such as`, an `etc` or an ellipsis), and the closest structural twin — `scope-depth` — transcribes `ObjectAccessScopeSchema` member-for-member in declaration order. So the drift was a defect, not a stylistic gap, and declaring these summaries INDICATIVE was considered and REFUSED: it would retro-weaken the 16 rows that enumerate, to buy one row a caveat it does not need. `queue` is the one runtime `SharingRuleRecipientType` member deliberately absent: it is reserved (no `sys_queue`), expands to [] and is NOT authorable, so naming it on an `enforced` row would make this row false in the OTHER direction. ⚠️ Nothing mechanical reads `summary` / `enforcement` / `note` — this row is hand-maintained, so re-check it against `ShareRecipientType` whenever that enum moves.' },
323331
{ id: 'hierarchy-widening', summary: 'hierarchy widening — a unit + its subordinate units gain access', state: 'enforced',
324332
enforcement: 'plugin-sharing/business-unit-graph.ts BusinessUnitGraphService.expandUsers subtree (unit_and_subordinates recipient) — ADR-0057 D5 re-homed off the never-existent sys_position.parent. The narrower business_unit recipient resolves through expandUnitMembers (exactly one unit, no descent) and is pinned by the same proof file: #7807 narrowed the runtime to the declaration after both kinds shared one subtree walk',
325333
proof: 'showcase-bu-hierarchy-sharing.dogfood.test.ts' },

0 commit comments

Comments
 (0)