Skip to content

feat(agents): persist bounded shared-task admissions - #112

Open
tee8z wants to merge 1 commit into
feat/shared-agent-policyfrom
feat/shared-agent-budget
Open

tee8z wants to merge 1 commit into
feat/shared-agent-policyfrom
feat/shared-agent-budget

Conversation

@tee8z

@tee8z tee8z commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Shared-agent handoffs need a durable limit across retries, concurrent managers, and Spot recovery. This layer adds atomic admission before a shared task can run.

The agent-signed, encrypted admit request verifies its saved launch identity, current channel grant, original signed messages, and current membership. It cannot change configuration, start or stop a provider, or return launch credentials.

A Kubernetes Secret in the initial agent owner's existing namespace records admissions with resourceVersion compare-and-swap. Each human-to-initial-agent task permits four handoffs and two admissions per agent. Identical retries are free. Records expire after seven days; expired signed requests cannot regain budget after cleanup. Each owner/community journal is bounded to 512 tasks and 900 KiB.

Depends on #110, above #101 and #108. Running delivery and shared wakeup are implemented in #113 and #114. This layer alone does not enable teammate tasks.

Validation: SDK and manager suites passed, as did all-target Clippy. Production-path tests cover concurrent reservations, replay, lost write acknowledgements, failed writes, expiry, parent forgery, budget exhaustion, namespace confinement, and attempts to use admission as lifecycle control. The complete two-owner workflow passed in #114 using the real relay, harness and CLI with a simulated model and Kubernetes API. Human acceptance and staging rollout remain pending. Existing session quotas and Spot capacity remain in use.

@tee8z tee8z self-assigned this Nov 3, 2026
@tee8z
tee8z requested a review from thebrandonlucas November 3, 2026 23:59
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 14 billable files and costs up to $3.50.

  • 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 3 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 50 included PR review attempts over the past 7 days set your current allowance at 2 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 7283e5a and 34d2984.

Files selected for processing: 14
  • crates/buzz-sandbox-reaper/src/main.rs
  • crates/buzz-sandbox-reaper/src/manager.rs
  • crates/buzz-sandbox-reaper/src/manager_tests.rs
  • crates/buzz-sandbox-reaper/src/manager_tests/shared.rs
  • crates/buzz-sandbox-reaper/src/mentions.rs
  • crates/buzz-sandbox-reaper/src/mentions/registry.rs
  • crates/buzz-sandbox-reaper/src/shared_budget.rs
  • crates/buzz-sandbox-reaper/src/shared_budget/tests.rs
  • crates/buzz-sandbox-reaper/src/shared_tasks.rs
  • crates/buzz-sdk/src/sharing.rs
  • crates/buzz-sdk/src/sharing/budget.rs
  • crates/buzz-sdk/src/sharing/budget/tests.rs
  • crates/buzz-sdk/src/sharing/policy.rs
  • crates/buzz-sdk/src/sharing/task.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Signed-off-by: Tee8z <tee8z@protonmail.com>
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