-
-
Notifications
You must be signed in to change notification settings - Fork 39
SWEEP: privileged paths that take identity from a caller-supplied body field, then use it for ownership #2990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ### Added | ||
|
|
||
| - Shared-GPU coordination over the A2A bus (taOS #893). Agents sharing one card | ||
| can `GET /api/a2a/gpu/check` (folds the channel's open `[GPU CLAIM]`/ | ||
| `[GPU RELEASE]` messages into the claims still held and subtracts them from | ||
| the node's live free VRAM), then `POST /api/a2a/gpu/claim` for an | ||
| admission-checked claim that both registers a real cluster lease (TTL, kept | ||
| alive with `POST /api/a2a/gpu/renew`) and posts the `[GPU CLAIM]` line peers | ||
| read; `POST /api/a2a/gpu/release` frees it and `POST /api/a2a/gpu/request` | ||
| asks for a window when blocked. The cluster lease applies to nodes the | ||
| controller knows as cluster workers; a node it does not know is coordinated | ||
| over the bus alone (admission-checked and posted, with no local TTL). | ||
| Claiming refuses (409) on another holder's | ||
| open claim or insufficient VRAM, and CHECK/CLAIM return 503 rather than | ||
| reporting a node free when the bus cannot be read, so two agents can no | ||
| longer silently co-load past the card's VRAM. An agent posts as its own | ||
| registry identity (scope `a2a_receive` to check, `a2a_send` to act) and the | ||
| node label resolves to a cluster worker's heartbeat VRAM or the controller's | ||
| own shared VRAM ledger. | ||
| - Claims carry their own expiry. `POST /api/a2a/gpu/claim` publishes | ||
| `expires=<unix ts>` on the `[GPU CLAIM]` line (the backing cluster lease's | ||
| expiry, or the requested TTL for a bus-only node), rounded up so a published | ||
| expiry can never precede the lease it describes, and `POST /api/a2a/gpu/renew` | ||
| reposts that line as it extends the lease — on the channel the claim was made | ||
| on, since the channel is an input to the claim and never to its renewal. If the | ||
| repost fails the local extension is rolled back rather than leaving a lease | ||
| that peers have already seen lapse. The fold drops a claim whose published | ||
| expiry has passed, so a holder that crashed or stopped keeping alive no longer | ||
| blocks the shared card until its claim ages out of the fold window. A claim | ||
| posted by hand without an `expires=` is unchanged: bounded by a RELEASE alone. | ||
|
|
||
| ### Fixed | ||
|
|
||
| - Freeing another holder's GPU lease by explicit `lease_id` (the operator | ||
| override, `POST /api/a2a/gpu/release`) posts the `[GPU RELEASE]` line as the | ||
| **freed holder** rather than as the operator. A claim is keyed on its bus | ||
| author, so the old line cleared nothing: the local lease was gone while every | ||
| peer's fold still read the node as claimed, blocking a GPU that was actually | ||
| free. The response now distinguishes `holder` (who acted) from | ||
| `released_holder` (whose claim the line closes). |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### Fixed | ||
|
|
||
| - A2A GPU lease: the admin path in `_resolve_actor` no longer reads the request body's `holder=` field as the acting identity. `holder` is display text only; ownership is an identity match against the fixed `@operator` principal, so an operator cannot satisfy `_lease_owned_by` on an agent's `a2a:` lease by merely setting `holder` in the body. The explicit `lease_id` path and `_may_act_on` remain the sanctioned operator override. |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Separate local lease behavior from bus-fold behavior.
The documentation should state that manual and bus-only claims do not create local cluster reservations, but they still affect the bus fold and can expire through
expires=.docs/agent-coordination.md#L377-L378: replace “enforces nothing” with wording that limits the statement to local admission and lease enforcement.docs/agent-coordination.md#L382-L384: state that expiry or[GPU RELEASE]can remove a bus-only claim.📍 Affects 1 file
docs/agent-coordination.md#L377-L378(this comment)docs/agent-coordination.md#L382-L384🤖 Prompt for AI Agents