Skip to content

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

Draft
seonghobae wants to merge 50 commits into
mainfrom
fix/cli-help-strict-terminal-v1
Draft

fix: keep successful CLI help strict and bounded#220
seonghobae wants to merge 50 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:

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

Malformed mixed-help, unknown-option, and non-UTF-8 requests must fail visibly without reflecting opaque host payloads or escaping through a panic.

Exact current state

  • Exact head: b7c186623e899fed11fcf9f1d2129da0f4840831.
  • Protected main: 79067c1160ddedf7fc962cbf8067ce7e83c4564a.
  • Open, Ready for review, mergeable, and based directly on current main.
  • Semantic delta remains exactly four files: the three CLI binaries plus src-tauri/tests/cli_help_strict_terminal_exit.rs.
  • All current inline review threads are resolved.
  • The predecessor OpenCode REQUEST_CHANGES evaluated head 09733b82b1aac2c6125dab56c927e0be1fc259c3; it was dismissed as stale rather than transferred to this head. Exact-head review evidence must be regenerated.

Behavior contract

The executable regression requires:

  • sole --help / -h => exit 0, stable usage on stdout, empty stderr;
  • unknown options => non-zero, empty stdout, bounded visible stderr without opaque payload reflection;
  • mixed help plus invalid arguments => non-zero rather than terminal-success help;
  • non-UTF-8 option-shaped input => bounded ordinary failure, valid UTF-8 diagnostics, no payload reflection, and no Rust panic;
  • native path handling and existing domain validation remain unchanged outside these parser boundaries.

Exact-head native evidence

For unchanged head b7c186623e899fed11fcf9f1d2129da0f4840831:

  • Test 32966912110 — SUCCESS.
  • Security Scan 32966912117 — SUCCESS.
  • SAST Semgrep 32966912048 — SUCCESS.
  • Release 32966912197 — FAILURE only in download-artifact-pr-compat job 98175269899: Linux/Windows/macOS builds and artifact uploads succeeded; actions/download-artifact v8 downloaded the exact artifact family successfully; the next Verify downloaded release artifact contract step failed. Shared release-verifier ownership remains on fix: verify Windows release artifact namespace #264 and is not duplicated here.

Merge rule

Ready-for-review is not merge authorization. Do not merge unless one unchanged exact head satisfies the live inherited ruleset, every applicable required workflow/security/coverage/package/SBOM/provenance/release gate, zero valid unresolved findings, and a qualifying independent formal approval where required. Pending, queued, skipped-required, cancelled, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, or no-source evidence is non-passing.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 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[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft August 27, 2026 11:38
auto-merge was automatically disabled August 27, 2026 11:38

Pull request was converted to draft

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 28, 2026 17:05

Stale predecessor review: it evaluated head 09733b8, while the live PR head is b7c1866. Exact-head review evidence must be regenerated; predecessor REQUEST_CHANGES must not be transferred.

@seonghobae
seonghobae marked this pull request as ready for review August 28, 2026 17:05
seonghobae and others added 5 commits August 30, 2026 00:31
…r sidecar pin fix

The previous noema/strix/opencode-review failures used the pre-fix sidecar pin (b2164511). .github main now vendors the fixed commit, so re-running should populate the review verdicts.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@seonghobae
seonghobae marked this pull request as draft August 30, 2026 13:49
@seonghobae seonghobae added the bug Something isn't working label Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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