Skip to content

Verse Tier 1: SyncWorker scaffold (tokio task + ControlPanel supervision) #281

@mark-ik

Description

@mark-ik

Goal

Implement the SyncWorker — the supervised tokio task that manages peer connections, runs the accept loop, and feeds the intent pipeline.

Scope

  • SyncWorker as a ControlPanel-supervised tokio task (matching the pattern of other supervised workers)
  • Accept loop: listen for incoming iroh QUIC connections from trusted peers
  • Per-peer connection state: HandshakingAuthenticatedSyncingIdleDisconnected
  • TrustedPeer lookup against IdentityRegistry on connection; reject unknown peers with a Warn diagnostic
  • Intent pipeline: receive SyncUnit batches from peers, validate, enqueue to GraphIntent reducer
  • Supervision: crash → restart via backon; diagnostics channel sync.worker.* (Info/Warn/Error)
  • Sync status exposed to UI via a SyncState value in shared state (peer count, last sync timestamp, error)

Source Docs

  • design_docs/graphshell_docs/technical_architecture/VERSO_AS_PEER.md
  • design_docs/graphshell_docs/implementation_strategy/2026-03-01_complete_feature_inventory.md (SyncWorker entry)

Parent

Done Gate

  • SyncWorker starts with ControlPanel and restarts on panic
  • Accept loop receives an iroh connection from a test peer
  • Unknown peer connection rejected with Warn diagnostic, does not crash worker
  • SyncState visible in shared state (can be read by Sync Panel UI)
  • sync.worker.started / sync.worker.peer_connected diagnostics emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureImported from backlog ticket stubslane:verse-local-syncVerso iroh bilateral sync (Tier 1 local P2P): SyncWorker, SyncLog, pairing, mDNSstatus:queuedImported from backlog ticket stubstype:childMergeable child slice under a hub issueverseImported from backlog ticket stubs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions