Skip to content

Route sync asset I/O through reducer-issued effects - #52

Merged
RCmerci merged 4 commits into
mainfrom
refactor/logseq-sync-submit
Oct 7, 2026
Merged

RCmerci merged 4 commits into
mainfrom
refactor/logseq-sync-submit

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Asset staging, upload, cache, lease and retry operations previously bypassed the sync reducer. This change makes Core.step the only public producer of runner effects, seals their constructors and execution tickets, and leaves Effect_runner.submit as the public execution entry point. Direct callers now request operations through events and accept completion-derived outputs.

Worker Asset_upload retains durable intent, graph mutation, publication acknowledgement and recovery ownership. Sync Core owns execution admission and completion identity; the runner owns I/O and the existing resource budgets. Cancelled or stale completions reclaim resources, shutdown preserves required cleanup, and distinct staging file identities prevent an old completion from deleting a replacement import. Legacy staging remains recoverable. No compatibility execution wrappers or Dune changes are included.

Review follow-up indexes durable staging filenames once and makes replay bookkeeping reclaimable. Caller-held private effects remain replay-protected across GC, while completed effects no longer leave permanent scope strings in the runner.

Validation:

  • Full repository build: dune build @all app/native_embed.exe.o.
  • Full regression suite on final main 6810edc: dune runtest --force (21 Alcotest suites, 593 named cases plus assertion/script regressions), rerun after the review fixes.
  • Public negative compilation, including private constructors, opaque ticket forgery, module aliases and removed execution APIs.
  • Native direct-caller regressions and upstream Logseq/Apple crypto interoperability through the maximum 8 MiB asset, with the existing memory limits.
  • Independent review of the token control lane, asset waiter cancellation and shutdown completion routing.
  • Runner history-allocation regression reproduced before the fix; held-capability replay and exact-file staging cleanup pass after it. Independent read-only review found no new regression.

The existing spec-dev-tool check --all missing-section failures in 2026-09-28-bottom-lui-capsules.md and final main's 2026-10-06-timeline-soft-scroll-edge.md remain outside this change; this decision document validates. Tests use temporary data and synthetic accounts; no real account or phone acceptance is claimed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T06:47:42.057433Z 49b05d8 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: 49b05d8dd9

ℹ️ 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/effect_runner/effect_runner.ml Outdated
Comment thread logseq_sync/lib/effect_runner/effect_runner.ml Outdated
@RCmerci
RCmerci merged commit 2e998a5 into main Oct 7, 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