Skip to content

Implement --align-raw RAW/JPEG version swapping#1

Merged
rhoopr merged 2 commits intomainfrom
feat/raw-alignment
Feb 1, 2026
Merged

Implement --align-raw RAW/JPEG version swapping#1
rhoopr merged 2 commits intomainfrom
feat/raw-alignment

Conversation

@rhoopr
Copy link
Copy Markdown
Owner

@rhoopr rhoopr commented Feb 1, 2026

Summary

  • Wire `--align-raw` CLI flag into download pipeline with
    `apply_raw_policy()`
  • Swap Original/Alternative asset versions when policy and RAW
    type match
  • 9 new tests (7 unit + 2 integration)
  • Update docs, README, and TODO

Test plan

  • `cargo fmt -- --check` clean
  • `cargo clippy` no warnings
  • `cargo test` — 131 tests pass

🤖 Generated with Claude Code

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.
@rhoopr
Copy link
Copy Markdown
Owner Author

rhoopr commented Feb 1, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Reviewed: apply_raw_policy() swap logic, filter_asset_to_tasks() integration, test coverage (9 tests), CLI value naming against Python reference (reference/python/src/icloudpd/cli.py:231), and documentation consistency.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Test default value, all valid variants, and invalid input rejection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rhoopr rhoopr merged commit e33ed75 into main Feb 1, 2026
@rhoopr rhoopr deleted the feat/raw-alignment branch February 1, 2026 03:03
rhoopr added a commit that referenced this pull request Feb 8, 2026
* Add parallel concurrent downloads and --recent early termination

Two-phase download design: sequential filter pass builds task list,
then buffer_unordered downloads with --threads-num concurrency.
Remove --until-found (will be replaced by stateful incremental sync).
Add --recent N early termination to stop API enumeration after N photos.
Add progress logging during photo enumeration and service init.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 19 unit tests and apply idiomatic Rust fixes

- Add CLI, config, download, and album unit tests (56 total)
- Remove dead dry_run guards in download phase 2
- Modernize ref patterns to idiomatic & style
- Fix stale doc comment in album.rs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
  swapping (#1)

* Implement --align-raw RAW/JPEG version swapping

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.

* Add CLI parsing tests for --align-raw flag

Test default value, all valid variants, and invalid input rejection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
* Add parallel concurrent downloads and --recent early termination

Two-phase download design: sequential filter pass builds task list,
then buffer_unordered downloads with --threads-num concurrency.
Remove --until-found (will be replaced by stateful incremental sync).
Add --recent N early termination to stop API enumeration after N photos.
Add progress logging during photo enumeration and service init.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 19 unit tests and apply idiomatic Rust fixes

- Add CLI, config, download, and album unit tests (56 total)
- Remove dead dry_run guards in download phase 2
- Modernize ref patterns to idiomatic & style
- Fix stale doc comment in album.rs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
  swapping (#1)

* Implement --align-raw RAW/JPEG version swapping

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.

* Add CLI parsing tests for --align-raw flag

Test default value, all valid variants, and invalid input rejection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
* Add parallel concurrent downloads and --recent early termination

Two-phase download design: sequential filter pass builds task list,
then buffer_unordered downloads with --threads-num concurrency.
Remove --until-found (will be replaced by stateful incremental sync).
Add --recent N early termination to stop API enumeration after N photos.
Add progress logging during photo enumeration and service init.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 19 unit tests and apply idiomatic Rust fixes

- Add CLI, config, download, and album unit tests (56 total)
- Remove dead dry_run guards in download phase 2
- Modernize ref patterns to idiomatic & style
- Fix stale doc comment in album.rs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
  swapping (#1)

* Implement --align-raw RAW/JPEG version swapping

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.

* Add CLI parsing tests for --align-raw flag

Test default value, all valid variants, and invalid input rejection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Rob Hooper <rhoopr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
* Add parallel concurrent downloads and --recent early termination

Two-phase download design: sequential filter pass builds task list,
then buffer_unordered downloads with --threads-num concurrency.
Remove --until-found (will be replaced by stateful incremental sync).
Add --recent N early termination to stop API enumeration after N photos.
Add progress logging during photo enumeration and service init.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 19 unit tests and apply idiomatic Rust fixes

- Add CLI, config, download, and album unit tests (56 total)
- Remove dead dry_run guards in download phase 2
- Modernize ref patterns to idiomatic & style
- Fix stale doc comment in album.rs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
  swapping (#1)

* Implement --align-raw RAW/JPEG version swapping

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.

* Add CLI parsing tests for --align-raw flag

Test default value, all valid variants, and invalid input rejection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
rhoopr added a commit that referenced this pull request Feb 8, 2026
* Add parallel concurrent downloads and --recent early termination

Two-phase download design: sequential filter pass builds task list,
then buffer_unordered downloads with --threads-num concurrency.
Remove --until-found (will be replaced by stateful incremental sync).
Add --recent N early termination to stop API enumeration after N photos.
Add progress logging during photo enumeration and service init.

* Add 19 unit tests and apply idiomatic Rust fixes

- Add CLI, config, download, and album unit tests (56 total)
- Remove dead dry_run guards in download phase 2
- Modernize ref patterns to idiomatic & style
- Fix stale doc comment in album.rs

---------
rhoopr added a commit that referenced this pull request Feb 8, 2026
  swapping (#1)

* Implement --align-raw RAW/JPEG version swapping

Wire the existing --align-raw CLI flag into the download pipeline, matching Python's apply_raw_policy() behavior. Swaps Original and Alternative asset versions when one is a RAW file.

* Add CLI parsing tests for --align-raw flag

Test default value, all valid variants, and invalid input rejection.

---------
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.

1 participant