Skip to content

A seed is copied from a throwaway simulator that is then deleted #1569

Closed

Description

@V3RON

Part of #1561.

Scope

After this PR, a seed is copied unbooted from a throwaway simulator that booted once in the device set and was then deleted with its log folder, so a seed never names its own folder; and saving a baseline deletes the saved-from lease's log folder. Copies still swap nothing (#1570 adds that); old seeds keep working as today.

If it goes wrong: the first lease of a kind fails to make its seed, a simlock-seed-… simulator stays behind in the device set or Xcode, or doctor reports it as an orphan.

Technical spec

Commit 0ca6059.

Rows

Behaviours: B1, B2, B3, B4
Stored state: S1, S5
Interfaces: I1
Existing code: X1 (the throwaway half), X2 (the log folder half), X4, X5, X6, X7 (version 3), X12 (logsRoot), X15, X17

Facts

# Fact Source
F1 bootAndWait takes the set to boot in as its fourth argument; #makeSeed passes the sources set today src/drivers/ios/simulator-boot.ts:26-31, src/drivers/ios/seeds.ts:327
F2 writeMark writes the erasable then the durable mark of a UDID in the driver's device set src/drivers/ios/marks.ts:57-70
F3 The filesystem port's rm deletes recursively and does not fail on a missing path src/ports/filesystem.ts:326-328

Modules touched

src/drivers/ios/ (seeds.ts, source-data.ts, index.ts listManaged, driver-options.ts, AGENTS.md), src/daemon/driver-discovery.ts. Searches: #makeSeed, #removeLeftover, #deleteSeedSimulator, listManaged, coreSimulatorRoot, disablePasteboardSync, removePasteboardPreference.

Rules in play

  • ADR 0076 §1 (on PR docs(adr): 0076 an iOS clone names only its own folders before its first boot #1564, branch feature/1561-adr, the bottom of this feature's stack): a source never boots; the throwaway and its log folder are deleted.
  • ADR 0048 and the iOS manual's device-set rules: under default the throwaway carries this instance's marks and is deleted with no --set; under simlock every call carries --set.
  • ADR 0001 §6: a throwaway is deleted only through the making row that names it, never as an orphan. Assumption: the making row names the throwaway before simctl create returns its UDID is stored, and safety rule 1 gains this one case beside sources (ADR 0076 §1 and safety.md rule 1 say so on PR docs(adr): 0076 an iOS clone names only its own folders before its first boot #1564) (decided in delivery, pending the maintainer). Tests: B3 pins it.
  • Architecture rule 11 (bounded waits): the throwaway's create, clone and delete keep today's limits.

Retired words

  • one cold boot to ready: the throwaway boots once; the seed itself never boots.

Tests

Seam: IosSimctlDriver with the fake filesystem and fake simctl, modelled on src/drivers/ios/index-seed-provision.test.ts and src/drivers/ios/index-save-source-lifecycle.test.ts.

  • B1: the first provision of a kind makes its seed from a throwaway: simlock set; default set (marks before the boot, clipboard sync off before the boot, pasteboard preference removed after the delete); boot fails; clone fails; throwaway delete fails; log folder delete fails; log folder absent.
  • B2: listManaged leaves out a throwaway a making row names: simlock set; default with a marked throwaway; a ready row.
  • B3: a restart mid-make: the first source read deletes the throwaway, its log folder, the seed clone and the row: throwaway only; throwaway and seed; throwaway already gone; this process's own stale making row.
  • B4: baseline.save deletes the saved-from lease's log folder: present; absent; delete fails; clone fails.

Done when

  • pnpm test:changed passes, and CI's pnpm check passes.
  • On a Mac with an iOS runtime: scripts/slow-e2e.sh e2e/slow-ios-smoke.test.ts e2e/slow-baseline.test.ts passes (a seed made from a throwaway under the lane's settings, and a baseline saved and copied).
  • src/drivers/ios/AGENTS.md (Seeds) says how a seed is made and that the throwaway and the saved-from lease's log folder are deleted.

Out of scope

Depends on

Written by an agent.

Activity

  1. added
    task:draftScope written; technical spec or its spec check missing.
    on Nov 15, 2026
  2. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:draftScope written; technical spec or its spec check missing.
    on Nov 15, 2026
  3. self-assigned this
    on Nov 15, 2026
  4. 28 remaining items

  5. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    #1619 was closed without merging. Claim released; the label is unchanged, so the next agent starts from the branch and the last handoff.

  6. self-assigned this
    on Nov 16, 2026
  7. V3RON commented on Nov 16, 2026

    @V3RON
    ContributorAuthor

    Handoff

    Done: built on the revised ADR 0076 (PR #1620, moved from task/1569-v2 to task/1569 with an ours merge, no force push). Audit fixed one test. Review: round 1 found an empty simctl create UDID reaching the log-folder delete (fixed, a UDID check before anything is recorded). Round 2 passed. CI's manual-size tests were red, so the iOS manual was cut to 7905 characters, and the claims fix-check passed. #1620 is ready, in stack #1564 → #1620.

    Not done: Done when 2, scripts/slow-e2e.sh e2e/slow-ios-smoke.test.ts e2e/slow-baseline.test.ts. Done when 1 waits for CI on 31359f6.

    Findings: none open. Two manual omissions are posted as review notes.

    Blocked on: the slow lane needs 15 GiB free and this Mac had 12.9 GiB. Free space, run the two files, then /deliver 1561.

    Written by an agent.

  8. added
    task:blockedAgent stopped on a blocker in its handoff. Maintainer re-adds the label it came from.
    and removed
    task:readySpec checked. An agent may implement it once its Depends on allow.
    on Nov 16, 2026
  9. removed their assignment
    on Nov 16, 2026
  10. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:blockedAgent stopped on a blocker in its handoff. Maintainer re-adds the label it came from.
    on Nov 16, 2026
  11. added a commit that references this issue on Nov 16, 2026
    f138adc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    task:readySpec checked. An agent may implement it once its Depends on allow.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions