fix(523): the backup carries user_profiles - the Profile page travels with its user (#5879)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 1m56s
CI & Build / Build & push image (push) Successful in 27s

Settings -> Profile (name, role, expertise, response style, tone, interests,
working hours) is typed by its user and neither derived nor a credential, yet
_NOT_INCLUDED named it, so a restore dropped it without a word.

BACKUP_VERSION 26. Both exports carry it; the restore remaps only the user, and
a blank field stays blank rather than restoring as the page's default. The
column and import guards cover it, and the tar round-trip restores one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 19:55:52 -04:00
co-authored by Claude Opus 5.5
parent 07bc51b890
commit 38d02d9c6f
3 changed files with 90 additions and 5 deletions
+7 -2
View File
@@ -27,7 +27,7 @@ def test_backup_version_is_current():
(Named for the number it asserted until v10, which is exactly the drift a
name-carrying-a-value invites; it now says what it checks.)"""
assert backup.BACKUP_VERSION == 25
assert backup.BACKUP_VERSION == 26
def _exportable_note(**over):
@@ -166,6 +166,7 @@ def _column_guard_targets():
from scribe.models.system import RecordSystem, System
from scribe.models.task_log import TaskLog
from scribe.models.user import User
from scribe.models.user_profile import UserProfile
return {
"users": (User, backup._user_rows),
@@ -213,6 +214,7 @@ def _column_guard_targets():
"family_idea_references": (FamilyIdeaReference, backup._family_idea_reference_rows),
"family_adoptions": (FamilyAdoption, backup._family_adoption_rows),
"family_decisions": (FamilyDecision, backup._family_decision_rows),
"user_profiles": (UserProfile, backup._user_profile_rows),
}
@@ -326,6 +328,7 @@ def _import_guard_targets():
"system_usage_events": backup._build_system_usage_event,
"retrieval_tuning_events": backup._build_retrieval_tuning_event,
"moment_mappings": backup._build_moment_mapping,
"user_profiles": backup._build_user_profile,
"design_systems": backup._build_design_system,
"design_tokens": backup._build_design_token,
"repo_bindings": backup._build_repo_binding,
@@ -599,7 +602,9 @@ async def test_export_full_backup_contains_every_declared_section():
# v25: family canon (milestone 463).
"platforms", "project_platforms", "family_ideas",
"family_idea_platforms", "family_idea_references",
"family_adoptions", "family_decisions"):
"family_adoptions", "family_decisions",
# v26: the Profile page (#5879).
"user_profiles"):
assert key in out, f"missing export section: {key}"
assert out[key] == []