security: create cloud review decisions private atomically - #181
Conversation
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
|
@coderabbitai review |
|
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 headea192535bd467dc1a0121ca2886fcdecd04da502. -
Head SHA:
ea192535bd467dc1a0121ca2886fcdecd04da502 -
Workflow run: 31576614667
-
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"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart 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"]
|
|
@coderabbitai review |
Rate Limit Exceeded
|
There was a problem hiding this comment.
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
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore 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 headb645b5af8a3ae113bc4710ae1f2227023f43a581. -
Head SHA:
b645b5af8a3ae113bc4710ae1f2227023f43a581 -
Workflow run: 31928510828
-
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"]
Dismissing: this REQUEST_CHANGES referenced workflow run 31928510828 where coverage-evidence failed at the same head SHA. coverage-evidence has since been re-run and now reports pass (verified via gh pr checks). No unresolved review threads remain. Re-request review to re-validate.
Purpose
Close a crash/race window in the durable cloud-review authority file writer. Protected main already rejects shared-writable review directories, but
write_immutable_decisioncreated the decision file with process-default mode and only later re-resolved the pathname to make it read-only. A crash before that chmod could leave a broader authority file, and a pathname replacement between create and chmod could make the hardening act on a different object.Test-first repair
1436fc87e2e27fbc866279db5fe7ee3eb9972bdfadds the Unix regression contract requiring owner-read-only mode at file creation, post-write permission hardening through the already-openedFile, and no path-based chmod.c0557537922a429cf3dec5fe68cf8b13c599f60ebuildsOpenOptionsexplicitly, applies UnixOpenOptionsExt::mode(0o400)beforeopen, and usesfile.set_permissions(...)after the fsynced write instead ofstd::fs::set_permissions(&path, ...).Exact current state
b645b5af8a3ae113bc4710ae1f2227023f43a581.main:be418bac9bfbdc8aa41b1a698713833e3dbccfdc.src-tauri/src/cloud_review.rs;src-tauri/tests/cloud_review_atomic_private_create.rs;src-tauri/tests/cloud_review_atomic_private_runtime.rs.31584801544, Release31584801573, Security Scan31584801584, and SAST Semgrep31584801525all completed successfully.Scope / ownership
This does not broaden cloud-review authority or mutation behavior. It only makes the existing append-only decision publication fail safer under crash/path-replacement conditions. Provider evidence and other provider/cloud production surfaces remain owned by their existing canonical lanes; this PR does not duplicate them. Repository-wide exact production coverage remains owned by #156.
Required before merge
Keep Draft until the unchanged exact head satisfies every live repository and organization gate together: all applicable exact-head native/central workflows, every still-valid current-head finding, repository-wide exact non-vacuous 100% owned-production region/statement-equivalent, branch, function, and line coverage without exclusions or threshold weakening, fresh protected-main ancestry, and qualifying independent approval where the live ruleset requires it. Pending, queued, skipped-required, failed, stale, predecessor, synthetic, diagnostic-only, status-only, model-only, author-only, no-source-scanner, or infrastructure-only evidence is non-passing.