Skip to content

fix: make duplicate-audit help a successful terminal action - #208

Merged
seonghobae merged 32 commits into
mainfrom
fix/duplicate-audit-help-success-v1
Aug 26, 2026
Merged

fix: make duplicate-audit help a successful terminal action#208
seonghobae merged 32 commits into
mainfrom
fix/duplicate-audit-help-success-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make disksage-duplicate-audit treat a sole --help / -h as a successful terminal action while preserving exact-duplicate discovery, bounded argument validation, private evidence publication, integrity validation, filesystem-read authority, and create-new evidence semantics.

Exact current state

  • exact source head: 7eb7c7f50eaef0aadff66351e871cc9af208dcb8
  • protected main: 93aa7477629753187da101a8af0e7276480f1a86
  • PR is open and Ready for review; mergeability is not merge authorization
  • semantic delta remains exactly src-tauri/src/bin/disksage-duplicate-audit.rs plus src-tauri/tests/duplicate_audit_help_exit.rs
  • the branch was converged onto current protected main with a non-forced merge commit; the only main-side delta was the Svelte development dependency update
  • fresh exact-head Test 32319389359, Release 32319389333, Security Scan 32319389374, and SAST Semgrep 32319389332 are queued and therefore non-passing

Test-first implementation

The original RED process regression launches the real feature-gated binary. The implementation:

  • consumes host arguments with std::env::args_os();
  • maps non-UTF-8 input to stable duplicate-audit-argument-invalid instead of panicking;
  • recognizes help only when it is the sole argument;
  • prints the exact stable usage synopsis plus one newline on stdout and exits 0;
  • keeps unknown-alone and mixed help/unknown invocations nonzero with empty stdout and bounded diagnostics;
  • does not reflect arbitrary opaque input.

Duplicate scanning, bounds, report integrity, private create-new evidence publication, root/path admission, JSON success output, and filesystem-read authority are unchanged.

Integration dependency

Canonical coverage/release-evidence owner #156 now consumes this exact head by merge ancestry rather than duplicating the implementation. That is required because #156's corrected Release smoke now rejects nonzero or stderr-emitting --help behavior instead of masking it with 2>&1 || true.

Historical successful workflows on predecessor f63c0533b566aa32db307fe2d49cf512d08d879b do not transfer. Earlier OpenCode REQUEST_CHANGES reviews are also anchored to that predecessor and its failed coverage-evidence result; they must be re-evaluated on this new exact head.

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, protected-main ancestry remains current, the live review ruleset is satisfied, and repository-wide exact 100% owned-production region/statement-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, or infrastructure-only evidence is non-passing.


Open in Devin Review

Summary by CodeRabbit

  • 버그 수정

    • 중복 감사 CLI가 운영체제의 비UTF-8 경로를 안전하게 처리합니다.
    • 잘못된 숫자 인자와 지원되지 않는 루트 경로에 대해 명확하고 제한된 오류를 반환합니다.
    • 비공개 출력에서 민감한 로컬 경로와 인코딩 불가능한 파일명이 노출되지 않습니다.
    • 비공개 감사 결과 파일이 안전한 권한으로 생성됩니다.
  • 테스트

    • 도움말, 읽기 전용 감사, JSON 결과 형식 및 다양한 경로 처리에 대한 회귀 검증을 강화했습니다.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 49 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: e1243836-8326-401c-aeb6-80f0f75ab574

📥 Commits

Reviewing files that changed from the base of the PR and between 0ac66a2 and c9a1b30.

📒 Files selected for processing (2)
  • src-tauri/src/duplicate_audit.rs
  • src-tauri/tests/duplicate_audit_native_private_output.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: 3ed7f5bf-ec58-4f9d-bba3-fcf81950ad3d

📥 Commits

Reviewing files that changed from the base of the PR and between f63c053 and 0ac66a2.

📒 Files selected for processing (4)
  • src-tauri/src/bin/disksage-duplicate-audit.rs
  • src-tauri/tests/duplicate_audit_coverage_runtime_contract.rs
  • src-tauri/tests/duplicate_audit_help_exit.rs
  • src-tauri/tests/duplicate_audit_native_private_output.rs

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


📝 Walkthrough

Walkthrough

