feat: core.preferences persistence helpers — get_user_preference / set_user_preference #22
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#22
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?
Summary
Add
get_user_preference(user_id, path)andset_user_preference(user_id, path, value)helpers tocircuitforge_core.preferences. All features (affiliate opt-out, BYOK IDs, future per-user settings) read/write through these — no hand-rolled JSON parsing per feature.Backends
user_preferencesJSON column (GET/PATCH/users/{id}/preferences)~/.config/circuitforge/preferences.yamlBackend is selected automatically based on
CF_ORCH_URL/CF_LICENSE_KEYpresence.API
Dot-path utilities (
paths.py) already exist and handle nested read/write.Blocked on
user_preferences TEXT DEFAULT '{}'column + GET/PATCH endpointsRelated
circuitforge-plans/shared/2026-04-04-affiliate-links-design.md