Skip to content

Sync highlights through Quire Server - #166

Merged
vitofico merged 1 commit into
mainfrom
codex/highlight-sync
Oct 30, 2026
Merged

vitofico merged 1 commit into
mainfrom
codex/highlight-sync

Conversation

@vitofico

@vitofico vitofico commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds highlight sync through the configured Quire Server account. The existing manual, library-resume and reader-pause sync paths now exchange quotations, exact locators, colours, book snapshots and deletion tombstones; local edits also enqueue sync. Highlights remain independent of downloaded files.

Account-scoped storage and frozen request credentials keep one account's passages out of another account's requests. Existing unowned highlights join the first successfully authenticated highlight account. OPDS-only passages remain local to their catalog/account. Pending edits survive unavailable or older servers, interrupted requests and concurrent local changes.

Server push/pull endpoints use deterministic conflicts and per-user revision cursors protected against late commits. Shared Python/Kotlin wire fixtures check Unicode text, opaque locator preservation and conflict ordering. Identity-hash versions never decrease.

Storage and compatibility

  • Room 10→11 preserves existing annotations and adds ownership plus acknowledgement state.
  • Append-only Alembic progress_004 adds user-scoped highlights and revision state for full/sync-only deployments; account export/purge includes them.
  • Older servers keep progress sync working while highlights remain pending. Reader layout and selection anchoring are unchanged.
  • This PR includes both protocol consumers and their migrations/tests so the sync contract can be reviewed together. No agent API, new runtime SDK or shared identity algorithm change.

Validation

  • Full server suite against PostgreSQL: 1,016 passed; Ruff check/format passed.
  • Android focused tests: 151 passed across local storage, sync and app highlight/account flows; compile passed.
  • Independent full source review: passed, with account isolation, exact acknowledgements, paging/rollback, conflict ordering and migrations verified.
  • Full GitHub CI passed on e4d5749: Android debug/release builds, all unit tests, lint, 26 browser regressions, license drift and repository/release-tooling guards; server tests in full/sync-only/AI-only modes; Java/Kotlin and Python CodeQL.
  • Pre-commit passed on all 42 changed files. Independent review has no unresolved findings.

Related issues

Refs #143. PR 3 follows #164 and #165.

@vitofico
vitofico marked this pull request as ready for review October 30, 2026 18:20
@vitofico
vitofico merged commit 78835cf into main Oct 30, 2026
10 checks passed
@vitofico
vitofico deleted the codex/highlight-sync branch October 31, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant