Skip to content

Add Policy Fabric admission scaffold#11

Merged
mdheller merged 2 commits intomainfrom
work/policy-fabric-admission
Apr 30, 2026
Merged

Add Policy Fabric admission scaffold#11
mdheller merged 2 commits intomainfrom
work/policy-fabric-admission

Conversation

@mdheller
Copy link
Copy Markdown
Contributor

Summary

Adds a dependency-free Policy Fabric admission scaffold for AgentTerm.

This PR implements the first tested policy-admission boundary for issue #3 without claiming live Policy Fabric service integration yet.

It adds:

  • PolicyDecision model.
  • PolicyFabricBackend protocol.
  • InMemoryPolicyFabricBackend for tests and local development.
  • PolicyFabricAdapter with allow/deny/pending/unknown semantics.
  • Fail-closed behavior for side-effecting events and sensitive context release.
  • Tests for non-sensitive events, missing decisions, allow decisions, deny decisions, pending decisions, explicit policy actions, and sensitive-context flags.

Boundary decisions

  • AgentTerm remains the operator surface and event log.
  • Policy Fabric remains the authority for action admission, denial, obligations, and sensitive context-release posture.
  • Missing, pending, or deny decisions fail closed.
  • This does not add live network integration yet; it creates the contract and test harness for that next step.

Validation

Expected CI:

ruff check .
pytest

Part of #3.

@mdheller mdheller merged commit 4d37e55 into main Apr 30, 2026
1 check passed
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