Skip to content

feat(sharing): judge a live delegated gateway as its owner - #191

Merged
tee8z merged 1 commit into
tee8z/mention-recovers-ended-sessionfrom
tee8z/gateway-acts-as-owner
Nov 13, 2026
Merged

tee8z merged 1 commit into
tee8z/mention-recovers-ended-sessionfrom
tee8z/gateway-acts-as-owner

Conversation

@tee8z

@tee8z tee8z commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Application stack block#197: #179 → #182 → #187 → #191 → #180 → #186 → #189 → #188 → #194 → #196. Merge from the bottom upward.

Problem and behavior

Paseo prompts use a delegated gateway key. Shared-task admission previously rejected handoffs rooted in those prompts.

A managed daemon gateway now receives its owner's sharing verdict while that owner's grant remains live. This includes teammates' agents shared in the channel. Unshared agents remain denied. The gateway must retain posting membership.

Authority requires two records: the manager's configured developer Secret binds the gateway to an owner, and that owner's current delegation grants access. Relay claims from other members cannot reclassify a human key, claim a gateway, or make it ambiguous. Generic gateways retain their independent permissions.

Task budgets use the owner identity. Receipts preserve the actual signer. Revoked, expired, displaced, or mismatched managed gateways receive permanent denials. Infrastructure failures remain retryable. Admission logs identify the failing stage without logging content or secrets.

This intentionally extends #150's sharing restriction, as requested: the managed Paseo gateway can invoke the same shared agents as its owner.

Validation

  • cargo fmt --all -- --check and git diff --check: passed.
  • cargo clippy -p buzz-sdk -p buzz-sandbox-reaper -p buzz-acp --all-targets -- -D warnings: passed.
  • cargo test --no-fail-fast -p buzz-sdk -p buzz-sandbox-reaper -p buzz-acp: passed; SDK 355, manager 161, harness library 1,135, plus executable tests.
  • Production policy and fake-relay/Kubernetes journeys cover owner-equivalent direct prompts and handoffs, shared teammates, unshared targets, revocation, expiry, missing profiles, failed reads, and attacker-authored delegations.
  • Prior mutation checks detected disabled gateway mapping, bypassed lookup confirmation, and restoration of the old blanket refusal.

Remaining verification

No live local-relay or staging handoff has been exercised with this revision. Live staging confirmation remains part of the rollout checklist.

Stacked on #187, which owns ended-thread checkpoint recovery. Deploy the manager image before testing delegated handoffs.

Combined stack check

The current combined source passed CLI (569), SDK (359), manager (166), and Kubernetes backend (226) library tests, executable tests, and scoped Clippy. The full just ci attempt passed workspace Rust lint and stopped at missing desktop gio-2.0 dependencies. Live staging checks remain for rollout.

@tee8z tee8z self-assigned this Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 15 billable files and costs up to $3.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 31 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 3 included reviews currently available. Your 49 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 94ed03f and fc2ccc6.

Files selected for processing: 15

  • crates/buzz-acp/src/gateway.rs
  • crates/buzz-sandbox-reaper/src/enroll.rs
  • crates/buzz-sandbox-reaper/src/manager.rs
  • crates/buzz-sandbox-reaper/src/manager_tests/paseo_shared.rs
  • crates/buzz-sandbox-reaper/src/paseo.rs
  • crates/buzz-sandbox-reaper/src/shared_budget/tests.rs
  • crates/buzz-sandbox-reaper/src/shared_tasks.rs
  • crates/buzz-sdk/src/gateway.rs
  • crates/buzz-sdk/src/sharing/budget/tests.rs
  • crates/buzz-sdk/src/sharing/policy.rs
  • crates/buzz-sdk/src/sharing/policy/gateway_tests.rs
  • crates/buzz-sdk/src/sharing/policy/tests.rs
  • docs/agent-gateway-key.md
  • docs/remote-agents.md
  • docs/shared-channel-agents.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tee8z
tee8z force-pushed the tee8z/gateway-acts-as-owner branch from dbdb720 to 3842087 Compare November 13, 2026 17:48
Shared-task admission refused every handoff that a Paseo gateway prompt
started. The policy followed the ancestry to the gateway-signed root,
found no kind:0 profile and returned Unavailable, so the target agent
posted "shared task admission unavailable; retry or recover this task"
and the manager answered shared_task_retry forever. With a profile, the
manager's managed-key check (#150) denied the task instead.

The sharing policy now maps a requester or original-request author that
one owner currently delegates as a gateway to that owner, and runs every
check on the owner: profile, workspace and channel membership, sharing
grants, ancestry and the handoff budget. The gateway must also remain a
posting channel member, and a gateway workflow counts only as a literal
scheduled prompt. Task records the gateway beside the owner human, so
the budget belongs to the owner and receipts keep the actual signer.

buzz_sdk::gateway gains lookup(), the owner-window delegation read that
buzz-acp's GatewayAccess now shares, and delegator(), which finds the
one owner that names a key and confirms it with lookup(). A key named by
more than one live owner is refused.

check_shared_human now admits a managed daemon key only as the verified
live gateway and refuses one that is no longer delegated. A missing
profile is a permanent denial, not a retry. The manager logs the failing
admission stage and reason for every refusal.

This intentionally reverses #150's rule that managed Paseo gateways
never use sharing permissions, as approved by Taylor.

Signed-off-by: Tee8z <tee8z@protonmail.com>
@tee8z
tee8z merged commit bbd310d into main Nov 13, 2026
82 checks passed
@tee8z
tee8z deleted the tee8z/gateway-acts-as-owner branch November 13, 2026 18:38
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.

2 participants