중복 감사 CLI가 OS 인자를 원본 형태로 처리합니다. 비UTF-8 경로를 허용하고 숫자 인자의 변환 실패를 오류로 반환합니다. 도움말, 런타임 실행, 오류 출력, 프라이빗 출력의 JSON 계약과 파일 권한을 통합 테스트로 검증합니다.

Changes

중복 감사 CLI

Layer / File(s) Summary
OS 인자 처리와 실행 진입점
src-tauri/src/bin/disksage-duplicate-audit.rs
parse_args_os가 OS 인자를 보존합니다. 경로 인자는 비UTF-8 값을 허용합니다. 숫자 인자와 비UTF-8 옵션 인자는 고정 오류로 처리합니다. runmain은 coverage 구성에서도 동일한 실행 경로를 사용합니다.
도움말 및 인자 오류 계약
src-tauri/src/bin/disksage-duplicate-audit.rs, src-tauri/tests/duplicate_audit_help_exit.rs
단일 --help 또는 -h 인자는 사용법을 stdout에 출력하고 성공 종료합니다. 알 수 없는 인자와 비UTF-8 인자는 실패 종료와 고정 stderr를 반환합니다. 비UTF-8 루트 경로의 원시 바이트는 오류 출력에 포함되지 않습니다.
런타임 및 프라이빗 출력 계약
src-tauri/tests/duplicate_audit_coverage_runtime_contract.rs, src-tauri/tests/duplicate_audit_native_private_output.rs
실제 바이너리의 도움말과 읽기 전용 감사 결과를 검증합니다. JSON 필드와 상태값을 확인합니다. 비UTF-8 경로를 포함한 프라이빗 출력은 stdout에 경로를 노출하지 않고, 생성 파일에 0600 권한과 원본 경로를 유지합니다.

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

Merge Risk: 🟡 Moderate · up to 0ac66

The CLI help behavior change is localized, but the pull request is not merge-ready while the required test, release, security, and static-analysis checks remain queued; merge should wait for successful exact-head results.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 56.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 단일 --help 또는 -h 인자의 성공적인 종료 동작을 수정하는 주요 변경 사항을 정확히 요약합니다.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/duplicate-audit-help-success-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 20:14
@seonghobae
seonghobae marked this pull request as draft August 14, 2026 20:07
@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 07:40

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

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

  • Head SHA: f63c0533b566aa32db307fe2d49cf512d08d879b

  • Workflow run: 32132454745

  • 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 (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 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: f63c0533b566aa32db307fe2d49cf512d08d879b
  • Workflow run: 32138827759
  • 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 f63c0533b566aa32db307fe2d49cf512d08d879b.

  • Head SHA: f63c0533b566aa32db307fe2d49cf512d08d879b

  • Workflow run: 32138827759

  • 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 (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 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 f63c0533b566aa32db307fe2d49cf512d08d879b.

  • Head SHA: f63c0533b566aa32db307fe2d49cf512d08d879b

  • Workflow run: 32138827759

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

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

Dismissing: this REQUEST_CHANGES was posted against commit f63c053 where coverage-evidence failed. The PR's current head has coverage-evidence passing (verified via gh pr checks). No unresolved review threads remain. Re-request review to re-validate.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior labels Aug 22, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 19:16
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 19:16
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 19:28
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 19:32

@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 2 new potential issues.

Open in Devin Review

Comment thread src-tauri/src/bin/disksage-duplicate-audit.rs
Comment thread src-tauri/src/duplicate_audit.rs
@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 19:41
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 19:49
@seonghobae
seonghobae marked this pull request as draft August 25, 2026 20:01
auto-merge was automatically disabled August 25, 2026 20:01

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 20:19
@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 20:19
@seonghobae
seonghobae marked this pull request as draft August 25, 2026 20:28
auto-merge was automatically disabled August 25, 2026 20:28

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 20:35
@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 20:36
@seonghobae
seonghobae marked this pull request as draft August 25, 2026 20:57
auto-merge was automatically disabled August 25, 2026 20:57

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 25, 2026 20:59
@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 21:17
@seonghobae
seonghobae merged commit 241caf1 into main Aug 26, 2026
37 checks passed
@seonghobae
seonghobae deleted the fix/duplicate-audit-help-success-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: needs-review Open pull request requiring current-head review or checks type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant