Conversation
…ENT-HOMES-001 PR-4) Adds the authorization half of agent homes: which agent may perform which capability against which target machine. Stacks on PR-3 (#15). Default deny: is_granted() returns false unless an active, non-revoked grant exists. require_capability() in the relay API is NOT relaxed by require_relay_membership -- an open relay still denies ungranted cross-machine actions. Revocation is a tombstone, not a delete, so revoked grants stay visible to list_grants() and the audit trail. Re-granting reactivates. Verified against real Postgres: 8/8 agent_capability_grants store tests 13/13 migration lint tests (tenant-scoping, fencing) buzz-audit action round-trip covers the 2 new variants fmt + clippy clean on buzz-db, buzz-audit, buzz-relay
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…nt-homes/pr4-capability-grants
…homes' into feature/agent-homes/pr4-capability-grants
…ithub.com/mfethe1/buzz into feature/agent-homes/pr4-capability-grants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #15 (PR-3). Base is the PR-3 branch — retarget to product/main after #15 merges.
What
The authorization half of agent homes: which agent may perform which capability against which target machine.
migrations/0048_agent_capability_grants.sql— tenant-scoped, community-fenced grant tablestore/agent_capability_grants.rs— grant / revoke / is_granted / list_grants +impl Dbmethodsapi/mod.rs::require_capability— relay-side gate returning 403capability_not_grantedcapability_granted/capability_revokedDesign decisions
is_grantedreturns false unless an active, non-revoked row exists.require_relay_membership. An open relay still denies ungranted cross-machine actions — unlikeenforce_relay_membership, which no-ops on open relays. Cross-machine execution is a strictly higher bar than reading a relay.list_grantsand the audit trail. Re-granting reactivates the row.Verification (real Postgres, not mocks)
all_non_operator_global_tables_have_not_null_community_idandscoped_primary_key_..._lead_with_community_id, which validate the new tablebuzz-auditround-trip test covers both new variantsReviewer note
Sensitive-path (authz) → Path B, review required per AGENTS.md.
require_capabilityhas no production call site yet — no cross-machine endpoint exists. I deliberately did not invent one; the gate lands with the model so the endpoint PR can consume it.