Warm pool keeps a spare learned copy while its copies are held
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with evaluate in src/core/warm-pool/policy.ts and the listed cases for learned and configured kinds; the issue identifies these as the main planning seam. Then read task #1381 and ADR 0069, which define the chosen behavior. Done means all four completion conditions in #1381 are met, including the e2e cases in e2e/warm-pool-learned.test.ts.
索引モデルが issue の本文から書いたものです。
説明
Request: #1371
Problem
From #1371: once the warm pool has learned a baseline (demo, iOS), a lease of it starts in 0 s. But while that warm copy is leased, no spare copy boots. Releasing it and leasing again 2 s later boots a new copy (38 s). The capacity docs say the warm pool "keeps idle devices booted, so a lease starts without waiting for a boot".
The pool counts a learned kind's leased copies as copies it still has, because they used to come back ready on release. They no longer do: every simulator and emulator is destroyed after one lease. So while every copy of a kind is leased, the pool keeps none ready, and the next lease waits for a boot. Plain learned kinds behave the same way as baselines.
Who it is for
An agent, or a person, who leases the same kind of device again while another lease of that kind is still held. For example, a second agent asks for the demo baseline while the first agent still holds it.
Outcome
While the worker has room, a lease of a learned kind starts without waiting for a boot, also when every other copy of that kind is leased. While copies are leased, the pool keeps at least one spare ready, and never more than the busiest moment of the last 24 hours.
How it works for the user
sequenceDiagram
participant A as Agent 1
participant B as Agent 2
participant W as Worker
A->>W: lease --baseline demo
W-->>A: the ready copy, 0 s
W->>W: boots one spare copy (was: nothing)
B->>W: lease --baseline demo
alt room for the spare
W-->>B: the spare, 0 s
else no room (running limit, RAM)
W-->>B: waits for a boot, as today
end
Before:
$ simlock lease --platform ios --baseline demo --detach # copy 1 leased, 0 s
$ simlock lease --platform ios --baseline demo --detach
{"push":"progress","stage":"booting","etaMs":60000} # 38 s
After:
$ simlock lease --platform ios --baseline demo --detach # copy 1 leased, 0 s
$ simlock lease --platform ios --baseline demo --detach # the spare, 0 s
Examples
Copies of one learned kind kept ready. Peak: the most leases of that kind held at the same moment in the last 24 hours, at least 1.
| Peak | Leased now | Today | After |
|---|---|---|---|
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 3 | 1 | 2 | 2 |
| 3 | 3 | 0 | 1 |
| 3 | 0 (burst just ended) | 3 | 3 |
A configured target (warmPool.targets) is unchanged: it keeps its count ready, whatever is leased.
What could go wrong
- During a held burst a worker runs one more device per learned kind, so on a full worker another kind may be pushed out or reported short. Likely on small Macs; by design.
- If the spare is not booted, leases keep waiting for a boot as today. Users would see a lease time of tens of seconds where 0 s was expected.
Words used
- learned kind: a kind of device the warm pool keeps ready because it was leased, not because the config names it, e.g. iPhone 17 on iOS 26.0, or the
demobaseline. - peak: the most leases of one learned kind held at the same moment in the last 24 hours, at least 1, e.g. 3 after three agents held
demoat once. - spare: a ready, unleased copy of a learned kind, kept so the next lease does not wait.
Non-goals
- No change to configured targets, the budget (running limit, RAM, boot cap), displacement or which kinds are learned.
- No new config key, status field or event.
statuskeeps showing a learned kind's count as its peak. - Not the wording of
warmPool.enabledin the configuration reference; that is #1373.
Completion conditions
- With a learned kind of peak 1 whose only copy is leased, the pool plans one new copy of it.
- With a learned kind of peak 3 and three copies leased, the pool plans one new copy, not three.
- On a worker with room for two devices, a second lease of a kind made while the first is held is granted warm.
- The capacity and how-it-works pages say a spare is kept while copies are leased.
Open questions
none
Decisions
- ADR 0069 — A learned kind keeps one ready copy while its copies are leased (PR #1378): a learned kind keeps
max(peak − leased, 1)ready, replacing ADR 0038 §2's "leased and reclaiming copies count as had".
Shared values
none
Behaviours
| Behaviour (invoker, action, what it sees) | Seam | Cases | Task |
|---|---|---|---|
A warm pool pass over a learned kind plans enough copies to keep max(peak − leased, 1) ready, counting copies on their way, for a plain kind and a baseline kind alike |
evaluate in src/core/warm-pool/policy.ts |
peak 1, 1 leased → 1 new; peak 1, 1 reclaiming → 1 new; peak 1, 1 ready under a claim → 1 new; peak 3, 3 leased → 1 new; peak 3, 2 leased + 1 reclaiming → 1 new; peak 3, 1 leased + 1 ready → 1 new; peak 3, 3 leased + 1 boot in flight → none; baseline kind demo peak 1, 1 leased → 1 new; baseline kind demo peak 2, 2 copies of version 1 leased while version 2 is newest → 1 new |
#1381 |
| A pass over a kind both configured and learned plans the larger of what each count lacks | evaluate |
configured 1 + learned peak 2, 1 leased, 0 ready → 1 new; configured 2 + learned peak 1, 1 leased, 0 ready → 2 new | #1381 |
| A worker with no targets and room for a second device, holding a lease of a kind, grants the next lease of that kind warm, and after a release makes a new ready copy in place of the deleted one | withDaemon with the fake iOS driver script, e2e/warm-pool-learned.test.ts |
first lease held → a second ready copy appears and a second lease is granted warm while the first is held; first released → a new ready copy of the kind, not the released device |
#1381 |
Tasks
- #1381 A learned kind keeps one ready copy while its copies are leased — the next lease of a learned kind no longer waits for a boot while its other copies are held. Risk: one more running device per kind during a burst.
Completion conditions: all four by #1381.
Open work in the same area:
- #1373 (bug, configuration reference wording of
warmPool.enabled): another page and line; no Depends on. - #1363 / PR for ADR 0068 (memory pressure pauses warming): pauses passes, does not change the learned count; no Depends on.
- #1143, #1144 (runtime warm targets, ADR 0056): change configured targets only; no Depends on.
Written by an agent.
- 主要言語
- TypeScript
- スター
- 535
- フォーク
- 21
- 平均マージ
- 9時間 10分
- マージ済み PR(30日)
- 454
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/simlock のほかの issue
-
os:windows request:new
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
callstackincubator/simlock#1071 ·
メンテナーはふだん 1 日以内に返信
-
A learned kind keeps one ready copy while its copies are leased対応中かも @V3RON が今日担当しました。 オープンtask:blocked
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
callstackincubator/simlock#1381 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
request:new
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
callstackincubator/simlock#1372 ·
メンテナーはふだん 1 日以内に返信
-
bug:new
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
callstackincubator/simlock#1371 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
task:ready
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
callstackincubator/simlock#1365 ·
メンテナーはふだん 1 日以内に返信
callstackincubator/simlock の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
lingdojo/kana-dojo#33701 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rookslog/zlibrary-mcp#408 ·
メンテナーはふだん 1 日以内に返信
-
mp4box.js — 20-byte `sgpd` box with large `entry_count` causes unbounded loop and heap OOM abortオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
mastra-ai/mastra#29641 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信