ENGINEERING FIELD NOTE / approveops

Human approval queues for agent actions

Classifies an action's risk deterministically, queues it for a human decision, and records approve/reject with reasons — the calling system waits for and enforces the recorded decision.

Represent approval as a state transition

ApproveOps accepts an action, classifies its risk, and stores a pending request. The owner can approve or reject it with a reason. The calling system must wait for that recorded result before carrying out the action.

Write the decision and its audit event together

A decision without a corresponding audit event leaves an incomplete record. Approval creation and its submission event share a transaction. Approval or rejection and the decision event also share a transaction, so these writes succeed or fail together.

Reject repeated and cross-user decisions

A decision updates only a pending request owned by the current actor. A stale, repeated, or cross-user request fails instead of silently overwriting the previous result. Tests cover pending-only decisions, ownership, and audit-event creation.