Daemon: refuse leased requests that name no session at request admission

Aperta
#4,171 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@airowe ci sta già lavorando.

Dal 2/11/2026.

  • #4177 di @airowe — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start in packages/daemon/src/server/http/http-rpc-methods.ts around line 48, where a missing session is defaulted, and in packages/daemon/src/sessions/request-admission.ts around line 48, where the tenant-scoped default is built. Record whether the caller supplied a session before the default is applied. Done means an unnamed lease.allocate, and an unnamed leased command, are refused with REMOTE_SESSION_REQUIRED before allocation or dispatch, while named requests and daemons without a lease provider behave as before. Check the existing real-daemon tests for the session and lease paths, since the issue asks for the new tests to run against a real daemon. Linked PR #4177 is already open, so coordinate with it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug ready-for-agent

Follow-up from #3931 and #4159.

#4159 makes the CLI refuse every command on a leased remote connection unless it names a session (--session, AGENT_DEVICE_SESSION or config). The rule is enforced in the CLI, though. A review of #4159 found that direct daemon RPC callers are not covered: a request with no session becomes default, then <tenant>:default (packages/daemon/src/server/http/http-rpc-methods.ts:48, packages/daemon/src/sessions/request-admission.ts:48). Against an isolated real daemon, an unnamed authenticated agent_device.lease.allocate allocated a proxy lease, and unnamed leased commands reached normal dispatch.

Required behavior

  • Daemon request admission records whether the caller supplied a session before it defaults one.
  • A request that would allocate, use or release a lease from a lease provider, with no caller-supplied session, is refused with the same typed reason (REMOTE_SESSION_REQUIRED) before allocation or dispatch.
  • Requests with no lease provider are unchanged.
  • Tests run against a real daemon: an unnamed lease.allocate is refused, an unnamed leased command is refused, and named requests are unaffected.
Lingua principale
TypeScript
Stelle
5.2k
Fork
359
Merge medio
13h 23m
PR unite (30g)
655

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstack/agent-device

Tutte le issue di callstack/agent-device

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.