Repository navigation
Conversation
…entries An agent token's status.get listed every lease and every waiting request, with other principals' requester ids. Both dispatchers now filter leases and waiting the way lease.list already does; admin sessions see all.
Contributor
Author
Review (maintainer's agent, round 1)No blocking findings.
Note, no change needed: the three one-off unit failures across the |
V3RON
added this pull request to stack #897
October 23, 2026 06:19
# Conflicts: # src/daemon/AGENTS.md # website/src/content/docs/docs/reference/cli.mdx
This was referenced Oct 23, 2026
This branch has not been deployed
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.
Summary
status.getis an agent operation, and it returned every lease and every waiting request to any agent token, with other principals' lease ids, device ids and requester ids. Now a non-admin session sees only the leases its principal owns and only the waiting requests it owns, the same rulelease.listalready used. Admin sessions see everything, as before. That covers the local CLI (admin.token), operator tokens, the console, and the gateway's uplink to a worker, which the worker accepts as admin.Changes
src/daemon/dispatcher.ts:lease.listandstatus.getshare one owner filter (#leasesFor).status.get'swaitingkeeps only the requests whose recorded owner (queue.pendingRequestOwner) is the session principal.src/gateway/dispatcher.ts: for a non-admin session,status.get'sleasescomes from#ownedFleetLeases(the lease-index lookuplease.listuses, so a worker's own local lease never matches), andwaitingis filtered bycoordinator.pendingRequestOwner.devices,capacity,workers,queueDepthand the other fields are unchanged.src/http/route-declarations.ts: theGET /v1/statusOpenAPI notes say an agent token sees only its ownleasesandwaiting.remote-agents.mdx(newGET /v1/statusrow under "More calls"),reference/cli.mdx(simlock status),lease-lifecycle.mdx("See what you hold"),gateway/access-control.mdx(the agent role row).src/daemon/AGENTS.md(dispatch step 4) andsrc/gateway/AGENTS.md("Reads").Tests
src/daemon/dispatcher.test.ts: a new table test. Admin sees both leases and both waiting requests. An agent with a lease and a waiting request sees only those. A proxy-style principal whose request waits under another requester id sees that request. An agent that owns nothing gets empty arrays, not an error. The existing "status.get waiting matches list.get requests" test now reads status as admin.src/gateway/dispatcher.test.ts: the same table over gateway-issued leases, a worker's local lease, and fleet-queue requests.toEqualbefore the fix.pnpm test:changed: 1781/1782 passed. The failing test was a different timing test on each of three runs (device.execchunking against a real process,usage.getand a CLI startup timeout), at load average ~27; each passes when its file is run alone (src/daemon/dispatcher.test.ts190/190,src/cli/index.test.ts375/375).check-openapi.mjs: ok (30 operations).pnpm test:console --project=chromium: 208 passed; 1 failed,actions.spec.ts"a worker is drained from Fleet with no dialog, and Undo undrains it", which is the known flaky test Console e2e: a worker is drained from Fleet with no dialog, and Undo undrains it fails on the row's drained text #886.Assumptions
waitinglists only fleet-queue requests it owns. That list already held only the gateway's own queue, not workers' queues.GET /v1/statusOpenAPI notes count as the HTTP API reference page, because that page is generated from the route declaration.Written by an agent.