mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 08:14:42 +00:00
Carve the nostr rendezvous engine's decision logic out of the async NostrRendezvous driver into synchronous, clock-injected cores, following the failure_state.rs pattern: sync state behind std::sync::Mutex, time passed in as now_ms, no .await and no I/O in the core. The driver performs all relay/socket I/O and executes the returned plans. - AdvertMachine (src/nostr/advert.rs): advert publish/cache/fetch/prune decision logic; the driver executes a returned PublishPlan. - TraversalMachine (src/nostr/traversal_machine.rs): the engine-scoped cross-session decision state -- in-flight-initiator dedup, the dual-init responder suppression election, and the replay/seen-session cache. - classify_punch_packet (src/nostr/traversal.rs): a pure classifier for the punch recv loop's packet branch table. The driver keeps all I/O, the NAT punch send cadence, the offer-slot admission semaphore, and the pending-answer oneshot routing. Behavior- neutral: no wire, config-key, or metric change. Adds unit coverage for the advert plans, election ordering, replay eviction, initiator dedup, and punch classification.