Skip to content

fix: keep successful CLI help strict and bounded - #220

Open
seonghobae wants to merge 29 commits into
mainfrom
fix/cli-help-strict-terminal-v1
Open

fix: keep successful CLI help strict and bounded#220
seonghobae wants to merge 29 commits into
mainfrom
fix/cli-help-strict-terminal-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Purpose

Keep successful CLI help strict and bounded for three operational CLIs that already supported sole help but previously allowed malformed mixed requests to terminate as successful help:

  • disksage-reclaim-plan;
  • disksage-podman-reclaim-plan;
  • disksage-volume-snapshot.

Exact current state

  • Exact source head: 09733b82b1aac2c6125dab56c927e0be1fc259c3.
  • Live protected main: be418bac9bfbdc8aa41b1a698713833e3dbccfdc.
  • The PR is open, Ready for review, mergeable, and based directly on protected main.
  • Current semantic delta is exactly the three binary files above plus src-tauri/tests/cli_help_strict_terminal_exit.rs.
  • The sole CodeRabbit review is COMMENTED on predecessor head cbb49c97f83a8af581ac1bc7bdf01f45d97d964a. Its valid request to prove non-UTF-8 payload non-reflection is present on the current exact head; the inline thread is resolved. It is not approval and predecessor review evidence does not transfer.

Test-first repair

The process regression builds the actual feature-gated binaries with locked dependencies in an isolated target directory and requires:

  • sole --help and -h => exit 0, stable usage on stdout, empty stderr;
  • unknown options => non-zero, empty stdout, bounded visible stderr without opaque payload reflection;
  • help mixed with an unknown option => non-zero, empty stdout, bounded stderr without payload reflection;
  • Unix non-UTF-8 option-shaped input => ordinary bounded argument failure, valid UTF-8 stderr, no payload reflection, and no Rust panic.

The current exact-head regression explicitly asserts that a non-UTF-8 --opaque… argument cannot reflect the substring opaque into stderr while preserving UTF-8 and panic-detection checks.

The implementation is deliberately narrow:

  • each parser recognizes help only when it is the sole argument;
  • mixed help/invalid requests continue through normal validation and fail;
  • disksage-reclaim-plan no longer interpolates arbitrary unknown-option text;
  • disksage-volume-snapshot consumes OsString arguments so malformed host input cannot panic before validation;
  • option-like non-UTF-8 input is rejected instead of being misclassified as a path.

Reclaim planning, Podman evidence collection, volume snapshot/comparison semantics, JSON stdout purity, read-only authority, native path handling after --, timeout bounds, and all domain validation remain unchanged.

Exact-head validation

On unchanged exact head 09733b82b1aac2c6125dab56c927e0be1fc259c3:

  • Test 31879562388 — success;
  • Release 31879562488 — success;
  • Security Scan 31879562401 — success;
  • SAST Semgrep 31879562407 — success.

Conditional PR-inapplicable publication/attestation helpers are not represented as passing release evidence. Pending, predecessor, status-only, synthetic, model-only, rate-limited, absent-required, or skipped-required evidence does not transfer.

Scope / ownership

This line does not import #211's Git-worktree/archive/cloud paths, #213's provider/NarUon/cloud paths, #150's Podman desktop projection, #156's repository-wide exact coverage, or #149's canonical documentation.

Remaining integration blockers

  • The live ruleset requires one qualifying independent approval after the last push and review-thread resolution; no approval is claimed.
  • Repository-wide exact 100% owned-production region/statement-equivalent, branch, function, and line coverage remains materially unsatisfied on canonical owner ci: require exact-head production coverage evidence #156.
  • Ready-for-review status and feature-local green evidence are not merge authorization.

Required before merge

Do not merge unless the unchanged exact head satisfies every applicable live required workflow and current finding, every review thread is resolved, a qualifying independent approval covers the required reviewed head/last push, fresh protected-main ancestry remains current, the live ruleset is satisfied, and repository-wide exact coverage is satisfied 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 not passing.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 36 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: a80a16f2-98f1-4cf9-9137-7910cd6945bf

📥 Commits

Reviewing files that changed from the base of the PR and between d1a73f0 and b7c1866.

📒 Files selected for processing (4)
  • src-tauri/src/bin/disksage-podman-reclaim-plan.rs
  • src-tauri/src/bin/disksage-reclaim-plan.rs
  • src-tauri/src/bin/disksage-volume-snapshot.rs
  • src-tauri/tests/cli_help_strict_terminal_exit.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 94b909cb-c7c5-42ee-b349-e102841c2139

