Skip to content

feat(authority): enforce delegated capability sets - #673

Merged
jhrozek merged 23 commits into
mainfrom
feat/authority-evaluator-clean
Aug 21, 2026
Merged

jhrozek merged 23 commits into
mainfrom
feat/authority-evaluator-clean

Conversation

@jhrozek

@jhrozek jhrozek commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #371.

This adds a durable, monotone delegated-authority boundary behind port.AuthorityEvaluator:

  • A root session carries a capability set minted from its composed catalog. Each child receives only the intersection of its parent, runtime posture, an eligible explicit specialist ceiling, and any call-level narrowing, then spends one delegation hop.
  • Authority is persisted through snapshots and event reconstruction. A resumed child must still fit its current parent and cannot spend another hop.
  • Every bound tool call is independently checked at the execute boundary. Tool disclosure is guidance only; stale or forged calls cannot bypass evaluation.
  • MCP meta-calls are authorized against their concrete target, for example mcp__github__list_issues. Filesystem policy receives a normalized physical target rather than raw arguments.
  • local is the default exact-set evaluator; noop is an explicit opt-out; opt-in Cedar can add operator-owned denials but cannot grant an omitted capability.

Compatibility

Normal main-session tools continue to work: root authority is minted from the same assembled catalog. The notable migration case is an explicit specialist with an inline-only MCP server: its tool was not carried by the parent root, so local now denies it. Move that server into the main configured MCP catalog and reference it from the specialist, or use --authority-evaluator=noop temporarily while migrating.

Documentation

  • ADR 0234 records the decision.
  • The agent-loop architecture guide now explains root minting, attenuation, execution enforcement, evaluator modes, Cedar boundaries, and MCP targeting.
  • The public permissions guide adds deployer configuration, agent-definition examples, Cedar policy guidance, and a rollout checklist.

Verification

  • cd engine && go test ./governance ./port ./session ./tool ./agent ./adapter/authorityconformance ./adapter/localauthority ./adapter/noopauthority ./adapter/sessnap ./adapter/eventsource ./adapter/memfs
  • go test ./internal/app ./internal/adapter/cedarauthority ./cmd/mecated
  • task api:check
  • task docs

internal/adapter/server retains the known flaky TestFireDelivery_Scenario6_RemoteTUIRendersDeliveryLive temp-directory cleanup failure; it is unrelated to this change.

@jhrozek
jhrozek force-pushed the feat/authority-evaluator-clean branch 2 times, most recently from 41faf3d to a81978e Compare August 20, 2026 13:13
@jhrozek
jhrozek force-pushed the feat/authority-evaluator-clean branch from a81978e to 282b330 Compare August 20, 2026 15:06
jhrozek and others added 21 commits August 20, 2026 21:51
@jhrozek
jhrozek force-pushed the feat/authority-evaluator-clean branch from 282b330 to a02cbf4 Compare August 20, 2026 19:56
@jhrozek
jhrozek merged commit 68bf0e6 into main Aug 21, 2026
19 checks passed
@jhrozek
jhrozek deleted the feat/authority-evaluator-clean branch August 21, 2026 07:26
jhrozek added a commit that referenced this pull request Aug 24, 2026
…744)

The hole: two jsonlstore tests expected the store root to be
symlink-resolved. `normalizeStoreRoot` has only ever called
`filepath.Abs` — absolute plus lexical Clean, no symlink resolution —
and #673 changed no production line in this package; it edited test
files only, running `filepath.EvalSymlinks` over the *expectations*.
On Linux `t.TempDir()` is already canonical so the two agree and CI
stays green. On macOS `/var` is a symlink to `/private/var`, so
`TestStoreNormalizesRootAndConfinesInventoryNames` and
`TestSessionStorageContinuity_Scenario1_AtomicCrashRecovery/temporary
_replacement_shares_destination_directory` both fail on `main`.

The fix: revert both expectations to the un-resolved path, which is
what the store actually produces, and document the invariant on
`normalizeStoreRoot` so a future macOS flake is not "fixed" by
swapping in EvalSymlinks on the production side.

The invariant preserved: the store root is the path the operator
configured, normalized lexically. Every resolver-derived path,
flock identity and diagnostic hangs off it, so resolving symlinks
there would silently rewrite all of them.

Proof: the two tests above now pass on macOS and remain unchanged in
meaning on Linux — they assert `filepath.Abs` semantics directly.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.

An agent cannot widen its own authority

1 participant