Repository navigation
fix(daemon): status.get shows an agent only its own leases and queue entries - #893
Merged
Merged
Conversation
Contributor
Author
Review (maintainer's agent, round 1)No blocking findings.
Note, no change needed: the three one-off unit failures across the |
This was referenced Oct 23, 2026
V3RON
marked this pull request as ready for review
October 26, 2026 09:46
V3RON
force-pushed
the
security/status-own-leases
branch
from
October 26, 2026 10:29
68ac8fc to
0e26780
Compare
V3RON
force-pushed
the
security/status-own-leases
branch
from
October 26, 2026 14:25
3dcf077 to
bd03b8c
Compare
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 waiting request to any agent token, with other principals' lease, device and requester ids. Now a non-admin session sees only the leases and waiting requests its principal owns, the rulelease.listalready used. Admin sessions (local CLI, operator tokens, the console, a gateway's uplink) see everything, as before.Changes
src/daemon/dispatcher.ts:lease.listandstatus.getshare one owner filter;waitingkeeps requests whose recorded owner is the principal.src/gateway/dispatcher.ts: for a non-admin,status.get'sleasesuses the lease-index lookuplease.listuses, andwaitingis filtered by the coordinator's recorded owner. Other fields are unchanged.GET /v1/statusOpenAPI notes, four website pages, and the daemon and gateway manuals say so.Tests
src/daemon/dispatcher.test.tsandsrc/gateway/dispatcher.test.ts: one table each — admin, an agent with a lease and a waiting request, a proxy-style principal, an agent that owns nothing.Assumptions
waitinglist? — only the fleet-queue requests it owns; that list never held workers' queues.GET /v1/statusOpenAPI notes generate that page.Review
Spec review: skipped. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: skipped.
Rounds: 1. Tokens: n/a.
One combined review by the maintainer's agent on 2026-10-22 (comment below); no blocking findings.
Rebased onto
maine1f2f43 on 2026-10-26 as one commit. Conflicts:src/daemon/dispatcher.tskeeps main's newlease.getbeside this PR's#leasesForand#waitingFor; both newdispatcher.test.tstests kept.src/gateway/AGENTS.mdReads paragraph merges main'slease.get,workerLeaseIdandinbox.getwith this PR's filtering.remote-agents.mdxkeeps main'sGET /v1/leasesrow and adds this PR'sGET /v1/statusrow.Written by an agent.