Skip to content

fix(ios): a copy skips recorded files its source no longer has (#1790) - #1793

Merged
V3RON merged 5 commits into
mainfrom
bug/1790
Nov 20, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/1790

Conversation

@V3RON

@V3RON V3RON commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Baseline recording omits paths that disappear during classification. Clone file swapping skips missing entries and reports their count; successful file and link counts increase only after swaps succeed. Tests cover disappearance during baseline saving, missing clone entries, and failures to read a recorded link. The debug log and iOS driver documentation now include missing-entry handling.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 0878d

iOS lease copies now skip recorded files or links that are missing and report them in the debug line, instead of failing and deleting the copy. Other errors still fail the copy as before. No merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a copy skips recorded files that its source no longer has, in the iOS driver. The changeset matches this. The swap in lineage-files.ts now skips missing paths and coun…
Description check Passed The description states the change. It says a copy no longer fails when a recorded file or link is missing, that the swap skips and counts such entries in the debug line, and that other errors still de…
Linked Issues check Passed [#1790] Requirement 1: a recorded file or link missing from a copy is skipped, and the lease continues. In src/drivers/ios/lineage-files.ts, swapCopyFiles wraps swapEntry in a try/catch. It coun…
Out of Scope Changes check Passed All changed files relate to #1790. lineage-files.ts contains the skip and classify logic. index-seed-swap.test.ts and index-seed-record.test.ts test the new behavior. seeds.ts adds the missing…
Full details: Title check

Explanation

The title names the main change: a copy skips recorded files that its source no longer has, in the iOS driver. The changeset matches this. The swap in lineage-files.ts now skips missing paths and counts them, and the tests cover the skip. The title uses the conventional fix(ios) prefix and cites the issue number.

Full details: Description check

Explanation

The description states the change. It says a copy no longer fails when a recorded file or link is missing, that the swap skips and counts such entries in the debug line, and that other errors still delete the copy. It also says a file that vanishes between lstat and read is no longer recorded as unreadable. These points match the changed files and the test updates.

Full details: Linked Issues check

Explanation

[#1790] Requirement 1: a recorded file or link missing from a copy is skipped, and the lease continues. In src/drivers/ios/lineage-files.ts, swapCopyFiles wraps swapEntry in a try/catch. It counts a missing-path error in counts.missing and continues. Other errors are rethrown, which keeps the ADR 0076 §3 failure path. Requirement 2: a file that vanishes between lstat and its read is not recorded as unreadable. In classify, a missing-path error returns undefined, so the file is omitted. Only other read errors return "unreadable". Tests in index-seed-swap.test.ts and index-seed-record.test.ts cover the skip, the omitted vanished temp file, and the EACCES link failure that still fails the copy. Debug log in seeds.ts reports the missing count. Residual gap: a symlink that vanishes between lstat and readlink during the save walk still throws and fails the save. It is not recorded as unreadable. The author marks this as out of scope. It does not affect the lease path named in #1790. Source code reviewed at merge base and head; the diff tool was unavailable, so the assessment relies on the head file and the supplied summary.

Full details: Out of Scope Changes check

Explanation

All changed files relate to #1790. lineage-files.ts contains the skip and classify logic. index-seed-swap.test.ts and index-seed-record.test.ts test the new behavior. seeds.ts adds the missing count to the existing debug log. src/drivers/ios/AGENTS.md updates the rule text to say a missing file or link is skipped. The changed code comment in classify cites #1714 rather than #1790. The claims review already notes this as nonblocking. It is documentation accuracy, not an unrelated change. The diff tool was unavailable, so this verdict relies on the head file and the supplied summary.

  • 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: f27024fe-8526-499b-a69e-af2b5a0e4877
Commits

Reviewing files that changed from the base of the PR and between d7bd191 and 0878d3e.

Files selected for processing: 5

  • src/drivers/ios/AGENTS.md
  • src/drivers/ios/index-seed-record.test.ts
  • src/drivers/ios/index-seed-swap.test.ts
  • src/drivers/ios/lineage-files.ts
  • src/drivers/ios/seeds.ts

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

@V3RON

V3RON commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 0878d3e

Runs: 5. Cost USD: 1.1591. Agent seconds: 364.
Tokens input 88, output 19047, cache read 1765458, cache write 221141.
- audit implementer: claude-sonnet-5-5 80 s $0.2346
- review 1 reviewer: claude-sonnet-5-5 157 s $0.207
- review 1 spec: claude-sonnet-5-5 13 s $0.1054
- review 1 code behaviour: claude-opus-5-5 91 s $0.4781
- review 1 claims: claude-sonnet-5-5 23 s $0.134
Finding outcomes: {"nonblocking":1}. Classes: {"comment cites wrong issue":1}.
{"findings":[{"id":"R1","role":"claims","class":"comment cites wrong issue","outcome":"nonblocking","path":"src/drivers/ios/lineage-files.ts","round":"1"}]}

Written by an agent.

@V3RON

V3RON commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

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

Out of scope (pre-existing, not from this diff): a symlink that vanishes between lstat and readlink in the save walk (lineage-files.ts:137) still fails the save.

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 20, 2026 07:47
@V3RON
V3RON merged commit 8487db6 into main Nov 20, 2026
37 checks passed
@V3RON
V3RON deleted the bug/1790 branch November 20, 2026 07:52
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 lease fails when a file its baseline recorded is missing from the copy

1 participant