Skip to content

ACP: persist allow_always as a learned permission rule #3

Description

@JAORMX

What's missing

The ACP permission round-trip treats allow_always identically to allow_once — both map to a one-shot allow=true — so "allow always" doesn't actually persist anything. mecatl's governance has no learned-allow persistence.

Validated (independent cross-check):

  • approvalFor maps both permAllowOnce and permAllowAlways → true, with an explicit comment that allow_always "behaves as allow_once this phase — there is no rule persistence yet" (internal/adapter/acp/projector.go).
  • The verdict reaches the loop via run.Approve(askID, bool) — a pure one-shot bool that never re-enters the policy (internal/agent/loop.go, dispatch.go).
  • permpolicy.Policy wraps a governance.Evaluator built once over an immutable []governance.Rule; no Add/Save/learn method exists (internal/adapter/permpolicy/, internal/governance/evaluator.go).

Proposed approach

A governance rule-store seam that persists a learned allow (keyed by tool + scope/args) when the client picks allow_always, consulted by the permission policy on subsequent asks.

Caveat from review: the one-shot run.Approve(askID, bool) approval path must be widened to carry "persist this decision" (or the ACP adapter records the rule out-of-band keyed by tool+args) — a governance store alone isn't enough. Medium-large, security-sensitive.

Part of ACP Phase 3 long-tail (docs/adr/0001-acp-adapter.md).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions