gossip.py:
- auto_seed param: when refs arrive for an unknown RID, calls 'rad seed <RID>'
then triggers a sync; adds the RID to self.rids so it gets polled going
forward. Combined with auto_discover, the seed becomes fully self-populating.
- Delta broadcasts: _broadcast now accepts old_refs and sends only the changed
subset with "delta": true in the packet. A 50-ref repo push shrinks from
~2.5 KB to ~120 B on LoRa — 95% bandwidth reduction.
- _on_packet: handles "delta": true by merging incoming refs onto local state
instead of replacing; correctly detects changes after merge.
- _auto_seed_and_sync: calls rad seed, adds rid to watchlist, then delegates
to _trigger_sync. No-ops cleanly if rad seed fails.
- _send_initial_refs still sends full refs (new peer has no prior state).
cli.py:
- cmd_seed: passes auto_seed=True to GossipRelay so the seed self-populates
from the mesh as remote seeds announce their repos.
tests/test_gossip.py:
- Delta packet tests: merge, no-sync-on-known, full vs delta flag
- Auto-seed tests: seeds+syncs unknown repo, no-sync on failure, no dup rid
- Broadcast delta tests: full when no old_refs, only changed when delta,
_send_initial_refs always sends full
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>