Skip to content

fix(database): support upstream schemas 23–26 for sync restore - #549

Open
stan-lei wants to merge 3 commits into
SaladDay:mainfrom
stan-lei:fix/sync-upstream-schema-24
Open

stan-lei wants to merge 3 commits into
SaladDay:mainfrom
stan-lei:fix/sync-upstream-schema-24

Conversation

@stan-lei

@stan-lei stan-lei commented Nov 5, 2026 •

Copy link
Copy Markdown

Upstream database snapshots with schema 23–26 currently fail to open or restore because the CLI only accepts schema 22. This PR follows upstream schema 26 at cf341a8, including its migrations and repairs for early WorkBuddy databases.

Existing upstream MCP/Skills flags and session parser state are preserved through migration, edits and sync. The sync protocol and remote layout stay unchanged; this adds database compatibility only, without new app management features. Schemas above 26 remain rejected. Once upgraded, the database cannot be opened by CLI v5.11.3 or earlier.

Fixes #553.

Validation:

  • 149 relevant tests passed across database migrations, backup/restore, sync protocol, WebDAV and parser-state preservation.
  • cargo fmt --check and cargo clippy --lib --no-default-features passed; Clippy reported 14 existing warnings outside the changed code.
  • One additional macOS test, database::tests::init_rejects_unsafe_config_dir, fails on the system /tmp symlink; the same failure was reproduced on the unchanged main baseline.

CLI v5.11.3 supports database schema 22 while the desktop app writes schema 24, so WebDAV/S3 restore rejects the snapshot in validate_sql_user_version_for_import.

Align the fresh-table DDL and migrations with upstream v23/v24, switch the Claude cursor update to an upsert so parser_state is not reset, and extend tests and fixtures through schema 24.
@SaladDay SaladDay changed the title fix(webdav): support upstream schemas 23 and 24 for WebDAV/S3 restore fix(database): support upstream schemas 23–26 for sync restore Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants