docs: reconcile current gap baseline - #258
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughDiskSage 제품 요구사항이 메타데이터 판정, 복사 검증, 취소·실패 처리, 퇴거 제어, 캐시 롤백 및 개인정보 경계를 정의하도록 확장되었습니다. 기술 기준선은 2026-08-26 저장소 상태, 제공자 갭, Naruon schema 검증 및 Finder/iCloud 운영 증거를 반영하도록 갱신되었습니다. Changes제품 요구사항 및 기술 기준선
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to This documentation change updates the product baseline and requirements, but the current text still leaves provider-state transitions, durable success receipts, failure and cancellation outcomes, safety invariants, and cache exclusion insufficiently defined or evidenced. Merging now could leave teams relying on an inaccurate requirements baseline and ambiguous acceptance criteria, so follow-up is needed before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches🧪 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 |
| destination: &Path, | ||
| local_root: &Path, | ||
| bytes: u64, | ||
| control: &ProviderUploadControl<'_>, |
There was a problem hiding this comment.
🟡 Cancelled setup still creates folders
Cancellation or expiry during provider setup bypasses control until chunk upload begins. Google can create folders after cancellation, while OneDrive leaves a session.
Prompt for agents
Thread ProviderUploadControl checks through the OneDrive and Google setup operations in src-tauri/src/provider_api_write.rs. Check before and after each network request and before each provider mutation, including metadata lookup, parent traversal/folder creation, and upload-session creation. On cancellation or deadline expiry, clean any command-created session or folders that can be proven command-owned without touching pre-existing provider objects.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if let Err(error) = control.check() { | ||
| let cleanup = delete_uploaded_object(provider, &object_id, bearer_token); | ||
| return Err(match cleanup { Ok(()) => error, Err(cleanup_error) => format!("{error},provider-api-upload-cleanup-failed:{cleanup_error}") }); |
There was a problem hiding this comment.
🟡 Late cancellation is ignored
After control.check() passes, the command remains cancellable through hashing and attestation but never checks again. An accepted cancellation can still produce a successful receipt.
Prompt for agents
Extend the provider-copy operation control beyond upload_file into the caller's post-upload lifecycle. Recheck cancellation and the same deadline during or immediately after source verification, before receipt persistence, and around attestation. If cancellation or expiry occurs before the immutable receipt commits, delete the completed provider object and journal the failure. Ensure cancel_cloud_copy cannot acknowledge a cancellation once the operation has crossed a clearly defined non-cancellable completion boundary.
Was this helpful? React with 👍 or 👎 to provide feedback.
| fn preserve_upload_error_with_session_cleanup(agent: &ureq::Agent, session_url: &str, authorization: Option<&str>, upload: Result<String, String>) -> Result<String, String> { | ||
| match upload { | ||
| Ok(object_id) => Ok(object_id), | ||
| Err(error) => match abandon_upload_session(agent, session_url, authorization) { | ||
| Ok(()) => Err(error), | ||
| Err(cleanup_error) => Err(format!("{error},provider-api-upload-session-cleanup-failed:{cleanup_error}")), |
There was a problem hiding this comment.
🟡 Completion errors orphan uploaded objects
A malformed completed-upload response makes upload_chunks fail without an object ID. Session cleanup accepts 404 or 410, leaving the uploaded object and blocking retries.
Prompt for agents
Handle ambiguous completion separately from ordinary resumable-session failure in src-tauri/src/provider_api_write.rs. When a completion status is received but its body cannot yield an object ID, reconcile the exact destination through the provider API using command-bound identity before declaring cleanup successful. Delete only an object proven to belong to this upload, or return and journal an explicit ambiguous-completion error that does not claim the session cleanup removed the completed object. Add tests for malformed, truncated, and missing-ID 200/201 responses followed by 404/410 from the session URL.
Was this helpful? React with 👍 or 👎 to provide feedback.
| #[test] | ||
| fn provider_upload_rejects_pre_start_cancellation() { | ||
| let cancel = AtomicBool::new(true); | ||
| let control = ProviderUploadControl::new(&cancel, Instant::now() + Duration::from_secs(1)); | ||
| assert_eq!(control.check().unwrap_err(), "cloud-copy-cancelled"); | ||
| } | ||
|
|
||
| #[test] | ||
| fn provider_upload_observes_cancellation_between_chunks() { | ||
| let cancel = AtomicBool::new(false); | ||
| let control = ProviderUploadControl::new(&cancel, Instant::now() + Duration::from_secs(1)); | ||
| control.check().unwrap(); | ||
| cancel.store(true, Ordering::SeqCst); | ||
| assert_eq!(control.check().unwrap_err(), "cloud-copy-cancelled"); | ||
| } | ||
|
|
||
| #[test] | ||
| fn provider_upload_observes_post_success_cancellation_before_receipt() { | ||
| let cancel = AtomicBool::new(false); | ||
| let control = ProviderUploadControl::new(&cancel, Instant::now() + Duration::from_secs(1)); | ||
| cancel.store(true, Ordering::SeqCst); | ||
| assert_eq!(control.check().unwrap_err(), "cloud-copy-cancelled"); | ||
| } | ||
|
|
||
| #[test] | ||
| fn provider_upload_enforces_one_overall_deadline() { | ||
| let cancel = AtomicBool::new(false); | ||
| let now = Instant::now(); | ||
| let control = ProviderUploadControl::new(&cancel, now); | ||
| assert_eq!(control.check_at(now).unwrap_err(), "cloud-copy-deadline-exceeded"); |
Purpose
Refresh
docs/product-technical-gap-baseline.mdwith the live protected-main head and exact current PR/check evidence captured on 2026-08-25. This is documentation-only and does not grant transfer, attestation, eviction, or merge authority.Evidence
7eb131c4b4ac628226b262d6406a663fc7dc632fValidation
git diff --checkgh pr viewinventory for PRs fix: make Git worktree audit help terminal #249, feat: surface pending iCloud provider indexing #247, feat: add accessible Storybook UX contracts #246, security: reject symlink roots before canonicalization #227, fix: replace starter shell metadata with DiskSage identity #204, and security: bind Homebrew execution to approved script bytes #206.Summary by CodeRabbit