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

オープン
#4,171 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@airowe がすでに取り組んでいます。

2026年11月2日 から。

  • #4177 @airowe による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
5.2k
フォーク
359
平均マージ
13時間 31分
マージ済み PR(30日)
664

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。