Skip to content

Make sync state ownership process-neutral - #159

Merged
myobie merged 1 commit into
mainfrom
refactor/sync-process-neutral
Sep 4, 2026
Merged

Make sync state ownership process-neutral#159
myobie merged 1 commit into
mainfrom
refactor/sync-process-neutral

Conversation

@myobie

@myobie myobie commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Give SyncEngine explicit config and state paths instead of a FabricHome.
  • Add explicit-path load and save APIs for SyncBook.
  • Replace the daemon validation-log dependency with the sync-owned fabric::sync target.
  • Keep peer addresses and policy inside the daemon transport; the engine receives an opaque key and display name.
  • Hold <state-root>/owner.lock for the complete engine lifetime.
  • Keep the embedded daemon engine as the production owner.

Red proof

Before the production change, the new owner property reached and parsed deliberately corrupt state in a second engine. It failed because no owner lease existed.

After the change, the second engine fails on the owner lease before it reads state. Dropping the first engine releases the lease and permits a restart.

Verification

  • cargo check --all-targets — passed
  • cargo test --lib — 471 passed, 4 ignored
  • engine suite — 103 passed, 3 ignored
  • real Iroh sync and restart — 3 passed in 136.30 seconds
  • folder convergence matrix — 18 passed in 223.80 seconds
  • unchanged five-second pipe property — 502 samples, 10.005 ms source maximum, 24.718 ms delivery maximum, 8 scans
  • git diff --check — passed

This pull request changes no durable format and activates no companion path. Reverting it removes only the boundary and owner lease. No release or deployment is included.

@myobie
myobie force-pushed the refactor/sync-process-neutral branch from 96f4cf2 to 3ca4e58 Compare September 4, 2026 23:23
@myobie
myobie force-pushed the refactor/sync-process-neutral branch from 3ca4e58 to 4647dbc Compare September 4, 2026 23:24
@myobie
myobie merged commit 8d5c1d8 into main Sep 4, 2026
3 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