You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android quotes a 70 s boot for a 4 s snapshot restore #778
estimate() at src/drivers/android/index.ts:1347-1352 returns COLD_BOOT_ESTIMATE_MS for boot whatever the device's snapshot state; the 4 s figure is used only as a diagnostic threshold (:2038-2039).
makeReady boots from simlock_clean_baseline when the stored hash matches (src/drivers/android/AGENTS.md, "Boot" step 1).
What a user sees
A waiting requester is quoted estimatedBootMs: 70000 for a boot that takes seconds, and doctor's stalled-transition threshold for a snapshot boot is sized for a cold one (src/core/doctor.ts:1022), so a stuck snapshot boot is flagged late.
Found
Exploring the warm pool for #771 on 2026-10-20, at commit 97bc8ea.
Confirmed the quote mismatch. Per-device estimation is a gap; the reproduction proposes the input shape below.
Test-only commit, src/drivers/android/index.test.ts, “quotes a 4 s prepare boot for a persisted clean baseline and keeps unknown or recovery boots at 70 s”. It proves the snapshot launch after driver restart and checks both conservative controls before failing.
pnpm exec vitest run --project unit src/drivers/android/index.test.ts
expect(estimatedBootMs).toBe(4_000)
Expected: 4000
Received: 70000
289 passed, 1 failed, 1 skipped
Only fake platform ports ran; no hardware lane.
Root cause
Gap.src/core/driver.ts:152 defines boot estimation without device or purpose, and src/drivers/android/index.ts:1352 therefore returns the cold estimate unconditionally. The asynchronous baseline check at index.ts:2043 selects the snapshot only inside makeReady. Leasing discards device context when computing timing (src/leasing/lease-acquisition-coordinator.ts:1290) and progress (:1068). The generic cold estimate is conservative; the missing capability is quoting a known device's actual boot path.
Simplest fix
Extend boot estimation with optional device and purpose inputs, as proposed by the test. Share a read-only baseline decision with makeReady; resolve asynchronous reads outside serialized decisions and pass the result into lease timing and boot progress. Quote 4,000 ms only for a matching baseline on a prepare boot; retain 70,000 for unknown, cold, invalidated, wipe and recovery boots.
Alternatives rejected
Return 4,000 globally: underquotes cold and recovery boots.
Inspect Android metadata in core: violates architecture rules 1–2.
Risk
Check baseline invalidation and full-clean fallback after restart.
Keep estimate reads non-destructive and outside decision locks.
The reported doctor symptom is unconfirmed: src/core/doctor.ts:986–992 excludes shutdown devices and active claims; do not lower its thresholds globally.
Two gaps from the audit of PR #978, decided in delivery, pending the maintainer.
The Android boot estimate stays 70,000 ms for a device whose stored baseline hash does not match, a device with a wipe pending, and a physical spec; only a prepare boot from a matching baseline is quoted 4,000 ms (decided in delivery, pending the maintainer).
Tests: the 4 s prepare-boot test in src/drivers/android/index.test.ts gets those three cases as rows, each expecting 70,000 ms, at AndroidDriver.estimate.
doctor's stalled-transition threshold (src/core/doctor.ts) is left unchanged: it only prices a provisioning device, which has no baseline, and the triage report found the doctor symptom unconfirmed (decided in delivery, pending the maintainer).
Tests: none; no code change.
Merged: #978 (#778)
Parked: none
Waiting: none
Decided: #778 — what Android quotes for a boot that cannot use the baseline → 70 s for mismatched hash, wipe-pending and physical; doctor threshold left unchanged
Maintainer accepted both delivery choices: the 70 s quote stays for a mismatched baseline, a wipe-pending device and a physical spec, and doctor's stall threshold is unchanged.
Follow-up: #327 (Named baselines, ADR 0061) replaces the clean-baseline boot. Task #1205 sets the Android estimates for the new path: 1 s to provision a copy when a seed exists (150 s when it must be made first) and 4 s for a boot from the source's snapshot.
Activity
V3RON commentedon Oct 21, 2026
Reproduction
Confirmed the quote mismatch. Per-device estimation is a gap; the reproduction proposes the input shape below.
Test-only commit,
src/drivers/android/index.test.ts, “quotes a 4 s prepare boot for a persisted clean baseline and keeps unknown or recovery boots at 70 s”. It proves the snapshot launch after driver restart and checks both conservative controls before failing.Only fake platform ports ran; no hardware lane.
Root cause
Gap.
src/core/driver.ts:152defines boot estimation without device or purpose, andsrc/drivers/android/index.ts:1352therefore returns the cold estimate unconditionally. The asynchronous baseline check atindex.ts:2043selects the snapshot only insidemakeReady. Leasing discards device context when computing timing (src/leasing/lease-acquisition-coordinator.ts:1290) and progress (:1068). The generic cold estimate is conservative; the missing capability is quoting a known device's actual boot path.Simplest fix
Extend boot estimation with optional
deviceandpurposeinputs, as proposed by the test. Share a read-only baseline decision withmakeReady; resolve asynchronous reads outside serialized decisions and pass the result into lease timing and boot progress. Quote 4,000 ms only for a matching baseline on a prepare boot; retain 70,000 for unknown, cold, invalidated, wipe and recovery boots.Alternatives rejected
Risk
src/core/doctor.ts:986–992excludes shutdown devices and active claims; do not lower its thresholds globally.Written by an agent.
test(leasing): a shut-down device's boot progress and timing quote th…
V3RON commentedon Oct 24, 2026
Decision
Two gaps from the audit of PR #978, decided in delivery, pending the maintainer.
Tests: the 4 s prepare-boot test in
src/drivers/android/index.test.tsgets those three cases as rows, each expecting 70,000 ms, atAndroidDriver.estimate.doctor's stalled-transition threshold (src/core/doctor.ts) is left unchanged: it only prices a provisioning device, which has no baseline, and the triage report found the doctor symptom unconfirmed (decided in delivery, pending the maintainer).Tests: none; no code change.
Written by an agent.
test(android): a mismatched, wipe-pending or physical prepare boot ke…
fix(leasing): a rejecting device boot estimate falls back to the cold…
refactor(android): the boot estimate and makeReady read one baseline …
test(android): the restart tests script the second emulator -version …
V3RON commentedon Oct 24, 2026
Delivery run
Merged: #978 (#778)
Parked: none
Waiting: none
Decided: #778 — what Android quotes for a boot that cannot use the baseline → 70 s for mismatched hash, wipe-pending and physical; doctor threshold left unchanged
Written by an agent.
V3RON commentedon Oct 25, 2026
Maintainer accepted both delivery choices: the 70 s quote stays for a mismatched baseline, a wipe-pending device and a physical spec, and doctor's stall threshold is unchanged.
Written by an agent.
V3RON commentedon Nov 2, 2026
Follow-up: #327 (Named baselines, ADR 0061) replaces the clean-baseline boot. Task #1205 sets the Android estimates for the new path: 1 s to provision a copy when a seed exists (150 s when it must be made first) and 4 s for a boot from the source's snapshot.
Written by an agent.