📥 Commits

Reviewing files that changed from the base of the PR and between cbb49c9 and d1a73f0.

📒 Files selected for processing (1)
  • src-tauri/tests/cli_help_strict_terminal_exit.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src-tauri/tests/cli_help_strict_terminal_exit.rs

📝 Walkthrough

Walkthrough

세 운영 CLI의 인자 처리를 OsString 기반으로 변경했습니다. 단독 -h 또는 --help만 성공으로 처리합니다. 알 수 없는 옵션, 혼합 도움말 인자, Unix 비 UTF-8 옵션은 오류로 처리합니다. 프로세스 수준 통합 테스트를 추가했습니다.

Changes

CLI 인자 검증

Layer / File(s) Summary
Reclaim plan 파서 검증
src-tauri/src/bin/disksage-podman-reclaim-plan.rs, src-tauri/src/bin/disksage-reclaim-plan.rs
두 CLI가 인자를 먼저 수집합니다. 단독 도움말만 성공으로 처리합니다. 혼합 도움말과 알 수 없는 옵션을 오류로 처리합니다. Unix 비 UTF-8 옵션을 검증합니다.
Volume snapshot 파서 검증
src-tauri/src/bin/disksage-volume-snapshot.rs
OsString으로 운영체제 인자를 수집합니다. 경로와 기준선 값을 변환합니다. 논리적 제거 바이트 값을 UTF-8 및 u64로 검증합니다.
프로세스 수준 CLI 테스트
src-tauri/tests/cli_help_strict_terminal_exit.rs
세 CLI를 별도 Cargo target 디렉터리에서 빌드하고 실행합니다. 도움말 출력, 오류 종료, 진단 출력, 혼합 인자, Unix 비 UTF-8 인자를 검증합니다.

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

Merge Risk: 🔵 Low · up to d1a73

The PR tightens help handling and unknown-option diagnostics across three CLIs, but malformed non-UTF-8 arguments are not covered by the current regression test, leaving a bounded risk that payload reflection could regress unnoticed. The change is mergeable with explicit owner follow-up for that coverage gap.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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-strict-terminal-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.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 08:37
@seonghobae
seonghobae marked this pull request as draft August 14, 2026 11:47

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 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.

@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 09733b82b1aac2c6125dab56c927e0be1fc259c3.

  • Head SHA: 09733b82b1aac2c6125dab56c927e0be1fc259c3

  • Workflow run: 32167369199

  • 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

opencode-agent Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 09733b82b1aac2c6125dab56c927e0be1fc259c3
  • Workflow run: 32174721809
  • 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 09733b82b1aac2c6125dab56c927e0be1fc259c3.

  • Head SHA: 09733b82b1aac2c6125dab56c927e0be1fc259c3

  • Workflow run: 32174721809

  • 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 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 09733b82b1aac2c6125dab56c927e0be1fc259c3.

  • Head SHA: 09733b82b1aac2c6125dab56c927e0be1fc259c3

  • Workflow run: 32174721809

  • 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-strict-terminal-v1 branch from 09733b8 to e679677 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

@OpenCode review current head e679677. The stale CodeRabbit finding is already addressed in src-tauri/tests/cli_help_strict_terminal_exit.rs:149-152 (stderr must not contain opaque). Please re-evaluate this exact head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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

@seonghobae

Copy link
Copy Markdown
Contributor Author

@OpenCode review current exact head e679677c6030e31737195847be1e56687f14eec5. 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:11
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 07:36

Dismissing: this REQUEST_CHANGES was posted against commit 09733b8 where coverage-evidence failed. The PR's current head has coverage-evidence passing (verified via gh pr checks), and all review threads are now resolved. Re-request review to re-validate.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: draft Draft pull request type: bug Defect or incorrect behavior labels Aug 22, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 05:28
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 24, 2026 06:07
@seonghobae
seonghobae marked this pull request as ready for review August 26, 2026 09:47
@seonghobae
seonghobae enabled auto-merge (squash) August 26, 2026 09:47
devin-ai-integration[bot]

This comment was marked as resolved.

@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 1 new potential issue.

Open in Devin Review

Comment thread src-tauri/src/bin/disksage-volume-snapshot.rs
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