Repository navigation
Conversation
A separate native-repo host process owns the loro-repo-rs engine; the daemon and Electron main each keep one connection, and renderers use finite domain IPC through main. One observation lifecycle pages initial state and applies changed keys. Existing LoroRepo callers keep their API through an incremental external metadata adapter with bounded reads and read-set conditional writes. Legacy CLI and renderer Meta migrate by LWW import with bounded coverage verification. Off by default (LODY_NATIVE_WORKSPACE_META=1), local platform and unencrypted workspaces only. Requires unreleased SDK changes. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Rust engine, client and json-patch packages (with the six platform packages) are published at 0.2.0-next.0 from loro-repo main 98ffc19a, and the TS loro-repo at 0.27.0; no local override is needed. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A legacy-mode daemon that finds the published marker merges the native Meta room's complete export into its SQLite replica and returns the source to legacy ownership, so turning native mode off no longer reopens a stale catalogue and turning it on again re-imports edits made meanwhile. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workspace catalog Flock (`<ws>:wf:workspace`) joins the native switch. Daemon and renderer repos keep their wasm Flock replicas through loro-repo's external Flock owner: loaded from the room's raw export, updated by changes that carry clocks, committed on the existing persistence barriers, and never written to storage or the local data plane. The renderer reaches it through main, which admits only the workspace's owned ids. Migration and write-back use the same room-level step as Meta; the observation lifecycle gains a register mode instead of a second state machine. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every machine Flock and the schedule registry join the workspace catalog as natively owned named Flock documents. Ownership becomes a predicate; migration imports each owned document in a legacy replica's inventory, and write-back walks the Flock registry so a machine first seen in native mode returns too. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With native Workspace Meta the engine owns a local workspace's Machine Flocks: loro-repo persists a write to the owner and reports `no-route`, so the renderer retried a remote sync forever and never confirmed the rows. The landing then kept a removed project selected, because a missing project stays `pending` until the Machine Flock is confirmed. Encrypted workspaces keep the old rule: their engine state does not prove the cloud rows have arrived. Model: claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Packaged Electron cannot load workspace TypeScript behind node_modules. Keep the platform runtime in the local main bundle. Model: gpt-6
Do not register native IPC or open the engine for a never-enabled profile. Keep the rollback marker authoritative across automatic write-back and a failed startup. Retain the browser boundary and the built-desktop Meta readiness fixes needed by B1. Model: gpt-6
Preserve both the local native and encrypted storage contracts in the shared daemon initialization file. Model: gpt-6
Model: gpt-6.2-sol
Read the switch in the installation profile and pass the preload argument through the existing Electron IPC contract. Preserve existing lease and preload tests without broadening their imports. Model: gpt-6.2-sol
Keep Sorbet alpha.41 and main’s workspace graph. Restore only the B1 next.0 native dependency closure and keep the upstream shared importer ordering. Model: gpt-6.2-sol
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Problem / pressure
Land the native sync stack incrementally so the first batch can be reviewed against current main. B1 adds the local foundation behind a development-only environment switch. It does not move Session document bodies or introduce encrypted/cloud native sync.
Summary
90db86cf5b45c03c6271c950bd3c446ac22b540eagainst the16e6aa8c4774faa8dd1bb7faa87d854df7eb2ad8main baseline. For fix(e2ee): keep encrypted workspaces' plaintext stores out of system backups #3885, keep both adjacentdoc.tsimports and the encrypted-only backup exclusion. For chore(deps): bump Sorbet SDK to 0.1.0-alpha.41 #3900, keep main’s@sorbetai/{acp,control}@0.1.0-alpha.41and importer ordering. Resolve onlyapps/cli/package.jsonandpnpm-lock.yaml, preserving the B10.2.0-next.0dependency closure. The frozen lockfile installed successfully. A read-only merge simulation with newer mainf4d989cfafound no conflicts. The evidence below is pinned to the tested pair, not the newer simulated merge.0.2.0-next.0.70cf27f955728c1dd69b1b67816a9e81e8f5a9642e584bb7880fac28d1f04a7eaddb30b330fcc334766062ae6c5acf6284356c721d7f700e420156b02f7fff236c9d56ce5165376f2cenext.0packagesa12be2f1578c5f87994730502a82846070a924db0b08c1e5ecf540b573c55ef853f47ea4299e59f073e3ac76cb211e924b748289fd66169ada69ed67e9f835a921262cea11ecb63336a52867d937f1bb2320905d9b15df3030ef2385f11c08410eb8loro-crdt@1.20.0, adding only the native dependency closure and shared Flock test importer. Kept Sorbet, esbuild, and fix(electron): raise macOS build ulimit and prune CLI .d.ts/.map files #3889's staging/pruning logic while adding the target engine binary. Kept existing AGENTS budgets and raised only shared/node for the new binding rules. fix(e2ee): reopen window readers dropped by an identity gap #3847's IPC channel changes merged automatically. fix(electron): keep the offline E2EE identity across CLI cookie bootstrap #3845 and docs(specs): draft conversation content search #3882 were not modified.f924aed59, the live boundary count from164059153(13 to 14), and B1-relevant AGENTS rules fromca67fcfe5. Settings, remote disable, diagnostics and Session history changes stay out.03fb69ee4bundles it in the OSS main process only. Native-on testing reproduced legacy Meta rejoin and renderer bootstrap failures. Only the B1 portions ofa301c60dare adapted: local external Meta readiness (with the independent Session-room watchdog preserved), projected Meta bootstrap reads, and view retention through in-page routing. No SDK bump, host takeover, E2EE or later-batch backports.Visual explanation
Before / after
The comparison uses B1
90db86cf5and main16e6aa8c4, the pair used for the full validation. Byte counts use the same OSS target and packaging configuration on each platform. Unpacked size is the sum of regular-file sizes in the packaged application payload, with symlinks excluded.Test plan
E2E: onboarding, desktop-windows, project-reopen, mcp-catalog
pnpm check) passed static checks, typecheck and the full test runner. It also passedpnpm check:public-boundaryandpnpm run docs check --base 16e6aa8c4. The on run (pnpm test:ci) passed the full suite. Both ran on isolated GitHub runners at90db86cf5.Testsaggregate alone does not establish full coverage, because the normal groups are skipped for drafts.native-repo-host.js.5493488c7scopes the affected fixtures to their intended legacy or cloud path, without skipping any test. Six regression suites, including the daemon’s actual native-host fixture, passed 133/133 with the flag both unset and set.fb9b8aba0moves the switch to the lightweight installation profile and the launch argument to the existing IPC contract. All 22 startup and bridge regression tests passed on the fix. The fix also removes surplus test comments without changing the repo's comment ceiling.90db86cf5: Electron renderer production graph covers 8,446 module IDs in 657 chunks. The mobile WebView covers 8,586 module IDs in 662 chunks. Neither contains the engine, native client, or shared Node modules. A separate check found no engine runtime markers or bindings in the 1,072 Electron renderer JS files from the packaged Macapp.asar. The private hosted Web composition was not built.