Repository navigation
desk-hub: an admin's machine removal bound to the machine's key (?ref=&pub=), for O8 M4b - #538
Merged
Merged
Conversation
…y (?ref=&pub=)
DELETE /api/machines/<name>?ref=<MachineRef>&pub=<key> removes the row only
while its enrollment's posted key (keepMachineKey) is that one. A row of
another enrollment's key, or of none, is answered {revoked: name} with
nothing of the name's touched, as revokeMachine's enrollment mismatch
already is, and the check is the same synchronous step as the fence. One
parameter alone, or either out of shape, is 400 bad-shape; neither keeps
today's removal of whatever holds the name (the CLI's).
For P5 O8 M4b: the app deletes a dropped machine's hub row once the drop
settles, which can be after another root enrolled the name anew. A key
names one machine across enrollments (a dropped key is retired or revoked
and never posted again), so the row the app means is the one with its key.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…ethod, so a Registry before it fails closed The key was a third argument of revoke(member, name); a Registry still on the code before it, reached by the new Worker during a deploy, would ignore the argument and remove whatever holds the name. revokeKeyed is a method that Registry lacks, so the call fails as hub-updating and the app asks again. revoke is as it was; the admin and unknown-machine checks are shared. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 8, 2026
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 8, 2026
…538, DL 254): DELETE /api/machines/<name>?ref&pub, revokeKeyed failing closed on an older Registry, for O8 M4b's drop Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 8, 2026
Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 8, 2026
…s, push-then-grant with final verdicts; live use needs wire 33 and a hub carrying #538; seven residue rows; the UX copy ticket (board 540) Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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.
For P5 O8 M4b. When an app's drop of a machine settles, the app deletes that machine's hub row, which can happen well after the drop was signed. If another root enrolled the name anew in between, today's
DELETE /api/machines/<name>would revoke the new enrollment's row and credential, because it revokes whatever holds the name when it lands.What changes
DELETE /api/machines/<name>?ref=<MachineRef>&pub=<key>removes the row only while its enrollment's posted key (keepMachineKey) is that ref and pub.200 {revoked: name}and touches nothing of the name's. This is the answerrevokeMachine's enrollment mismatch already gives (leave(), the offline sweep).revokeMachine's first synchronous step, before the fence at the Machine object, so nothing can land between the check and the act.400 bad-shape. With neither parameter, the route behaves as it does today (the CLI's removal).revokeKeyed, not a third argument ofrevoke. A deploy reaches the Durable Objects minutes after the Worker, and an older Registry would ignore an extra argument and remove whatever holds the name. It lacksrevokeKeyed, so the Worker's existingfailure()answers503 hub-updatingand the app asks again (review finding, fixed in 118d985).Why the key, and not the enrollment id. A key names one machine across enrollments:
retiredorrevoked, and it is never current again;keepMachineKeyposts no key that another ref holds, and no retired or revoked key;409 key-posted).So a row carrying the dropped key belongs to the dropped machine, whichever enrollment holds it.
Boundaries
machinesonly.Tests (
apps/desk-hub/test/org-enrollment.test.ts, 5 new):revokeKeyedanswers503 hub-updatingand touches nothing;org-boundaries.test.tsaddsrevokeKeyedto the stale-admin and removed-member calls.Making the key check always pass turns 2 of the new tests red. Locally, I ran only those two test files, one at a time. The gates run on CI.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)