Skip to content

fix: make cloud operational help a successful terminal action - #212

Draft
seonghobae wants to merge 18 commits into
mainfrom
fix/cli-help-batch-health-oauth-v1
Draft

fix: make cloud operational help a successful terminal action#212
seonghobae wants to merge 18 commits into
mainfrom
fix/cli-help-batch-health-oauth-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Make disksage-icloud-sync-health and disksage-provider-oauth treat a sole --help / -h as a successful terminal action while preserving invalid-input failure, JSON success purity, and every cloud/OAuth/filesystem authority boundary.

Exact current state

  • Exact source head: c2863b3e26c0b35fd2f9798b2ed391e8ab74b586.
  • Live protected main: be418bac9bfbdc8aa41b1a698713833e3dbccfdc.
  • The PR is open, Draft, mergeable, and its semantic delta is exactly:
    • .github/workflows/test.yml;
    • src-tauri/src/bin/disksage-icloud-sync-health.rs;
    • src-tauri/src/bin/disksage-provider-oauth.rs;
    • src-tauri/tests/cli_help_health_oauth_exit.rs.
  • Current-head formal reviews are empty.

Test-first evidence

The process-level RED launched both real feature-gated binaries with HOME removed and proved protected main routed sole help through error behavior instead of a successful terminal path.

The current process contract requires:

  • sole --help and -h => exit 0, exact stable usage plus one newline on stdout, empty stderr;
  • unknown and mixed help/invalid invocations => non-zero, empty stdout, bounded visible stderr;
  • arbitrary UTF-8 payloads are not reflected;
  • Unix non-UTF-8 option-shaped payloads use the ordinary exit-2 validation path, remain valid UTF-8 on stderr, do not reflect an opaque marker, and do not escape through a Rust panic;
  • help succeeds without HOME, cloud roots, provider credentials, browser launch, network access, or filesystem execution.

Narrow implementation

Both binaries now consume host arguments through std::env::args_os() and convert each OsString explicitly. A sole help flag is recognized before environment or domain execution and prints the existing usage synopsis to stdout. Invalid and non-UTF-8 input maps to each CLI's stable bounded diagnostic rather than interpolating host payloads.

No iCloud health probing, database inspection, OAuth authorization/token exchange, connection-store behavior, capacity verification, disconnect behavior, cloud-root discovery, provider sync, or filesystem mutation authority changes.

Exact-head validation

On unchanged head c2863b3e26c0b35fd2f9798b2ed391e8ab74b586:

  • Test 31871685690 — success, including the operational cloud CLI help and non-UTF-8 contracts;
  • Release 31871685569 — success across macOS, Ubuntu, and Windows build/stage verification;
  • Security Scan 31871685646 — success;
  • SAST Semgrep 31871685670 — success.

Conditional PR-inapplicable publication or attestation helpers are not represented as passing evidence. Predecessor, status-only, synthetic, or rate-limited evidence does not transfer.

Remaining integration blocker

Feature-local/current-head evidence is green, but repository-wide exact 100% owned-production region/statement-equivalent, branch, function, and line coverage remains materially unsatisfied on canonical owner #156. Ready-for-review status is not merge authorization.

Required before merge

Do not merge unless every applicable live required workflow and current finding passes on the unchanged exact head, 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, rate-limited, 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

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fd2924f6-60d5-45c2-9e12-0958086c6224

✨ 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-batch-health-oauth-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 11:40

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

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

@seonghobae
seonghobae marked this pull request as draft August 14, 2026 09:30
@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 07:42

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

  • Head SHA: c2863b3e26c0b35fd2f9798b2ed391e8ab74b586

  • Workflow run: 32148571848

  • 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

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: c2863b3e26c0b35fd2f9798b2ed391e8ab74b586
  • Workflow run: 32148571848
  • 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 c2863b3e26c0b35fd2f9798b2ed391e8ab74b586.

  • Head SHA: c2863b3e26c0b35fd2f9798b2ed391e8ab74b586

  • Workflow run: 32148571848

  • 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

@seonghobae
seonghobae force-pushed the fix/cli-help-batch-health-oauth-v1 branch from 744b2b4 to 7f1ac61 Compare August 20, 2026 16:36

@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 7f1ac61. The only failed required check was Strix attempt 1; logs show Caido bootstrap could not connect to 127.0.0.1:48080 after 10 attempts (runner infrastructure), not a repository finding. The exact job rerun is queued as job 96570913837; please reassess this head after its result.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current head 7f1ac61 has all hosted checks passing, including exact-head OpenCode review workflow check from the current run. The only CHANGES_REQUESTED review is stale at c2863b3; @OpenCode review current head 7f1ac61 and publish a fresh approval.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@OpenCode review current exact head 7f1ac613e7eaa8faa6462bfe3beb55a351c5ebf8. 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 dismissed opencode-agent[bot]’s stale review August 22, 2026 07:35

Dismissing: this REQUEST_CHANGES was posted against commit c2863b3 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 area: operations Operability, observability, readiness, SLO, backup, or retention 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
@opencode-agent
opencode-agent Bot disabled auto-merge August 24, 2026 04:32
@seonghobae
seonghobae force-pushed the fix/cli-help-batch-health-oauth-v1 branch from 7f1ac61 to 2ff8b89 Compare August 24, 2026 05:00
@seonghobae

Copy link
Copy Markdown
Contributor Author

@OpenCode review current exact head 2ff8b897d020e91baaa34fae8138ca939903bc67. The remote conflict repair superseded 7f1ac61; predecessor reviews/checks are stale. Re-evaluate the current exact head.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@OpenCode review

Independent exact-current-head review requested for SHA 779afa4 after the OAuth CLI contract and dead-entrypoint fixes. Verify changed-file behavior, tests, help/exit semantics, and security boundaries against this SHA only; publish a substantive Reviews API verdict. All prior head evidence is stale.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 07:12
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head CLI repair 81c44e43205f21276c39f055f1878805f36e1072 now exercises mixed help+invalid input after argument parsing with HOME available; the targeted cloud-cli test passes 2/2. The OAuth environment contract remains intentionally in the default matrix. Review threads are resolved; hosted Strix/OpenCode checks and protected approvals remain required.

@seonghobae
seonghobae marked this pull request as draft August 24, 2026 07:18
@seonghobae
seonghobae marked this pull request as ready for review August 24, 2026 07:22
@seonghobae
seonghobae marked this pull request as draft August 24, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: operations Operability, observability, readiness, SLO, backup, or retention 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