Files
Pulse/internal/actionlifecycle
rcourtman f00ab32a32 Admit human action dispatch under the policy coordinator
Execute read the operator remediation lock in ValidateCurrentReadiness and
committed the executing transition afterwards, with nothing holding the
two together. A "Never auto-remediate" or Retired save that landed between
the readiness read and RecordActionExecutionAdmission was acknowledged to
the operator and still let the approved action reach the executor.
ExecuteUnderPolicy has always held the admission read lock across the same
steps; operator-state saves already take the write side through
WithPolicyMutation, so the human path only has to join them.

Execute now runs its gates and the admission commit in beginHumanExecution
under the coordinator read lock and releases it before ExecuteAction is
called. A lock save therefore either lands before the readiness check and
refuses the action, or queues behind the committed admission. An admitted
dispatch is deliberately not recalled, including an attempt that was
admitted but never sent and is resumed by RecoverExecutingActions: recalling
known-unsent work needs an atomic pre-send terminalization neither store
has, and the contract now says so instead of leaving it implicit.

The new test fires a real policy writer inside the window, through the
executor's availability hook, asserts the coordinator excludes a writer
there, and orders the save acknowledgement against the admission commit on
both stores. Against the old service.go it fails on both assertions (ack
seq 1, admission seq 2, executor called). Two more tests pin that the lock
is released before dispatch and that neither an admitted dispatch nor a
queued attempt is recalled by a later lock.

The api-contracts and security-privacy notes describe the shared boundary.
2026-10-10 08:47:35 +01:00
..