-
-
Notifications
You must be signed in to change notification settings - Fork 39
feat(a2a): GPU lease protocol over the coordination bus (#893) #2988
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0dd39b4
feat(a2a): GPU lease protocol over the coordination bus (#893)
hognek b41fb7f
fix(a2a): GPU lease ownership checks, 400 on unparseable VRAM
hognek 5df3950
fix(a2a): post the RELEASE line before freeing the lease
hognek 3736b11
fix(a2a): address CodeRabbit review on the GPU lease surface
hognek 12ade19
chore(git): stop tracking the registry signing-key lock sidecar
hognek 4829cf5
fix(a2a): attribute an operator's GPU lease release to the freed holder
hognek eb92391
fix(a2a): expire the bus claim when the holder stops keeping alive
hognek 71a167a
fix(a2a): round the claim expiry up, pin its channel, roll back a fai…
hognek 4bbe24d
fix(cluster): keep a lease rollback from clobbering a newer renewal
hognek abfe524
fix(a2a): stop reading the body's holder as the admin's identity
hognek f1cfcca
fix(cluster): read a renewal's previous expiry under the lease lock
hognek 102fa59
fix(a2a): count a re-claimed reservation once, not twice
hognek acd9f72
fix(a2a): keep a repeated claim to the lease's original contract
hognek 8d59a6e
fix(a2a): undo a re-claim's extension when its repost fails
hognek b4615b8
fix(a2a): release the identified lease's node and channel, not the re…
hognek 35358e6
test(a2a): make the "different caller is blocked" block test a differ…
hognek 4f00a28
docs(a2a): state both lifetime limits of a hand-posted claim
hognek eab4f53
Merge branch 'dev' into feat/a2a-gpu-lease-protocol
jaylfc 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,43 @@ | ||
| ### 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: it has no time-based | ||
| expiry, so only a RELEASE closes it - though it is still limited by the fold | ||
| window (the newest 500 messages), so a long-lived one is reposted | ||
| periodically. | ||
|
|
||
| ### 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
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.
Uh oh!
There was an error while loading. Please reload this page.