You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(approvals): expose the pending node's lockRecord policy on the request row (#3814, objectui#2902) (#3815)
An approval node declares `lockRecord` (default `true`) and the record-lock
`beforeUpdate` hook enforces exactly that — `lockRecord: false` and the record
stays writable while the node waits. Correct since Phase B, and invisible to
every client.
`rowFromRequest` parses `node_config_json` but projects a whitelist out of it
(`__flowLabel`, `__nodeLabel`, `__round`, `escalation.timeoutHours`,
`decisionOutputs`); `lockRecord` was never in that list, and no other field on
`ApprovalRequestRow` carried the lock. So the strongest thing a console could
learn from `GET /approvals/requests` was "a pending request exists", from which
it can only assume the record is locked. That is wrong on every opted-out node,
and a flow chaining nodes with different policies makes it visibly wrong: one
UI state for "you may edit this" and "your save dies with RECORD_LOCKED".
`ApprovalRequestRow` now carries `lock_record: boolean`, read from the same
snapshot the hook reads with the same `!== false` default, on every service
read. The flag a client renders and the rule the server applies cannot drift.
Additive and backward compatible. The showcase's `showcase_budget_approval`
declares `lockRecord: false` on its single-approver Manager Review and keeps
`true` on the multi-approver Executive Review, so one flow exercises both.
Closes#3814
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments