feat: per-source toggle to back up OneDrive cloud-only placeholder files - #133
Merged
Merged
Conversation
Add a per-source PlaceholderPolicy (skip | force_download) end-to-end: new nullable placeholder_policy column (migration 0008), PlaceholderPolicy enum on SourceRow, scanner gate via a pure should_skip_placeholder fn, DTO + TS mirrors, add-source wizard + SourceTable edit controls. Closes #4. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZQVP2tUuTLh8oL31D8heC
Contributor
Coverage
Gate: passed - no coverage regression (epsilon 0.1 pp). |
pmaxhogan
enabled auto-merge (squash)
July 20, 2026 17:01
This was referenced Jul 20, 2026
pmaxhogan
added a commit
that referenced
this pull request
Jul 24, 2026
🤖 I have created a release *beep* *boop* --- ## [2.1.0](v2.0.1...v2.1.0) (2026-07-24) ### Features * **core:** adaptive upload parallelism with throughput probe and disk-saturation gate ([#143](#143)) ([8ecced6](8ecced6)) * **core:** filesystem timestamp-granularity probe with ctime fallback and per-directory gitignore cascade ([#141](#141)) ([344262c](344262c)) * **drive:** support Google Shared Drive destinations end-to-end ([#142](#142)) ([d9c3161](d9c3161)) * **net:** native OS reachability backends with automatic fallback ([#138](#138)) ([319e85f](319e85f)) * **net:** SOCKS5 and PAC proxy support for all outbound connections ([#145](#145)) ([2f0b7d1](2f0b7d1)) * **net:** support a custom corporate root CA for all outbound connections ([#134](#134)) ([929e93d](929e93d)) * per-source toggle to back up OneDrive cloud-only placeholder files ([#133](#133)) ([6863ea3](6863ea3)) * **telemetry:** capture latency percentiles and add rollup query endpoint ([#132](#132)) ([4e9fde6](4e9fde6)) * **telemetry:** preview exactly what a telemetry ping sends ([#139](#139)) ([95fbd9a](95fbd9a)) ### Bug Fixes * **core:** commit file_state for a create that skipped post-upload so the next scan updates instead of re-creating ([#146](#146)) ([f5230d1](f5230d1)) * **deps:** bump tauri-winrt-notification to drop vulnerable quick-xml (closes [#89](#89)) ([#129](#129)) ([232fd8f](232fd8f)) * **telemetry:** exclude pre-schema rows from latency rollup ([#137](#137)) ([1ae6220](1ae6220)) * **ui:** add cursor pointer to buttons and link-buttons ([#136](#136)) ([dbd4809](dbd4809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Issue #4: give each backup source a policy for OneDrive / cloud-only placeholder
files. Windows OneDrive Files-On-Demand marks a dehydrated placeholder with
FILE_ATTRIBUTE_RECALL_ON_OPEN; opening it forces a network hydration, so thescanner has always skipped these by default (DESIGN s5.2.1) to avoid silently
pulling down terabytes of cloud-only data. Some users, though, want those files
backed up. This adds a per-source opt-in to do exactly that.
Policy semantics
New
PlaceholderPolicy(serde snake_case) carried end-to-end:skip(default): unchanged behaviour - a cloud-only placeholder is skippedbefore stat/hash and its existing
file_staterow is preserved (not treated asa deletion).
force_download: the scanner does NOT skip on the recall attribute; thefile flows through the normal open/read path and Windows hydrates it on read
(the byte read happens downstream at hash/upload time, so scan-time
statnever triggers hydration).
Stored as a new nullable
placeholder_policyTEXT column (migration0008).NULL(every pre-migration row) and any unrecognised value decode toskip, sothe change is fully backward compatible with no data migration.
Shape
crates/driven-core:PlaceholderPolicyenum +SourceRow.placeholder_policy,migration
0008, 5 sqlx query sites (2 SELECT + 3 upsert) + regeneratedcommitted
.sqlx/. Scanner gates the skip via a pureshould_skip_placeholder(attrs, policy)fn (mirrors the repo'sclassify_*/fallback_decisionpure-decision pattern) so both branches areunit-testable cross-platform (the real attribute cannot be synthesised on a
temp file portably).
AddSourceRequest(#[serde(default)]),SourcePatch(
Option<PlaceholderPolicy>), andSourceDtogain the field; wired throughadd_source/update_source. TS mirrors updated inipc/types.ts.BOTH the add-source wizard (exclusions step) and the SourceTable inline edit
panel; strings localized in
en-US.json.Tests
should_skip_placeholderboth-policy unit test;from_dbNULL/unknown ->skip + encode round-trip; sqlite
placeholder_policy_round_trip(default +force_download persist/reload/flip).
cargo fmt --check,clippy --workspace --all-targets -D warnings,cargo test -p driven-core / -p driven-app / -p driven-cli / -p driven-chaosall green. Migration0008verified applyingin order.
settings-components.test.tswith mount tests exercising the newtoggle in the wizard and both SourceTable states (reflect current policy +
patch on save).
pnpm lint,vue-tsc --noEmit,pnpm test:unitall green.Note: the scanner import of
PlaceholderPolicyis#[cfg(any(windows, test))]gated to match its only (cfg-gated) consumer, so the non-Windows CI clippy legs
stay warning-free.
Refs #34 (backlog item: OneDrive cloud-only placeholders).
🤖 Generated with Claude Code