Skip to content

feat(ios): a leased simulator's stored paths name only its own folders before its first boot - #1585

Closed
V3RON wants to merge 24 commits into
task/1569from
task/1570
Closed

V3RON wants to merge 24 commits into
task/1569from
task/1570

Conversation

@V3RON

@V3RON V3RON commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1570

Status

Implement: build, audit, fix, hardware-fix done at 2c01e72 Review: round 2 passed; fix-check R9 open (cap reached) Hardware: lines 3–4 pass, line 5 two-device open and Android boot timeouts at load 187–294 Gate: waiting for the stack
Next: a maintainer decides R9 (amend ADR 0076 §2 to allow the cap, or index files over 64 MiB in chunks); then fix, fix-check and the slow lane's slow-agent-device.test.ts on a quiet machine

  • code: src/drivers/ios/source-index.ts:71 R9 a file over 64 MiB is never indexed or swapped, so a copy keeps naming the source's folders [ADR 0076 §2] behavior, test-logic

Assumptions

  • Assumption: logsRoot and sqlite are optional driver options — the 36 existing create calls stay as they are; the daemon passes both, and without them no log folder is swapped and a WAL is logged as unflushed.
  • Assumption: a source folder that is not on disk when it is indexed holds nothing to record — simctl is faked in most tests, and a real make always leaves the folder.
  • Assumption: a JSON file with \/ separators whose foreign and own folder paths have different component counts changes length and is refused (the spec's "another length" case); under default this is a failed provision for that file.
  • Assumption: the I6 line counts the files and links whose bytes changed, not those examined.
  • Assumption: ios_source_files rows are kept with a seed by e2e/helpers/lane-home.ts through a generic child-table list, since F4 says only the S4 column came with the row.
  • Assumption: files macOS refuses (EPERM, EACCES) are left out of the index and never swapped — the simulator's own daemon writes them (hardware loop).
  • Assumption: a file over 64 MiB is logged and left out of the index (hardware loop; review R9 holds it against ADR 0076 §2, open).
  • Assumption: the lane test takes a seed's making as its newest file once the first lease is granted, since the index flushes WALs after simctl writes device.plist.

Done when

  • pnpm exec vitest run --project unit src/drivers/ios/index.test.ts and pnpm test:changed pass.
  • pnpm check passes.
  • A new slow-lane test, e2e/slow-ios-source-isolation.test.ts, proves the feature's first two Completion conditions on Xcode 27: three leases of one kind and two of a baseline saved from a used lease leave no file newer than its making in the seed, the baseline's source, or the folder of the lease it was saved from (data/var/db/diagnostics aside), and each leased simulator's data/Library/Logs link names its own log folder (Hardware: needs a real simulator).
  • In the same test, whose daemon runs with log.level: "debug", the I6 line of each copy of the saved baseline reports under 1000 ms (Hardware).
  • e2e/slow-agent-device.test.ts passes on the slow lane with its keepSeeds: true flows (:180), and the second flow copies the kept seed instead of making it again (B11; Hardware).

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 3 blocking, 2 fixed, 0 notes. Claims review: 4 blocking, 3 fixed, 1 notes.
Rounds: 2. Tokens: 13.4M.
Runs: 16. Cost USD: 15.4325. Agent seconds: 15375.
Assessment: incomplete — R9 open after the last check of the cap.

Rejected:

  • spec: R3 a \/ result of another length is refused — [intentional] Assumption 3, the spec's "another length" case.
  • spec: R4 the same B7 case is proved at two seams — [nonblocking] each seam is the spec's.
  • claims: R8 src/drivers/ios/AGENTS.md:29,31 restates code — [nonblocking] the lines state invariants that span files.

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

V3RON added 15 commits November 15, 2026 21:34
@V3RON
V3RON added this pull request to stack #1574 November 15, 2026 20:48
@V3RON

V3RON commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 36822e6
Round 2: bce83b1
Round fix-check: 2c01e72

Runs: 16. Cost USD: 15.4325. Agent seconds: 15375.
Tokens input 908, output 319135, cache read 39489339, cache write 2616798.
- build implementer: claude-sonnet-5-5 1155 s $3.4747
- audit implementer: claude-sonnet-5-5 236 s $0.5056
- review 1 reviewer: claude-sonnet-5-5 558 s $0.3918
- review 1 spec: claude-sonnet-5-5 43 s $0.3144
- review 1 code both: claude-opus-5-5 449 s $1.8933
- review 1 claims: claude-sonnet-5-5 54 s $0.2454
- fix 1 implementer: claude-sonnet-5-5 368 s $0.9372
- review 2 reviewer: claude-sonnet-5-5 264 s $0.2626
- review 2 code both: claude-opus-5-5 162 s $0.6104
- review 2 claims: claude-sonnet-5-5 40 s $0.1538
- hardware hardware-verifier: claude-sonnet-5-5 537 s $0.1133
- hardware-fix implementer: claude-sonnet-5-5 7975 s $4.6584
- hardware hardware-verifier: claude-sonnet-5-5 2774 s $0.3409
- fix implementer: claude-sonnet-5-5 30 s $0.1302
- review fix-check reviewer: claude-sonnet-5-5 420 s $0.4077
- review fix-check reviewer code-both: claude-opus-5-5 310 s $0.9928
Finding outcomes: {"fixed":5,"intentional":1,"nonblocking":2,"open":1}. Classes: {"ADR 0076 section 2: size cap leaves files unswapped":1,"WAL deleted on close, then read":1,"assumption decides user-visible failure":1,"documentation 7":2,"false comment: every verb":1,"false error message":1,"swap target unresolved vs real sources path":1,"testing 7":1}.
{"findings":[{"id":"R1","role":"code","class":"WAL deleted on close, then read","outcome":"fixed","path":"src/drivers/ios/source-index.ts","round":"1","fix":"bce83b1886ded32c1c1fc387be1120bc7a1101c6"},{"id":"R2","role":"code","class":"swap target unresolved vs real sources path","outcome":"fixed","path":"src/drivers/ios/index.ts","round":"1","fix":"bce83b1886ded32c1c1fc387be1120bc7a1101c6"},{"id":"R3","role":"spec","class":"assumption decides user-visible failure","outcome":"intentional","path":"src/drivers/ios/foreign-folders.ts","round":"1"},{"id":"R4","role":"spec","class":"testing 7","outcome":"nonblocking","path":"src/drivers/ios/source-isolation.test.ts","round":"1"},{"id":"R5","role":"claims","class":"documentation 7","outcome":"fixed","path":"src/drivers/ios/AGENTS.md","round":"1","fix":"bce83b1886ded32c1c1fc387be1120bc7a1101c6"},{"id":"R6","role":"claims","class":"false error message","outcome":"fixed","path":"src/drivers/ios/source-staleness.ts","round":"1","fix":"bce83b1886ded32c1c1fc387be1120bc7a1101c6"},{"id":"R7","role":"claims","class":"false comment: every verb","outcome":"fixed","path":"src/drivers/ios/foreign-folders.test.ts","round":"1","fix":"bce83b1886ded32c1c1fc387be1120bc7a1101c6"},{"id":"R8","role":"claims","class":"documentation 7","outcome":"nonblocking","path":"src/drivers/ios/AGENTS.md","round":"2"},{"id":"R9","role":"code","class":"ADR 0076 section 2: size cap leaves files unswapped","outcome":"open","path":"src/drivers/ios/source-index.ts","round":"fix-check"}]}

Written by an agent.

…one-dropped database, and a swap matches whole paths only (#1570)

The slow lane showed four faults: macOS refuses open on locationd's files (EPERM), a used simulator holds files past one string, the index recorded a file every clone deletes, and a stray backslash before a plain path made a match of mixed separators whose swap changed a length. The lane's test now uses one agent id per lease and reads the seed's making as its newest file after the first lease.
@V3RON

V3RON commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • claims: src/drivers/ios/AGENTS.md:31 names only EPERM, but the index also skips EACCES.

Written by an agent.

@V3RON

V3RON commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Closed: built the folder-path swap of ADR 0076's first version on the driver before #1582 split it. #1570 is rewritten (lineage and UDID swap, no size limit, so R9 no longer applies) and is rebuilt from main; the WAL flush, filesystem port and file-record code may be copied by hand.

Written by an agent.

@V3RON V3RON closed this Nov 16, 2026
@V3RON
V3RON removed this pull request from stack #1574 November 16, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot

1 participant