Skip to content

slow-ios-smoke comment says the warm pool keeps the released simulator only until idle.shutdownAfterMs #1095

Closed

Description

@V3RON

e2e/slow-ios-smoke.test.ts:198 says the released simulator stays Booted because "the warm pool only demotes after idle.shutdownAfterMs, which defaults far longer than this test". Since #792 (af224ef) the learned warm pool keeps a leased kind's device ready past idle.shutdownAfterMs too (src/core/warm-pool/converger.ts:309 targeted(), skipped by src/core/cleanup/idle-shutdown.ts:9), so the comment names the wrong reason. Found while triaging #1087.

Written by an agent.

Activity

  1. added
    bug:new
    on Oct 30, 2026
  2. self-assigned this
    on Oct 31, 2026
  3. V3RON commented on Oct 31, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Confirmed. This is a defect in a comment, not in code, so no failing test is possible and no bug/1095-repro branch was pushed. The behaviour that makes the comment false already has a passing fast-lane test; a second one would break testing rule 7:

    e2e/capacity-cleanup-nuke.test.ts:137
    "keeps an idle device of a leased kind out of cleanup and its --dry-run preview, and nuke touches only registry devices"
      idle.shutdownAfterMs: 200, one lease, release, cleanup, wait 500 ms, cleanup -> device still "ready"
    

    The smoke test runs on the defaults: e2e/helpers/ sets no warmPool or idle overrides, so warmPool.learn is true (src/core/warm-pool/config.ts:47) and idle.shutdownAfterMs is 10 min (src/core/config.ts:937).

    Root cause

    Defect, in a comment: e2e/slow-ios-smoke.test.ts:198-199. It says the pool "only demotes after idle.shutdownAfterMs". Since #792 (af224ef), the leased kind is learned and WarmPoolConverger.targeted() (src/core/warm-pool/converger.ts:309) returns its device. idleShutdownRule then skips it (src/core/cleanup/idle-shutdown.ts:9), so it stays ready even after shutdownAfterMs. In this test the 10-min default is also longer than the test, so the assertion holds for both reasons. The comment's "only" is false.

    Simplest fix

    Reword the comment and leave the code as it is:

    // Still Booted: the warm pool learned this kind from the lease and keeps
    // its device ready past idle.shutdownAfterMs.

    Alternatives rejected

    • Set warmPool.learn: false in the smoke test so the old comment is true: this changes what the slow test covers just to suit a comment.
    • Delete the comment: the reader would lose why the device stays Booted after release.
    • Add a test: e2e/capacity-cleanup-nuke.test.ts:137 already proves the claim.

    Risk

    • Only a comment changes. The comment lint (architecture rule 17) must accept the new wording. No slow-lane run is needed.

    Written by an agent.

  4. removed their assignment
    on Oct 31, 2026
  5. added
    bug:ready
    and removed
    bug:new
    on Oct 31, 2026
  6. self-assigned this
    on Oct 31, 2026
  7. added a commit that references this issue on Oct 31, 2026
    72535d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions