|
| 1 | +--- |
| 2 | +'@objectstack/plugin-approvals': patch |
| 3 | +'@objectstack/plugin-sharing': patch |
| 4 | +--- |
| 5 | + |
| 6 | +fix(plugin-approvals)!: an approval node refuses to open when a team, position or queue approver's directory read fails, and the ownership-queue reads page to completion |
| 7 | + |
| 8 | +Clause-②: yes (narrowing) — an approval node whose `team`, `position` or `queue` approver (static, or an `expression` approver with `resolveAs` `team` / `position`) cannot be expanded because a directory read failed no longer opens: under every `onEmptyApprovers` policy (`admin_rescue`, `auto_approve`, `fail`, `fallback`, the `fallbackApprovers` slate included) it now fails the node with a retryable `APPROVER_DIRECTORY_UNREADABLE:` error naming the read, where it used to open on the rest of the slate, on the fallback slate or on the administrators, or auto-approve. Every other input answers as before. |
| 9 | +Metadata-protocol: none |
| 10 | + |
| 11 | +<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped: the approval node config, the approver types and the ownership-queue contract keep their shapes. What moves is the answer a node gives while a directory table cannot be read, and nothing at rest records that answer, so there is nothing for a migration to rewrite. --> |
| 12 | + |
| 13 | +**BREAKING** accept-set narrowing at the approval node (`@objectstack/plugin-approvals`): a failed directory read behind a `team`, `position` or `queue` approver refuses the node instead of opening it on a slate that is missing people (ADR-0142 D6 as amended, ruling record 6599731698 on #29604). |
| 14 | + |
| 15 | +- **Before.** A `team` or `position` approver whose `sys_team_member`, `sys_user_position` or `sys_member` read failed kept its `type:value` literal slot, which nobody can act on, and logged the failure. A `queue` approver whose expansion threw answered "expanded to nobody" and added no slot. Either way the node went on as if those people did not exist: beside other approvers it opened on them alone, and on an otherwise empty slate the node's `onEmptyApprovers` policy acted, opening on the `fallbackApprovers` or the organization's administrators, or auto-approving. |
| 16 | +- **Now.** The node does not open and writes no request, approver or action row. It fails with an `ApproverDirectoryUnreadableError` whose message starts `APPROVER_DIRECTORY_UNREADABLE:`, names the approver, the organization and the read that failed (a failure of the cross-organization read filter is named as that filter's read), and is retryable: the flow node's failure is a runtime one, so the run can be resumed once the directory can be read. A `fallbackApprovers` slate whose own `team` or `position` read fails refuses the same way. `department` / `business_unit`, `org_membership_level` and `manager` approvers are not named by the ruling and answer exactly as before. |
| 17 | +- **Unchanged.** A decision on a request opened before the approver snapshot existed still re-reads its slate on the old path, which keeps the literal slot on a failed read, because the decision has already been recorded when that read happens. |
| 18 | + |
| 19 | +`@objectstack/plugin-sharing`: the ownership-queue service reads its `sys_queue` and `sys_queue_member` rows by id, page after page, to the end, where it read one page of 10,000 rows and answered on it. A queue's 10,001st member, an organization's 10,001st queue and the queues naming a recipient past that bound are now found. A read that fails partway answers as a failed read did before (that read contributes nobody, logged once), never with the pages it had read. |
0 commit comments