Skip to content

Implement approval-policy evaluation and human-gate workflow #321

Description

@labgadget015-dotcom

Roadmap item 4/10 · Workstream: Security · Risk: High · Approval required: Yes · Target milestone: M2 — Governed intake

Objective

Evaluate every proposed agent action against config/policies.yaml and the risk score, and route anything that needs approval to a human gate that costs the approver one step (per docs/human-in-the-loop-protocol.md), with the decision recorded as an audit event.

Non-goals

  • A general RBAC system
  • Approvals for actions outside this platform
  • Auto-approving new action classes

Acceptance criteria

  • Single evaluation entry point returns allow / require_approval / deny with the matched rule and risk band (core/policy_engine.py, core/risk_scorer.py)
  • Unknown or unmapped actions default to require_approval (fail closed), never allow
  • Protected paths (.github/workflows/, config/, core/) always require approval
  • Human gate: pending approval surfaced as one actionable item (GitHub comment/label or Slack) with approve/deny; timeout = deny
  • Approval decisions emitted as audit events with approver, decision, correlation ID (Implement correlation IDs, idempotency, and structured audit events #319)
  • Dry-run remains the default; approval never bypasses dry-run

Dependencies

Risk

High — a policy bug either blocks all automation or silently allows destructive actions.

Test evidence required

  • Table-driven tests for every rule in config/policies.yaml plus unknown-action and protected-path cases
  • Test that timeout and malformed approval responses resolve to deny
  • Recorded dry-run of one gated action through approve and deny paths

Definition of done

  • Merged with tests; policy decision audit events visible
  • Protocol doc updated with the concrete one-step handoff
  • No existing auto-approved action changes behaviour without an explicit changelog entry
  • Evidence URL and Correlation ID recorded on the project item

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions