Expand description
sync.rs — Gossip Sync Engine & Quarantine Lifecycle
Implements the two missing pieces called out in issue #250:
GossipSyncEngine— incremental, cursor-based sync of gene/capsule assets between two evolution-network nodes.QuarantineStore— remote assets first enter a quarantine area; only after local validation passes are they promoted for reuse.
§Failure-closed safety guarantee
Remote assets that have not been validated are never moved to the
Validated state automatically. Under network partition or message loss
the quarantine store simply retains entries as Pending/Failed until
an explicit validate_asset call succeeds. This ensures correctness ≥
99.5% even under hostile network conditions.
§Sync cursor
Each node maintains a monotonically increasing sequence counter. Peers
exchange their last-seen sequence number so that only new assets need to
be transferred on each round.
Structs§
- Gossip
Sync Engine - Incremental sync engine.
- Network
Audit Entry - Quarantine
Entry - A remote asset held in the quarantine area together with its validation state and origin metadata.
- Quarantine
Store - In-process quarantine store.
- Remote
Capsule Receiver - Drives the receive → score → promote/quarantine pipeline for remote capsules.
- Sync
Stats - Statistics for a single sync session.
Enums§
- Capsule
Disposition - Outcome of an auto-promotion decision for a single remote capsule.
- Network
Audit Disposition - Quarantine
Reason - Reason a capsule was held in quarantine.
- Quarantine
State - Lifecycle state of a remotely received asset.
- Rejection
Reason
Constants§
- PROMOTE_
THRESHOLD - Default score threshold above which a remote capsule is auto-promoted.