Local storage folder + free-tier preset sync (0.4.15-beta)#29
Merged
Conversation
…n-syx mirror A picked root folder gets two app-managed subfolders, served over /local/*: Presets/ — recursive .syx scan with an mtime-keyed decode cache (junk .syx negative-cached), on-demand byte reads, and sanitized or exact-path writes; Sync/ — an incremental plain-.syx + index.json mirror of the version store (tool-readable by FM3-Edit/Fractal-Bot), with a sha256-verified restore path (store.importVersion). Path-traversal-guarded throughout; atomic index writes; root lives in the never-synced 'local' doc collection.
Free accounts now sync preset versions within server-enforced limits (3 MiB stored · newest full-backup group · 5 snapshots). The old set-difference push would re-push pruned rows forever, so free sync reconciles the cloud to a target set (syncPlan.ts, pure + unit-tested): prune replaced rows first (the DB trigger demands delete-old-before-new), reference-count blobs by path, and pre-flight the deduped size before any write. Prune-guard: a downgraded account never loses data — over-quota pushes are refused, nothing is deleted silently. Pull stays unlimited. quota() RPC rides /cloud/status. 0.4.15-beta.
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
Local storage folder (
/local/*): a user-picked root with an app-managedPresets/.syx library (mtime-cached scans, on-demand reads, safe writes incl. exact-path write-back) and aSync/plain-syx mirror of the version store with sha256-verified restore.Free-tier preset sync: preset versions now sync for every account, reconciled to a target set (newest backup group + newest 5 snapshots, 3 MiB deduped cap) with a prune-guard so downgraded accounts never lose data. Pairs with the axis-cloud quota trigger; paid stays unlimited. Bumps to 0.4.15-beta.
Tests
npm test: 8/8 suites (adds api/local — 13 cases, api/syncplan — 7 plans).