Skip to content

fix: make eviction planning CLI help successful and bounded - #217

Merged
seonghobae merged 30 commits into
mainfrom
fix/cli-help-eviction-destination-v1
Aug 26, 2026
Merged

fix: make eviction planning CLI help successful and bounded#217
seonghobae merged 30 commits into
mainfrom
fix/cli-help-eviction-destination-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Keep the three local-eviction/destination operational CLIs bounded and honest under both ordinary and coverage-instrumented builds. Sole --help / -h remains a successful terminal action; invalid/mixed input stays non-zero; valid native filesystem paths are not coerced through UTF-8 protocol parsing.

Covered binaries:

  • disksage-icloud-local-eviction;
  • disksage-incomplete-download-destination-plan;
  • disksage-icloud-local-eviction-batch.

Exact current state

  • exact source head: 3212686e7deeee63eab3fd2774fd23bfe4331d31;
  • live main: 7eb131c4b4ac628226b262d6406a663fc7dc632f;
  • open / Draft / mergeable;
  • current review threads: no valid unresolved thread; the returned CodeRabbit predecessor thread is resolved/outdated.

Current exact-head workflows are not yet passing evidence:

  • Test 32733482360 — queued;
  • Release 32733482294 — in progress;
  • Security Scan 32733482430 — queued;
  • SAST Semgrep 32733482467 — queued.

Test-first repairs

Coverage-runtime integrity

A new black-box regression builds disksage-icloud-local-eviction and disksage-incomplete-download-destination-plan with cargo rustc --locked --features cloud-cli ... -- --cfg coverage and requires their real terminal-help behavior. Before the production fix, both binaries compiled coverage-only empty entry points (and the local-eviction binary hid its runtime behind cfg(not(coverage))), so coverage instrumentation could avoid measuring the shipped parser/runtime. Those coverage-only shortcuts are removed; ordinary and coverage builds now execute the same production entry point.

Native filesystem path admission

The existing real-binary process contract now also sends absolute Unix paths containing a non-UTF-8 byte. --cloud-root, --path, --manifest, --record-dir, --source-root, --capacity-snapshot, and --private-output are host filesystem values and remain native OsString/PathBuf values. Textual protocol fields and option tokens still require UTF-8 and retain the existing bounded diagnostics. The regression proves native path values reach the next real runtime boundary instead of failing as *-invalid-utf8-argument.

Authority boundary

No iCloud eviction authorization, double-confirmation requirement, immutable record authority, capacity admission, destination selection, incomplete-download recovery/materialization semantics, cloud/provider mutation, or source-eviction rule was weakened. The changes only remove false coverage runtime substitution and preserve valid native path operands.

Required before merge

Do not merge unless the unchanged exact head satisfies every applicable live workflow and current finding, every valid review thread is resolved, live-main ancestry remains current, review/governance requirements are satisfied, and repository-wide exact 100% owned-production statement/region-equivalent, branch, function, and line coverage is proven without exclusions or threshold weakening. Pending, queued, skipped-required, neutral-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, rate-limited, no-source-scanner, or infrastructure-only evidence is non-passing.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 48 minutes.

View limit details

Limit details: You’ve used the included review currently available.

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f6787946-7242-4be4-bef4-29a35b8adfe0

📥 Commits

Reviewing files that changed from the base of the PR and between 6f91511 and 0b6b2f5.

📒 Files selected for processing (7)
  • src-tauri/src/bin/disksage-icloud-local-eviction-batch.rs
  • src-tauri/src/bin/disksage-icloud-local-eviction.rs
  • src-tauri/src/bin/disksage-incomplete-download-destination-plan.rs
  • src-tauri/tests/cli_help_eviction_coverage_runtime_contract.rs
  • src-tauri/tests/cli_help_eviction_destination_exit.rs
  • src-tauri/tests/eviction_cli_duplicate_singleton_process.rs
  • src-tauri/tests/icloud_local_eviction_duplicate_authority_process.rs
📝 Walkthrough

