Skip to content

fix(sync): initialize downloads from snapshot metadata - #107

Merged
RCmerci merged 2 commits into
mainfrom
fix/snapshot-download-cursor
Oct 21, 2026
Merged

RCmerci merged 2 commits into
mainfrom
fix/snapshot-download-cursor

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Initial graph downloads now request GET /sync/{graph-id}/snapshot/download directly and initialize the mirror from its validated non-negative integer t. This removes the preliminary GET /sync/{graph-id}/pull request (which omitted since; the server defaulted it to 0). Snapshot completions are fenced to their requested graph so a late result after graph selection cannot activate another graph's URL, cursor, or artifact.

This follows logseq/logseq#13814 and upstream 69da7e2215. Metadata precedes a live stream, so its cursor is preserved for subsequent catchup rather than advanced to a presumed snapshot boundary. Missing/invalid t fails visibly before downloading, matching current upstream; there is no legacy HTTP pull fallback. Existing metadata fields, incremental WebSocket pulls, and optional canonical acknowledgement compatibility remain supported.

Validation on head 9105e97:

  • Full GitHub Journal CI passed: run 39577123672.
  • Sync suite: 303 passed; worker reducer: 20 passed; worker runner: 49 passed; existing worker protocol, integration, LUI, and E2E-support tests passed. Existing overlay sync/storage suites: 98/85 passed. A real SQLite deterministic overlap/reopen probe verifies replay convergence and duplicate rejection.
  • Actual isolated iOS Simulator UI with a synthetic localhost backend: missing t shows an error without a stream request; Retry obtains t=0, imports 412 framed rows, activates, then catches up via WS since=0 and since=1; durable SQLite cursor reaches 2. UI shows Current / Ready / Open without Last error; Ping/Pong is recorded. No initialization HTTP /pull occurs.
  • Final source independently reviewed. Both P1 review findings were fixed in 9105e97 and their regression/fixture checks passed.

Simulator evidence uses fixture authentication and fixture-only localhost certificate trust. It exercises real UI, TLS transport, stream import, activation, and SQLite catchup; real-account login, production TLS, and E2EE were not verified. Host-restamp remains experimental with cross_abi_validated=false. Test adapters, screenshots, logs, and generated apps remain outside the PR. No merge, deployment, or release changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T09:20:49.358482Z 59c12a9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59c12a9672

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread logseq_sync/lib/pure_reducer/core.ml
Comment thread logseq_sync/lib/pure_reducer/core.ml
@RCmerci
RCmerci merged commit ad455f6 into main Oct 21, 2026
1 check passed
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