Skip to content

fix: make audit CLI help successful and bounded - #215

Draft
seonghobae wants to merge 50 commits into
mainfrom
fix/cli-help-audit-batch-v1
Draft

fix: make audit CLI help successful and bounded#215
seonghobae wants to merge 50 commits into
mainfrom
fix/cli-help-audit-batch-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make disksage-multipart-archive-audit and disksage-incomplete-download-audit expose a sole --help / -h as a successful terminal action while keeping invalid input non-zero, diagnostics bounded, and native filesystem path operands outside UTF-8 protocol coercion.

Exact current state

  • protected main: 79067c1160ddedf7fc962cbf8067ce7e83c4564a
  • exact current head: 7c5423164417a8fbd9922cabe32cdab7c0c18d9f
  • open / Ready for review / mergeable
  • semantic delta is exactly three files:
    • src-tauri/src/bin/disksage-incomplete-download-audit.rs
    • src-tauri/src/bin/disksage-multipart-archive-audit.rs
    • src-tauri/tests/cli_help_audit_batch_exit.rs
  • all current inline review threads are resolved.

No predecessor check, review, approval, synthetic merge result, remembered SHA, or stale PR-body statement transfers to this head.

Test-first behavior

The process contract builds and launches the real feature-gated audit binaries and requires:

  • sole --help / -h => exit 0, stable usage on stdout, empty stderr;
  • unknown and mixed help/invalid invocations => non-zero and bounded diagnostics without opaque payload reflection;
  • duplicate singleton options fail closed;
  • option/protocol text is explicitly admitted as UTF-8 while native filesystem operands are preserved as OsString/PathBuf;
  • coverage builds execute the shipped runtime rather than a synthetic no-op entrypoint.

The production changes are deliberately narrow. Audit bounds, archive/incomplete-download inspection, private create-new evidence behavior, filesystem-read authority, and normal JSON output semantics remain unchanged.

Exact-head evidence

For unchanged head 7c5423164417a8fbd9922cabe32cdab7c0c18d9f:

  • Test 32966981289 — success;
  • Security Scan 32966981280 — success;
  • SAST Semgrep 32966981249 — success;
  • Release 32966981248 — failure in the shared release-artifact verifier dependency, not in this PR's three-file audit-help source delta.

Release artifact verification is canonically owned by #264. Do not add an audit-CLI-local verifier workaround. Ready-for-review means independent review can proceed while that dependency is integrated; it is not merge authorization.

Live governance / remaining gates

The inherited CWL Central required workflows ruleset currently requires one approving review, stale-review dismissal on push, review-thread resolution, its unattributed-change approval rule, and the configured central required workflows; require_last_push_approval is currently false.

Repository-wide exact non-vacuous 100% owned-production region/statement-equivalent, branch, function, and line coverage remains materially unsatisfied on canonical owner #156. Feature-local success does not substitute for that gate.

Required before merge

Do not merge unless one unchanged exact integration head satisfies every applicable native and central required workflow, the #264 release-verifier dependency is integrated or otherwise proven on that exact lineage, zero valid current findings remain, live review/ruleset requirements are satisfied, fresh protected-main ancestry remains valid, package/SBOM/provenance requirements are complete where applicable, and repository-wide exact 100% owned-production coverage is proven without exclusions or threshold weakening. Pending, queued, skipped-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, no-source, rate-limited, or infrastructure-only evidence is non-passing.

@coderabbitai

coderabbitai Bot commented Aug 13, 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: f49beac2-ddf5-41e5-bb09-735c8eda3d1b

📥 Commits

Reviewing files that changed from the base of the PR and between 79067c1 and 7c54231.

📒 Files selected for processing (3)
  • src-tauri/src/bin/disksage-incomplete-download-audit.rs
  • src-tauri/src/bin/disksage-multipart-archive-audit.rs
  • src-tauri/tests/cli_help_audit_batch_exit.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

두 감사 CLI가 OsString 기반 인자 처리를 사용합니다. 단독 도움말, 알 수 없는 인자, 비 UTF-8 인자, 중복 옵션의 동작을 명확히 정의합니다. coverage 빌드에서도 실제 mainrun 경로를 유지합니다.

Changes

감사 CLI 인자 처리

Layer / File(s) Summary
OS 문자열 기반 인자 파싱
src-tauri/src/bin/disksage-incomplete-download-audit.rs, src-tauri/src/bin/disksage-multipart-archive-audit.rs
두 CLI가 OsString 인자를 사용합니다. 값 추출 헬퍼를 추가합니다. 중복 옵션을 오류로 처리합니다.
도움말 및 실행 진입점
src-tauri/src/bin/disksage-incomplete-download-audit.rs, src-tauri/src/bin/disksage-multipart-archive-audit.rs
단독 --help-h를 처리합니다. args_os를 사용합니다. coverage 전용 main과 조건부 실행 경로를 제거합니다.
프로세스 계약 검증
src-tauri/tests/cli_help_audit_batch_exit.rs
두 바이너리의 도움말 출력, 종료 코드, 오류 진단, 중복 옵션, 비 UTF-8 인자와 파일 경로, coverage 진입점을 실행 수준에서 검증합니다.

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

Merge Risk: ⚪ Minimal · up to 7c542

The PR makes help a successful terminal action and bounds invalid-argument diagnostics for two audit commands without changing audit behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 3 files. 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 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cli-help-audit-batch-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 13, 2026 21:21

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.

@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 05569ea9fe0cab608a37b268c78a81e047f5d991.

  • Head SHA: 05569ea9fe0cab608a37b268c78a81e047f5d991

  • Workflow run: 32148583820

  • 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 (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 05569ea9fe0cab608a37b268c78a81e047f5d991
  • Workflow run: 32148583820
  • 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 05569ea9fe0cab608a37b268c78a81e047f5d991.

  • Head SHA: 05569ea9fe0cab608a37b268c78a81e047f5d991

  • Workflow run: 32148583820

  • 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 (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 18, 2026 16:58
@seonghobae
seonghobae force-pushed the fix/cli-help-audit-batch-v1 branch from 05569ea to 931bdd0 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 931bdd0 has hosted checks green; any earlier CHANGES_REQUESTED review is stale. @OpenCode review current head 931bdd0 and publish fresh approval from exact-head evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

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

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 26, 2026 09:23
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 marked this pull request as ready for review August 27, 2026 18:35

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

Devin Review

Comment on lines +19 to +20
[--private-output ABSOLUTE_NEW_FILE.json]\n\
다음 단계: 누락되거나 중복된 분할 조각을 검토하세요. 이 명령은 파일을 이동하거나 삭제하지 않습니다."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Read-only claim remains accurate

The audit path never moves or deletes files. Optional private output only creates a new evidence file.

Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

seonghobae and others added 4 commits August 29, 2026 22:21
…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