Approval gates: a job that waits for a person issue #57 open andymccall opened this · 1 comment
andymccall referenced by change e20897216221 on main ·
Done and proved live (2026-10-16 05:25). flow-core c3547908: approval { by; others-only; expires } (spec 5.3.2). Hub fb6b94a1 + 7f54270c: the job waits (no runner, not in placement or the queue) until someone with the role (not the pusher with others-only) approves it after its dependencies passed; run page Approvals panel with Approve/Reject; API POST .../flow/runs/{n}/jobs/{job}/approve|reject; oh run approve|reject N --job NAME; who/when on the job, its log and the audit log; rejected or expired (reaper, from when the dependencies finished) ends cancelled and skips what follows; a rerun asks again; approvers are told once (flow.approval). Proof: andymccall/egress-proof run issue #6: gated waited ("waiting for approval; the people who may approve were told"), oh run approve 6 --job gated, then it ran. Follow-up: approvals through agent tokens are recorded as the person, oxygenhub#229.
A run can pause at a job until someone approves it, like GitLab's manual jobs (andymccall/oxygenhub-gcp: plan, then a person presses play to apply). pipeline.kdl: approval { by "maintain"; others-only #true; expires "24h" } on a job. The run shows the job as waiting; the run page offers Approve and Reject to people with that role (others-only: not the person who pushed), recorded in the audit log and the run (who, when). A waiting job is cancelled when its bookmark moves on (a stale plan is never applied) or when it expires. API and oh: oh run approve N --job NAME. Notifications to approvers.