Skip to content

Commit 24f6b3e

Browse files
committed
chore(spec): classify sys_assignment_rule.criteria's empty state as scope in the empty-state registry
An organization's assignment rule with an empty condition takes every new record no earlier rule took. The entry records that this selects work to route and grants nothing, mirroring the declared rule's criteria entry, which stays byte-identical. Claude-Session: https://claude.ai/code/session_016WV4d14C8K4gMehVb6jBvA Co-authored-by: Claude <noreply@anthropic.com>
1 parent ab98c3b commit 24f6b3e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎packages/spec/scripts/liveness/empty-state-registry.mts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ export const EMPTY_STATE_REGISTRY: EmptyStateEntry[] = [
193193
"[ADR-0142 D5] Which inserted rows an assignment rule entry routes; absent = every row, the catch-all entry at the end of an ordered list (the first entry that matches decides). It selects work to route and grants nothing by itself: the author names the target explicitly, assignment runs only for a row that reaches the engine with no owner and no queue, and a parked row is readable only by members of the queue the author named. The failure direction of a missing criteria is mis-routing among the author's own targets, never a widened grant.",
194194
evidence: 'packages/objectql/src/assignment-rules.ts (the first matching entry of the first matching rule decides; only rows with no owner and no queue are routed)',
195195
},
196+
{
197+
file: 'packages/plugins/plugin-sharing/src/objects/sys-assignment-rule.object.ts',
198+
property: 'criteria',
199+
semantics: 'scope',
200+
rationale:
201+
"[ADR-0142 D5, ruling A on #30066] An organization's own assignment rule (`sys_assignment_rule`): which inserted rows it routes; empty = every row no earlier rule took, the catch-all at the end of the organization's ordered rules. The declared entry's contract above, row for row: it selects work to route and grants nothing by itself — the author names the target, assignment runs only for a row that reaches the engine with no owner and no queue, a user target must be an active member of the organization, and a parked row is readable only by members of the queue named. A missing condition mis-routes among the organization's own targets, never widens a grant.",
202+
evidence: 'packages/objectql/src/assignment-rules.ts (authoredRules + assignOne: the organization rules go first, the first matching rule decides); packages/plugins/plugin-sharing/src/assignment-rule-hooks.ts (the save guard)',
203+
},
196204
{
197205
file: 'packages/spec/src/automation/flow.zod.ts',
198206
property: 'errorCode',

0 commit comments

Comments
 (0)