A lease renew right after a gateway restart answers UNKNOWN_LEASE and the client drops the lease
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with the lease lookup in src/gateway/lease-index.ts and the rebuild flow in src/gateway/fleet-coordinator.ts; then read ADR 0005 §§16 and 30 and the renewal policy in src/lease-policy/index.ts. Check how the proposed rebuilding-window behavior fits the reported fixed 60-second fallback and known-worker persistence in src/gateway/drain-store.ts. Done means a renewal during rebuild gets a retryable WORKER_UNREACHABLE response and the client keeps the lease.
索引モデルが issue の本文から書いたものです。
説明
What happened
After a gateway restart (including a self-update), a lease.renew that arrives before the lease's worker has reported answers UNKNOWN_LEASE. The gateway looks every id up only in its lease index, which is empty until each worker reports (src/gateway/lease-index.ts:14-20, src/gateway/fleet-coordinator.ts:1410-1418). CLI and MCP renewal treat UNKNOWN_LEASE as final (src/lease-policy/index.ts:187-189) and drop the lease.
The device stays held on the worker until its TTL. Once the index is rebuilt, the requester's next lease request is refused with REQUESTER_ALREADY_LEASED, naming the orphan.
What you expected
ADR 0005 §16 and §30: clients "simply resume renewing" after a gateway restart. A renew in the rebuild window gets a retryable error (WORKER_UNREACHABLE), and the lease survives.
How to reproduce
- Gateway with one worker; an agent leases a device through the gateway.
- Restart the gateway (or let it self-update).
- Renew the lease within roughly 15–40 s, before the worker's first report:
UNKNOWN_LEASE, and the client drops the lease.
Environment
main at 7a2f0b33a. Found by reading code in the #412 review, not by a user report.
Logs and evidence
From the #412 review, finding R1. Proposed fix there: answer WORKER_UNREACHABLE for an id the index does not hold while the fleet is rebuilding. The window ends when every known worker has reported. ADR 0005 decision 5 says known worker ids are persisted, but only drained ids are (src/gateway/drain-store.ts:20). The fallback is a fixed 60 s window. The same window also fixes R3, R5 and R8.
Written by an agent.
- 主要言語
- TypeScript
- スター
- 22
- フォーク
- 2
- 平均マージ
- 7時間 38分
- マージ済み PR(30日)
- 413
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/simlock のほかの issue
-
bug:ready
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstackincubator/simlock#639 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
iOS simulators can live in Xcode's device set (drivers.ios.deviceSet)対応中かも @V3RON が今日担当しました。 オープンtask:blocked
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
callstackincubator/simlock#968 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
feature:planned
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstackincubator/simlock#962 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
request:new
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstackincubator/simlock#948 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
request:new
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstackincubator/simlock#946 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
callstackincubator/simlock の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4398 ·
メンテナーはふだん 1 日以内に返信
-
Xiaomi Mimo语音识别服务异常オープンpending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823オープンbug dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AxaFrance/design-system#2064 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100