Walkthrough

세 개의 cloud CLI가 standalone 도움말을 성공 처리하고, 알 수 없는 인자와 비 UTF-8 인자를 명시적 오류로 처리합니다. 새 블랙박스 테스트가 출력, 종료 상태, 오류 진단을 검증합니다.

Changes

CLI 인자 계약

Layer / File(s) Summary
도움말 및 인자 처리
src-tauri/src/bin/disksage-icloud-local-eviction-batch.rs, src-tauri/src/bin/disksage-icloud-local-eviction.rs, src-tauri/src/bin/disksage-incomplete-download-destination-plan.rs
standalone --help-h는 usage를 출력하고 성공 종료합니다. 혼합 도움말과 알 수 없는 인자는 고정 오류를 반환합니다. OS 인자의 UTF-8 변환 실패도 전용 오류로 처리합니다.
프로세스 계약 테스트
src-tauri/tests/cli_help_eviction_destination_exit.rs
세 CLI의 도움말 출력, 잘못된 인자, 혼합 인자, Unix 비 UTF-8 인자의 종료 상태와 stderr를 검증합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 6f915

The CLI change makes sole help requests succeed and keeps invalid arguments bounded, but the tests do not verify the exact diagnostic text required for unknown and non-UTF-8 arguments. A future change could weaken those messages without failing tests, so merge is reasonable with explicit owner follow-up.

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 세 CLI의 도움말 성공 종료와 진단 범위 제한이라는 주요 변경 사항을 명확하게 요약합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cli-help-eviction-destination-v1

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

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 08:29
@seonghobae
seonghobae marked this pull request as draft August 14, 2026 11:46
@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 06:22
coderabbitai[bot]

This comment was marked as resolved.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head c05aa3715900099694ddcdc3619294c54579b920.

  • Head SHA: c05aa3715900099694ddcdc3619294c54579b920

  • Workflow run: 32148589859

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (4 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (4 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: c05aa3715900099694ddcdc3619294c54579b920
  • Workflow run: 32148589859
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head c05aa3715900099694ddcdc3619294c54579b920.

  • Head SHA: c05aa3715900099694ddcdc3619294c54579b920

  • Workflow run: 32148589859

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (4 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (4 files)"]
  R1 --> V1["required checks"]
Loading

@seonghobae
seonghobae force-pushed the fix/cli-help-eviction-destination-v1 branch from c05aa37 to 88ba748 Compare August 20, 2026 16:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current head 88ba748 has hosted checks green; any earlier CHANGES_REQUESTED review is stale. @OpenCode review current head 88ba748 and publish fresh approval from exact-head evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@OpenCode review current exact head 88ba748ad1063eece3b5b31abc1b12b4863065be. The recorded REQUEST_CHANGES is bound to an older predecessor; current hosted checks report no failures. Re-run coverage/review evidence against this exact head only; do not transfer predecessor decisions.

@seonghobae
seonghobae marked this pull request as draft August 22, 2026 05:55
@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 07:35

Dismissing: this REQUEST_CHANGES was posted against commit c05aa37 where coverage-evidence failed. The PR's current head has coverage-evidence passing (verified via gh pr checks). Remaining review thread is resolved. Re-request review to re-validate.

@opencode-agent opencode-agent Bot added the type: bug Defect or incorrect behavior label Aug 22, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 05:28
@seonghobae
seonghobae marked this pull request as draft August 24, 2026 06:08
@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 19:42
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 19:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 new potential issues.

Open in Devin Review

Comment thread src-tauri/src/bin/disksage-icloud-local-eviction.rs
Comment thread src-tauri/tests/eviction_cli_duplicate_singleton_process.rs
Comment thread src-tauri/src/bin/disksage-icloud-local-eviction-batch.rs
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 20:13
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 21:13
@seonghobae
seonghobae merged commit 9e460c2 into main Aug 26, 2026
37 checks passed
@seonghobae
seonghobae deleted the fix/cli-help-eviction-destination-v1 branch August 26, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant