feat: surface pending iCloud provider indexing - #247
Conversation
|
Warning Review limit reachedNext included review available in 7 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 (36)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@OpenCode review current head |
|
Requesting current-head review for 42655ae after merging the current provider-sync base. Please evaluate this exact head; prior reviews/checks are stale. |
|
Current-head base sync pushed at ae1a00d after updating feat/provider-sync-dynamic-goals to 3e72277099cb825aa238ee62133c38acaf96e869. Please review and rerun checks for this exact head. |
|
Current-head fix a0fa7bc: a timed-out lsof shell wrapper could leave descendants holding the pipe, consuming the independent ps probe budget and causing cloud_local_eviction_lsof_warning::slow_lsof_does_not_starve_the_process_command_probe to fail. The bounded lsof probe now creates/kills a process group; focused Rust test passed (3/3) with Rust 1.97.1. Please review this exact head. |
|
Rebased by a normal merge of current parent |
|
Current head DiskSage now retains only Verification: |
|
@coderabbitai review current exact head |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
requested_head='a7a37cccc92ac61b787f6a20045ccae15d5266fe'
echo '== Checked-out commit =='
git rev-parse HEAD
git status --short
git show -s --format='commit=%H%nparents=%P%nsubject=%s' HEAD
echo '== Requested commit availability =='
git cat-file -t "$requested_head"
git show -s --format='commit=%H%nparents=%P%nsubject=%s' "$requested_head"
echo '== Files changed by requested commit =='
git diff-tree --no-commit-id --name-status -r "$requested_head"
echo '== Scoped diff =='
git show --format= --find-renames --find-copies "$requested_head" -- \
'src-tauri/**' 'src/**' 'docs/**' '*ADR*' '*adr*' \
| sed -n '1,2600p'
echo '== Candidate source and test files =='
fd -t f . | rg -i '(icloud|file.?provider|finder|nar[u]?on|evidence|archive|adr)'
echo '== Structural outlines for changed Rust/TypeScript files =='
git diff-tree --no-commit-id --name-only -r "$requested_head" \
| rg '\.(rs|ts|tsx)$' \
| while IFS= read -r f; do
echo "--- $f"
ast-grep outline "$f" --items all 2>/dev/null || true
done
echo '== Focused symbol occurrences =='
rg -n -i -C 4 \
'(disk import|pending-indexable|file.?provider|active.?transfer|finder.*cancel|cancel.*finder|evict|attest|receipt|evidence)' \
src-tauri src docs 2>/dev/null || true
echo '== GitHub PR and check status =='
gh pr view 247 --repo ContextualWisdomLab/disksage \
--json number,headRefOid,mergeStateStatus,statusCheckRollup \
--jq '{number, headRefOid, mergeStateStatus, checks: [.statusCheckRollup[] | {name, status, conclusion, detailsUrl}]}'Length of output: 6243 🏁 Script executed: #!/bin/bash
set -uo pipefail
repo='ContextualWisdomLab/disksage'
pr='247'
head='a7a37cccc92ac61b787f6a20045ccae15d5266fe'
echo '== PR range and hosted checks =='
gh pr view "$pr" --repo "$repo" \
--json baseRefOid,headRefOid,mergeStateStatus,statusCheckRollup \
--jq '{baseRefOid, headRefOid, mergeStateStatus, checks: [.statusCheckRollup[] | {name, status, conclusion, detailsUrl}]}' \
|| echo 'ERROR: unable to query pull-request metadata.'
base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq .baseRefOid 2>/dev/null || true)"
printf 'base=%s\nhead=%s\n' "$base" "$head"
if [ -z "$base" ]; then
echo 'ERROR: PR base SHA was unavailable.'
exit 0
fi
echo '== PR-range changed files =='
git diff --name-status "$base" "$head" || true
echo '== Relevant PR-range diff =='
git diff --find-renames --find-copies "$base" "$head" -- \
'src-tauri/src/icloud_sync_health.rs' \
'src-tauri/src/provider_evidence.rs' \
'src-tauri/src/naruon_cloud_copy_readiness.rs' \
'src-tauri/src/private_evidence.rs' \
'src-tauri/tests/naruon_active_fileprovider_transfer.rs' \
'src-tauri/tests/provider_evidence_retention.rs' \
'src/lib/CloudArchive.svelte' \
'src/lib/IcloudLocalEviction.svelte' \
'src/lib/cloudArchiveAdmissionContract.test.ts' \
'src/lib/icloudLocalEvictionSafetyUiContract.test.ts' \
'docs/architecture/adr/0006-redacted-icloud-health-evidence.md' \
'docs/development/icloud-local-eviction-batch.md' \
| sed -n '1,3600p' || true
echo '== Relevant implementation/test excerpts =='
for f in \
src-tauri/src/icloud_sync_health.rs \
src-tauri/src/provider_evidence.rs \
src-tauri/src/naruon_cloud_copy_readiness.rs \
src-tauri/tests/naruon_active_fileprovider_transfer.rs \
src-tauri/tests/provider_evidence_retention.rs \
src/lib/CloudArchive.svelte \
src/lib/IcloudLocalEviction.svelte \
src/lib/cloudArchiveAdmissionContract.test.ts \
src/lib/icloudLocalEvictionSafetyUiContract.test.ts \
docs/architecture/adr/0006-redacted-icloud-health-evidence.md
do
if [ -f "$f" ]; then
echo "--- $f"
rg -n -i -C 12 \
'(disk import|pending-indexable|file.?provider|active.?transfer|finder.*cancel|cancel.*finder|evict|attest|receipt|retain|bounded)' \
"$f" || true
fi
done
echo '== Full PR patch stat =='
git diff --stat "$base" "$head" || trueLength of output: 232196 🏁 Script executed: #!/bin/bash
set -uo pipefail
base='2b9833c63e01298453985af416d65e26ffbeddfc'
head='a7a37cccc92ac61b787f6a20045ccae15d5266fe'
echo '== Persistence and blocked-duration call sites =='
rg -n -C 10 \
'(write_icloud_sync_health_evidence|admission_blocked_since_ms|admission_blocked_since_ms|inspect_icloud_new_copy_admission|require_new_copy_admission)' \
src-tauri/src || true
echo '== iCloud planning and copy command boundaries =='
for f in src-tauri/src/cloud.rs src-tauri/src/commands.rs; do
echo "--- $f"
git diff --find-renames "$base" "$head" -- "$f" || true
rg -n -C 12 \
'(icloud|new_copy_admission|require_new_copy_admission|copy|attest|evict|provider_sync_attested|local_eviction_authorized|admission_blocked)' \
"$f" || true
done
echo '== API model and UI marker fingerprint =='
git diff "$base" "$head" -- src/lib/api.ts src/lib/CloudArchive.svelte || true
rg -n -C 8 \
'(IcloudSyncHealthReport|IcloudFileProviderActivityEvidence|pending_indexable_count|disk-import|new_copy_admission_blockers|fingerprint)' \
src/lib/api.ts src/lib/CloudArchive.svelte || true
echo '== ADR and product documentation changes =='
for f in \
docs/architecture/adr/0001-cloud-offload-goal-state.md \
docs/product-technical-gap-baseline.md \
CHANGELOG.md
do
echo "--- $f"
git diff "$base" "$head" -- "$f" || true
done
echo '== Focused regression test changes =='
git diff "$base" "$head" -- \
src-tauri/tests/provider_global_sync_disk_full_code_boundary.rs \
src-tauri/tests/naruon_active_fileprovider_transfer.rs \
src/lib/cloudArchiveAdmissionContract.test.ts || true
echo '== Diff whitespace validation =='
git diff --check "$base" "$head" || trueLength of output: 147191 🏁 Script executed: #!/bin/bash
set -uo pipefail
echo '== Backend assignment and command return path =='
rg -n -C 16 \
'admission_blocked_since_ms|write_icloud_sync_health_evidence|inspect_icloud_new_copy_admission' \
src-tauri/src/commands.rs src-tauri/src/icloud_sync_health.rs || true
echo '== Frontend report contract and duration references =='
rg -n -C 10 \
'admission_blocked_since_ms|icloudHealthBlockedSinceMs|IcloudSyncHealthReport' \
src/lib src-tauri/tests || true
echo '== Exact frontend report interface =='
sed -n '820,865p' src/lib/api.ts
echo '== Exact health-refresh duration logic =='
sed -n '479,532p' src/lib/CloudArchive.svelteLength of output: 46326
The hosted checks are complete and successful. The PR is mergeable. The focused numeric-marker regression also covers exact I found one issue. Restart-safe iCloud stall duration is not exposed to the UI.
If the UI restarts while the same pending-indexing or disk-import blocker remains active, the displayed duration resets to zero. The 15-minute Finder cancellation warning is delayed again. This conflicts with the new restart-safe duration behavior described in ADR-0001 and the changelog. Expose You are interacting with an AI system. |
|
Pushed exact-head documentation update |
|
@OpenCode review only the current exact head |
|
Exact-head docs refresh pushed as |
|
@OpenCode review only current exact head |
|
Exact-head ADR amendment pushed as |
|
@OpenCode review only current exact head |
|
Exact-head follow-up pushed at |
|
@OpenCode please review exact HEAD |
|
@OpenCode please review exact HEAD |
|
Exact-head fix |
|
Exact-head verification update for |
|
Exact-head update: the current head is The backend-clock fallback is now actually wired through |
MAX_FILEPROVIDER_DUMP_BYTES was 1 MiB while the sibling provider_global_sync probe allows 32 MiB, and reviewer evidence noted real fileproviderctl dumps run ~5 MiB in the field. The probe was therefore routinely truncating before the per-item exclusion/ materialization markers that follow the aggregate summary, which the existing code comment already flagged as an ordering assumption. Truncation stays fail-closed either way, but raising the cap removes the routine-truncation risk outright rather than relying on that assumption. No test hardcoded the prior byte value. Addresses a reviewer finding on PR #247. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Current-head RCA (exact |
|
Fixed at exact HEAD |
|
Reviewed the two new informational notes at exact HEAD |
|
Validated on current head |
|
The latest Strix job failed at the provider boundary (NVIDIA NIM rate-limit/incomplete scan), not in the changed Rust source; the required gate remains fail-closed. Source, test, security, coverage-source-tree, and release checks are otherwise green. GitHub exposes no rerun endpoint for this job ( |
|
Resolved the three informational Devin threads after checking the exact head: candidate headroom notices intentionally remain conservative while the mutation-time require_local_copy_headroom probe is authoritative; the 128-record retention is the documented bounded design; and the frontend candidate-specific notice is defensive while backend plan notices cover current emitted reasons. No fail-open path was identified, so no source change was needed. |
|
Exact-head check evidence for |
# Conflicts: # CHANGELOG.md # docs/architecture/adr/0001-cloud-offload-goal-state.md # src-tauri/src/naruon_cloud_copy_readiness.rs # src/lib/CloudArchive.svelte # src/lib/cloudArchiveAdmissionContract.test.ts
| has_local_disk_full |= | ||
| contains_bounded_numeric_marker(&marker_lower, "odresult_errno ", "28") | ||
| || contains_bounded_numeric_marker(&marker_lower, "errno ", "28") | ||
| || marker_lower.contains("enospc") | ||
| || contains_bounded_numeric_marker(&marker_lower, "code=", "28") | ||
| || contains_bounded_numeric_marker(&marker_lower, "code ", "28") | ||
| || contains_bounded_numeric_marker(&marker_lower, "osstatus -", "34") | ||
| || marker_lower.contains("no space left on device") | ||
| || marker_lower.contains("disk full"); |
There was a problem hiding this comment.
📝 Info: Disk-full OSStatus marker change is behavior-preserving
Changing contains_bounded_numeric_marker(..., "osstatus ", "-34") to ("osstatus -", "34") is equivalent: the numeric-boundary check inspects the byte after the digits in both forms, so OSStatus -34 matches and OSStatus -340 does not either way. The added regression cases confirm this.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Exact state
43b696b2a14d54b9b6015d5ff3f40b3629ca80ec7eb131c4b4ac628226b262d6406a663fc7dc632fmain -> headcomparison is ahead-only withbehind_by = 0and merge base exactly current main32694816791, Security Scan32694816807, and SAST Semgrep32694816859are queued; Release32694816841is in progress, so none of those pending paths is represented as passing evidenceCurrent product/test repair
plan_cloud_archive_from_snapshot()now computes preview headroom against each candidate's destination/staging filesystem throughrequire_destination_copy_headroom(Path::new(&candidate.dst), candidate.bytes, now_ms), matching the mutation-time native-copy authority while retainingCloudPlanReport.local_volumeas separate source-pressure diagnostics.The first public-boundary regression for this repair used sentinel source timestamps and correctly tripped the planner's real
source-snapshot-staleguard. That was a test-fixture defect, not a reason to weaken source-freshness validation. The current regression binds the fixture to the materialized source file's actual length/mtime and observed clock, then proves a symlinked destination ancestor cannot become capacity authority: the candidate remains dry-run-only and the plan reportslocal-volume-headroom-unverifiedwhile still returning source-volume diagnostics. The pinned Rust 1.97.1 focused run also passes the folded RFC 5322 mail-header planning regression retained below.Stale-convergence preservation
The branch was non-destructively converged onto current main with a two-parent commit and
force:false. Current-main dependency/UI blobs were preserved. Main's foldedReceivedregression, which existed only as a private in-modulecloud.rstest on the then-current base, is preserved on this stack throughsrc-tauri/tests/folded_received_header_plan_regression.rs, which exercises the stronger publicplan_cloud_archiveboundary and verifies bounded header evidence without inspecting the message body.Current review threads are resolved. Predecessor checks/reviews do not transfer to this changed head.
Merge policy
Keep Draft until one unchanged exact head satisfies every applicable Test/Release/Security/SAST and central gate, zero valid unresolved findings, fresh live-base ancestry, actual review governance, repository-wide exact non-vacuous 100% owned-production coverage without exclusions or threshold weakening, package/SBOM/provenance requirements, and effective enforceable main governance. The repository's current non-enforcing main protection is not merge permission. Pending, queued, skipped-required, failed, stale, predecessor, synthetic, status-only, model-only, no-source, or diagnostic-only evidence is non-passing.