Skip to content

fix: make archive-tree help a successful terminal action - #207

Merged
seonghobae merged 12 commits into
mainfrom
fix/archive-tree-help-success-v1
Aug 24, 2026
Merged

fix: make archive-tree help a successful terminal action#207
seonghobae merged 12 commits into
mainfrom
fix/archive-tree-help-success-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make disksage-archive-tree treat a sole --help / -h as a successful terminal action while preserving ZIP inspection, extraction-free Git-tree proof, subset comparison, mismatch failure, argument validation, and filesystem-read authority.

Exact current state

  • Exact source head: b6b997c1e021f2b6f82dbc39c0f973c8265edb60.
  • Independently resolved live protected main: be418bac9bfbdc8aa41b1a698713833e3dbccfdc.
  • The PR is open, Ready for review, and GitHub reports it mergeable.
  • Current semantic delta is exactly:
    • .github/workflows/test.yml;
    • src-tauri/Cargo.toml;
    • src-tauri/src/bin/disksage-archive-tree.rs;
    • src-tauri/tests/archive_tree_help_exit.rs.
  • Current exact-head native workflows are green: Test 31879840750, Release 31879840787, Security Scan 31879840786, and SAST Semgrep 31879840791 all completed success.
  • Conditional PR-inapplicable publication or attestation helpers are not represented as passing publication/provenance evidence.
  • Current-head formal reviews are empty; no approval is claimed or manufactured.

Test-first history and implementation

The original test-only head 68d45e25309f5b66b751a9f79c9cb18fb2f16588 established the real-binary process boundary while protected main routed help through the ordinary error path.

The current implementation is deliberately narrow:

  • consume host arguments with std::env::args_os();
  • map non-UTF-8 input to stable archive-tree-argument-invalid instead of panicking;
  • recognize help only when it is the sole argument;
  • print the exact stable usage synopsis plus one newline on stdout and exit 0;
  • keep unknown-alone and mixed help/unknown invocations non-zero with empty stdout and bounded diagnostics;
  • replace arbitrary unknown-argument reflection with archive-tree-unknown-argument;
  • add beginner-readable public/internal command documentation without changing archive authority.

The focused process regression is registered under the existing archive-cli feature and verifies both help flags, unknown input, mixed help/invalid input in both orders, and Unix non-UTF-8 input.

Archive reads, ZIP limits, Git-tree calculation, root stripping, top-level retention, expected-tree comparison, subset proof, JSON result contracts, and filesystem-read authority remain unchanged.

Remaining integration blockers

Feature-local/current-head native evidence is green, but repository-wide exact 100% owned-production region/statement-equivalent, branch, function, and line coverage remains owned by Draft #156 and is not yet proven on its exact current head. The live organization ruleset also requires a qualifying independent approval including last-push approval and resolved review threads. Ready-for-review status is 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, fresh protected-main ancestry remains current, the live review 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, author-only, rate-limited, no-source-scanner, or infrastructure-only evidence is not passing.


Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

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: 95174b27-6379-4425-98ce-a941e7b07a5d

📥 Commits

Reviewing files that changed from the base of the PR and between be418ba and b6b997c.

📒 Files selected for processing (4)
  • .github/workflows/test.yml
  • src-tauri/Cargo.toml
  • src-tauri/src/bin/disksage-archive-tree.rs
  • src-tauri/tests/archive_tree_help_exit.rs

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


📝 Walkthrough

Walkthrough

disksage-archive-tree에 고정된 도움말과 오류 출력 계약을 추가했습니다. 알 수 없는 인자와 비 UTF-8 인자를 검증하는 통합 테스트를 등록하고 CI에서 실행합니다.

Changes

archive-tree CLI 동작

Layer / File(s) Summary
CLI 인자 처리 계약
src-tauri/src/bin/disksage-archive-tree.rs
단독 --help-h는 사용법을 출력하고 성공합니다. 알 수 없는 인자는 archive-tree-unknown-argument를 반환합니다. 비 UTF-8 인자는 archive-tree-argument-invalid를 반환합니다.
CLI 프로세스 검증
src-tauri/tests/archive_tree_help_exit.rs, src-tauri/Cargo.toml, .github/workflows/test.yml
도움말, 알 수 없는 인자, 비 UTF-8 인자의 출력과 종료 코드를 통합 테스트로 검증합니다. 테스트를 archive-cli 기능과 CI 단계에 연결합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to b6b99

This localized change makes sole --help and -h invocations exit successfully while preserving existing archive behavior; no actionable merge-blocking risk remains after normal checks and review.

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 제목은 archive-tree 도움말을 성공적으로 종료하도록 수정하는 PR의 주요 변경 사항을 정확하고 간결하게 설명합니다.
✨ 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/archive-tree-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 15, 2026 07:41

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

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

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

  • Head SHA: b6b997c1e021f2b6f82dbc39c0f973c8265edb60

  • Workflow run: 32132448709

  • 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["Workflow: test.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: test.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (3 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (3 files)"]
  R2 --> V2["required checks"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: b6b997c1e021f2b6f82dbc39c0f973c8265edb60
  • Workflow run: 32138820899
  • 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 b6b997c1e021f2b6f82dbc39c0f973c8265edb60.

  • Head SHA: b6b997c1e021f2b6f82dbc39c0f973c8265edb60

  • Workflow run: 32138820899

  • 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["Workflow: test.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: test.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (3 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (3 files)"]
  R2 --> V2["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 b6b997c1e021f2b6f82dbc39c0f973c8265edb60.

  • Head SHA: b6b997c1e021f2b6f82dbc39c0f973c8265edb60

  • Workflow run: 32138820899

  • 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["Workflow: test.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: test.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (3 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (3 files)"]
  R2 --> V2["required checks"]
Loading

@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
seonghobae dismissed opencode-agent[bot]’s stale review August 22, 2026 07:35

Dismissing: this REQUEST_CHANGES was posted against commit b6b997c 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 enabled auto-merge (squash) August 24, 2026 01:03
@seonghobae
seonghobae merged commit 17d4e20 into main Aug 24, 2026
36 checks passed
@seonghobae
seonghobae deleted the fix/archive-tree-help-success-v1 branch August 24, 2026 04:51
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