Skip to content

fix(android): refuse a seed copy that does not fit in the device root's free space - #1794

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

V3RON merged 5 commits into
mainfrom
bug/1750

Conversation

@V3RON

@V3RON V3RON commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1750

Status

Implement: done (11/11 green, main merged in d7bb392) Review: fix-check passed twice, 0 open Hardware: n/a Gate: running
Next: gate

Done when

  • A seed or baseline copy reserves its folder's full size against the device root and is refused with InsufficientDiskSpaceError when it does not fit, before anything is copied (Seeds.#copyAvd; test "refuses a copy of the seed that does not fit...") — seeds-copies.test.ts 10/10 at c5867fe: refusal, exact fit, device-root volume, concurrent copy and failed-copy release; review round 1 + fix-check
  • The refusal's message says "copy an Android seed", not "install a android component" (DiskSpaceGuard.reserve action; test in src/core/driver.test.ts) — asserted in driver.test.ts and seeds-copies.test.ts; baseline copies name their own operation (R2)
  • errors.mdx (both pages) describe the seed-copy refusal. — rows under PROVISION_FAILED and BASELINE_SAVE_FAILED, checked against the wrapping in leasing and core/baselines.ts by the fix-check

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 3 blocking, 3 fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 1. Tokens: 2.1M.
Runs: 10. Cost USD: 3.1477. Agent seconds: 1251.

Rejected:

  • code: R5 [nonblocking] a running copy's reservation also counts bytes it has already written, so a second copy that would fit can be refused — conservative, matches DiskSpaceGuard's install behaviour, never fills the disk

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: dd6ae4f9-e9ac-4c2f-acca-1eeffcc4e5fa
Commits

Reviewing files that changed from the base of the PR and between c780a49 and d7bb392.

Files selected for processing: 6

  • src/core/driver.test.ts
  • src/core/driver.ts
  • src/drivers/android/seeds-copies.test.ts
  • src/drivers/android/seeds.ts
  • website/src/content/docs/docs/reference/errors.mdx
  • website/src/content/docs/docs/using-devices/errors.mdx
  • 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

V3RON commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 2cb6d29
Round fix-check: c5867fe
Round fix-check: d7bb392

Runs: 10. Cost USD: 3.1477. Agent seconds: 1251.
Tokens input 238, output 62923, cache read 6124290, cache write 521370.
- build implementer: claude-sonnet-5-5 143 s $0.3298
- audit implementer: claude-sonnet-5-5 126 s $0.2911
- review 1 reviewer: claude-sonnet-5-5 369 s $0.1909
- review 1 spec: claude-sonnet-5-5 16 s $0.1162
- review 1 code both: claude-opus-5-5 293 s $1.2044
- review 1 claims: claude-sonnet-5-5 24 s $0.1541
- fix 1 implementer: claude-sonnet-5-5 130 s $0.3241
- review fix-check reviewer: claude-sonnet-5-5 77 s $0.2386
- fix fix-check implementer: claude-sonnet-5-5 35 s $0.1249
- review fix-check reviewer: claude-sonnet-5-5 38 s $0.1736
Finding outcomes: {"duplicate":1,"fixed":4,"nonblocking":1}. Classes: {"documentation 9: user docs match behaviour":1,"error message names wrong operation":2,"reservation double-counts written bytes":1,"testing 10":1,"testing 3":1}.
{"findings":[{"id":"R1","role":"code","class":"documentation 9: user docs match behaviour","outcome":"fixed","path":"website/src/content/docs/docs/using-devices/errors.mdx","round":"1","fix":"c5867fe877f2e96c9198106ef9726bbae26f40ca"},{"id":"R2","role":"claims","class":"error message names wrong operation","outcome":"fixed","path":"src/drivers/android/seeds.ts","round":"1","fix":"c5867fe877f2e96c9198106ef9726bbae26f40ca"},{"id":"R3","role":"code","class":"testing 10","outcome":"fixed","path":"src/drivers/android/seeds-copies.test.ts","round":"1","fix":"c5867fe877f2e96c9198106ef9726bbae26f40ca"},{"id":"R4","role":"code","class":"testing 3","outcome":"fixed","path":"src/drivers/android/seeds.ts","round":"1","fix":"c5867fe877f2e96c9198106ef9726bbae26f40ca"},{"id":"R5","role":"code","class":"reservation double-counts written bytes","outcome":"nonblocking","path":"src/drivers/android/seeds.ts","round":"1"},{"id":"R6","role":"claims","class":"error message names wrong operation","outcome":"duplicate","canonicalId":"R2","path":"src/drivers/android/seeds.ts","round":"1"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 20, 2026 07:52
@V3RON
V3RON merged commit c654a40 into main Nov 20, 2026
55 checks passed
@V3RON
V3RON deleted the bug/1750 branch November 20, 2026 08:03
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.

Android: on ext4 and NTFS every lease copies the whole seed, 3 to 5 GB

1 participant