feat(sync): opt-in consent layer — per-user, per-product, per-data-class sync preferences #57
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#57
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Circuit-Forge/circuitforge-core#56 defines the sync service API (
push/pull/deleteendpoints for localStorage-keyed blobs). This ticket covers the consent and preference layer that sits in front of it.What to build
Sync preference model
Each user has a set of sync preferences stored in their account, keyed by
{product_slug}:{data_class}:Default: all disabled (local-first, no sync until user opts in).
cf-core module:
sync_prefsget_sync_prefs(user_id, product)→ dict of data_class → boolset_sync_pref(user_id, product, data_class, enabled: bool)→ updates preferenceget_all_sync_prefs(user_id)→ full cross-product preference map (for account page)wipe_sync_data(user_id, product=None)→ deletes synced blobs; if product=None, wipes allAPI endpoints (shared, mounted by each product)
GET /api/v1/sync/prefs— returns current sync preferences for this productPATCH /api/v1/sync/prefs— update one or more preferences{data_class: bool}DELETE /api/v1/sync/data— wipe all synced data for this product (keeps preferences)DELETE /api/v1/sync/all— wipe all synced data + reset preferences to disabledConsent requirements (non-negotiable)
References