Skip to content

fix(ios): skip temporary device plists when saving baselines (#1714) - #1785

Closed
maxlapides wants to merge 1 commit into
callstackincubator:mainfrom
maxlapides:bug/1714
Closed

maxlapides wants to merge 1 commit into
callstackincubator:mainfrom
maxlapides:bug/1714

Conversation

@maxlapides

@maxlapides maxlapides commented Nov 19, 2026 •

Copy link
Copy Markdown

#1786 fixes the save-time race by skipping clone entries that disappear before lstat. A temporary plist can also survive the lineage scan, contain a source UDID, and disappear after its path is recorded. When a later baseline copy tries to rewrite that recorded path, the missing file can fail the lease.

This PR excludes only device.plist.sb-* entries at the clone root before recording lineage. The canonical device.plist is still scanned. This complements #1786's handling of vanished entries throughout the clone.

  • Ran this PR's regression against the head that merged in fix(ios): a baseline save skips files that vanish from its clone #1786 (4730ef55). The save succeeded, but the persisted lineage included device.plist.sb-in-progress. With this PR's filter, the test records only device.plist.
  • Passed the focused suites (818 tests), typecheck, and the repository's commit and push checks.
  • Applied the same filter to a local v0.8.0 worker. Saved iOS 27.2, 26.5, and 18.6 baselines and confirmed persisted app sign-in from a fresh lease of each.

Closes #1714.

Status

Draft for upstream review.

Assumptions

None.

Review

Spec review: skipped. Code review: skipped. Claims review: skipped.
Assessment: incomplete
Rounds: 0. Tokens: n/a.

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

At the iOS source root, visitFolder now uses lineageEntryNames, which sorts entries and excludes names beginning with device.plist.sb-. Nested directories retain all sorted entries. A regression test removes a temporary plist during lstat and checks that saveSource succeeds with only the real device.plist recorded.

Suggested reviewers: v3ron

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 52e87

This change stops transient CoreSimulator temporary plist files from being recorded in the iOS source lineage. It is narrowly scoped, includes a regression test, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: skipping temporary device plists when saving iOS baselines. The raw summary says lineageEntryNames excludes device.plist.sb-* entries at the source root before lineage is r…
Description check Passed The description states the purpose: skipping device.plist.sb-* clone entries that disappear or survive the lineage scan, with the canonical device.plist still scanned. It also gives test results and a…
Linked Issues check Passed The only directly linked issue, #1714, is closed and completed. It supplies historical context only. No active directly linked targets remain, so no linked-issue coding requirements apply to this pull…
Out of Scope Changes check Passed The whole-PR diff (merge base 865fdb7 to head 52e871e) changes two areas. First, src/drivers/ios/lineage-files.ts: visitFolder now reads entries through lineageEntryNames. That helper sorts entries …
Full details: Title check

Explanation

The title names the change: skipping temporary device plists when saving iOS baselines. The raw summary says lineageEntryNames excludes device.plist.sb-* entries at the source root before lineage is recorded, which matches the title's subject. The title's issue number (#1714) differs from the PR description's #1786 reference, but the title itself is related to the changeset. The title is specific and concise.

Full details: Description check

Explanation

The description states the purpose: skipping device.plist.sb-* clone entries that disappear or survive the lineage scan, with the canonical device.plist still scanned. It also gives test results and a closing reference. The raw summary confirms the same filter in lineage-files.ts and a new regression test. The description is related to the changeset and includes specific technical detail.

Full details: Linked Issues check

Explanation

The only directly linked issue, #1714, is closed and completed. It supplies historical context only. No active directly linked targets remain, so no linked-issue coding requirements apply to this pull request. The PR description and the PR objectives both state this. The change in src/drivers/ios/lineage-files.ts and its regression test in src/drivers/ios/index-save-source-lifecycle.test.ts address the same failure mode described in #1714 (a CoreSimulator device.plist.sb-* temp entry that disappears before lstat). This is background only and is not assessed as a requirement.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff (merge base 865fdb7 to head 52e871e) changes two areas. First, src/drivers/ios/lineage-files.ts: visitFolder now reads entries through lineageEntryNames. That helper sorts entries and, only at the source root, skips names beginning with device.plist.sb-. Nested directories keep all entries. Second, src/drivers/ios/index-save-source-lifecycle.test.ts: a new saveSource test checks that a vanished device.plist.sb-* temp entry is not recorded and that the canonical device.plist is still recorded. Both changes match the stated PR intent: exclude only root-level device.plist.sb-* entries before recording lineage, and keep scanning device.plist. The test directly supports the filter. No unrelated changes appear in the summary. This assessment relies on the raw summary and the PR description. Source contents were not inspected in this pass.

  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: d230485f-5a6f-45a6-bcf2-aa1732c88293
Commits

Reviewing files that changed from the base of the PR and between 865fdb7 and 52e871e.

Files selected for processing: 2

  • src/drivers/ios/index-save-source-lifecycle.test.ts
  • src/drivers/ios/lineage-files.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@maxlapides
maxlapides marked this pull request as ready for review November 19, 2026 20:27
V3RON added a commit that referenced this pull request Nov 20, 2026
#1793)

Closes #1790

A copy of an iOS source no longer fails when a file or link its source
recorded is missing from the copy: the swap skips it and counts it in
the debug line (`…; 1 unreadable, 2 missing`). Any other error still
deletes the copy (ADR 0076 §3). A file that vanishes after the save
walk's `lstat` and before its read is no longer recorded as
`unreadable`.

This replaces the name filter proposed in #1785: it covers a stale path
anywhere in the clone, and baselines already saved.

### Status

Implement: done (8/8 green, audit complete) Review: round 1, 0 blocking
Hardware: n/a Gate: running
Next: gate

## Assumptions

none

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0
fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 1 notes.
Rounds: 1. Tokens: 3.2M.
Runs: 5. Cost USD: 1.1591. Agent seconds: 364.

Assessment: complete

_Written by an agent._
@maxlapides maxlapides closed this Nov 20, 2026
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.

iOS baseline save fails: ENOENT on device.plist.sb-* temp file

1 participant