Skip to content

feat: add governed agent approval loop - #13

Merged
fly1d merged 2 commits into
mainfrom
codex/governance-loop
Aug 11, 2026
Merged

feat: add governed agent approval loop#13
fly1d merged 2 commits into
mainfrom
codex/governance-loop

Conversation

@fly1d

@fly1d fly1d commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Outcome

Deliver the first framework-neutral governance loop:

  • register and inspect agents
  • activate or pause an agent with optimistic revision checks
  • allow only active agents to request approval
  • decide human approvals exactly once
  • query append-only audit events
  • keep persistence behind an owned store protocol

The bundled adapter is explicitly development-only: state is process-local and actor identity is not yet authenticated.

Evidence

  • Focused tests added or updated
  • make check passes: 22 tests, 100% coverage
  • Compatibility impact reviewed: additive v1 endpoints and schemas
  • Monitoring or audit impact reviewed: every mutation emits an audit event
  • Python 3.11 container HTTP smoke: inactive denied -> active -> approve -> audit
  • OpenAPI contract generation verified: 10 paths
  • Review finding fixed in 3354684: inactive agents can no longer request approval

Risk

  • Level: medium
  • Failure mode: process restart loses in-memory state; unauthenticated callers can self-assert actor identity; duplicate client retries are not yet idempotent
  • Rollback plan: revert this PR; existing health and AgentSpec validation endpoints remain unchanged

Release notes

Added the first agent registration, lifecycle, human approval, and audit API loop.

@fly1d fly1d left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second-pass code review complete: no remaining findings. The initial review identified that inactive agents could request approvals; commit 3354684 closes that gap with a fail-closed 409 response and unit, API, and container-level evidence. The store boundary, optimistic revisions, single-decision approvals, structured failures, and explicit non-production limitations are coherent. Both CI checks pass.

@fly1d
fly1d merged commit 7ccba3c into main Aug 11, 2026
2 checks passed
@fly1d
fly1d deleted the codex/governance-loop branch August 11, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant