Skip to content

Simplify sync operation resets and Journal adapters - #110

Merged
RCmerci merged 1 commit into
mainfrom
simplify/journal-state-and-adapters-20261022
Oct 22, 2026
Merged

RCmerci merged 1 commit into
mainfrom
simplify/journal-state-and-adapters-20261022

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Journal repeats graph-operation cleanup across six reducer transitions, carries unused graph metadata through its readiness notification, and parses/maps attachment selections more than once. This change removes those duplicate obligations while preserving existing behavior.

  • Extract the same nineteen constant resets into one private pure helper. Keep each caller's generation handling, pending-effect filtering, cancellation/detach/publication order, and the distinct fail policy.
  • Make internal Graph_ready payload-free. Preserve the actual V2_graph_info request, correlation/failure handling, task-catalog startup and separate admission inspection; worker wire formats are unchanged.
  • Reuse the decoded attachment event and existing to_import mapping. Preserve public attachment entry points, typed/UUID validation, request identity, errors, batch order and replace_reference=None.

No permanent tests, dependencies, Dune, protected specs or Swift changes.

Validation

The focused build and these seven existing test commands passed both before and after:

  • test/journal_routes_test.exe
  • test/journal_platform_test.exe
  • test/journal_graph_runtime_locality_test.exe — 152 cases
  • test/application_view_test.exe — 144 cases, including admission/unlock
  • test/logseq_db_worker_application_integration_test.exe — 15 cases
  • logseq_sync/test/test_sync.exe test 'pure core' — 87 cases
  • logseq_sync/test/test_sync.exe test 'sync recovery reproductions' — 21 cases

Temporary external harnesses compared 1,972 reducer input/public-state/context/ordered-effect records, 5,906 runtime input/request/notification records, and 74 attachment cases byte-for-byte. Baseline replay was deterministic. Runtime comparison normalizes only the intentionally removed Graph_ready argument; scenarios include success, duplicate, failure, abandonment, reset and old completions. Attachment cases cover valid/invalid inputs, exact errors, request IDs and ordered batches. No temporary harness or logs are committed.

Native Swift startup/failure boundary checks also passed (21 scenarios). Independent review of exact head 362796e found no actionable regression. git diff --check and decision-document validation pass.

Limits

Whole-file formatting checks fail on the same four ML files before and after; the MLI passes both. No broad formatting changes were made. Validation uses synthetic inputs and public observations, not opaque reducer internals or a formal equivalence proof. No full App build/full test alias, GUI, Simulator/device, benchmark or real-graph acceptance was run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T11:17:43.326305Z 362796e 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.

@RCmerci
RCmerci merged commit 5abaab4 into main Oct 22, 2026
2 checks 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