Idle leases: agent-device commands count as use and get the idle message
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 52/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
Read ADR 0094 §2–3 and the agent-device boundaries in src/agent-device/AGENTS.md, then inspect runCommand, agentDeviceRelayTarget, and the worker seam modeled by src/agent-device/edge-heartbeat.test.ts. Cover the listed B6 and B7 cases, including local and relayed commands and idle-ended leases. Done when pnpm test:changed and pnpm typecheck pass, and agent-device.mdx shows the idle message beside the existing one.
由索引模型根據 Issue 內容生成。
描述
Part of #1899.
Scope
An agent-device command on a lease counts as use on the worker, whether it comes from a local agent-device CLI or is relayed from a gateway, and holds the lease in use while it streams. A command on a lease that ended idle gets lease ended by simlock: its device was not used for the worker's idle limit; run disconnect, then open instead of reaching agent-device.
If it goes wrong, an agent working through agent-device loses its lease as idle, or an agent sees the wrong message after an idle end.
Technical spec
Commit 056e29880.
Rows
Behaviours: B6, B7
Stored state: S2
Interfaces: I5 (uses I2, I3)
Existing code: X9, X10, X11, X18 (agent-device.mdx:212)
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The same front is built on a gateway, where no worker module context exists | src/agent-device/gateway.ts:127-149, src/agent-device/front/edge-parts.ts:15-26 |
| F2 | The front tells commands from heartbeats, releases and allocates by the RPC's kind | src/agent-device/front/front.ts:51-54, :136-157 |
| F3 | A gateway routes a lease its index dropped for lease.maxTtlMs |
src/agent-device/front/relay-host-link.ts:67 (the gateway's lease.maxTtlMs bounds how long it routes a dropped lease) |
Modules touched
agent-device (worker parts, front runCommand, relay target, replies), website agent-device page. Searches: rg "runCommand|agentDeviceRelayTarget|leaseEndedByHost|LEASE_ENDED_MESSAGE|beforeDeviceReclaim" src/agent-device.
Rules in play
- ADR 0094 §2 and §3: agent-device commands are use; the gateway holds no idle clock.
src/agent-device/AGENTS.mdBoundaries: front map and the idle-ended set live in memory only; the edge imports nothing from the gateway.docs/internal/agent-rules/documentation.mdrule 9: agent-device.mdx names the idle message.
Tests
Seam: the agent-device worker with a fake upstream (createWorkerWith), model on src/agent-device/edge-heartbeat.test.ts.
- B6: an agent-device command restarts the clock and holds it while it runs: local command at 20 min; command streaming 10–45 min; relayed command; heartbeat; the gateway's front counts nothing.
- B7: a command on an idle-ended lease answers I5: ended
idlelocal and relayed; endedexplicit/expiredforwarded as today; idle id older thanlease.maxTtlMs; the 1025th idle end forgets the oldest.
Done when
pnpm test:changedandpnpm typecheckpass.- agent-device.mdx shows the idle message beside today's one.
Out of scope
- The idle clock, the
idlereason and the use port itself (#1907).
Depends on
- #1907
- #1906 (it also changes
routeCallandrunCommandinsrc/agent-device/front/front.tsand agent-device.mdx; it is ready first)
Written by an agent.
- 主要語言
- TypeScript
- 星號
- 730
- 分支
- 44
- 平均合併
- 16 小時 13 分鐘
- 30 天內合併 PR
- 387
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstackincubator/simlock 的其他 Issue
-
bug:new
難度 2/5 1-3 小時 新手友好度 69/100
callstackincubator/simlock#1986 ·
維護者通常 1 天內回覆
-
bug:new
難度 2/5 1-3 小時 新手友好度 76/100
callstackincubator/simlock#1979 · 1 則留言 ·
維護者通常 1 天內回覆
-
process-runner.test.ts fails four tests when a child starts 1 to 3 s late可能已有人在做 @V3RON 今天認領。 未關閉bug:new
callstackincubator/simlock#1985 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
bug:new
難度 3/5 1-2 天 新手友好度 74/100
callstackincubator/simlock#1984 · 1 則留言 ·
維護者通常 1 天內回覆
-
iOS runCommand passes timeoutMs to spawn, which ignores it, and its comment relies on that backstop未關閉bug:new
難度 3/5 1-2 天 新手友好度 57/100
callstackincubator/simlock#1980 · 1 則留言 ·
維護者通常 1 天內回覆
查看 callstackincubator/simlock 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
audacity/audacity.github.io#118 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
crxjs/chrome-extension-tools#1261 ·
-
Resources: Update work of fuzhou可能已有人在做 @rmt-svc 今天認領。 未關閉resources
難度 2/5 1-3 小時 新手友好度 64/100
railmapgen/rmp-gallery#4245 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
mike-north/AgentMonitors#717 ·
維護者通常 1 天內回覆