feat(fapp): add integration demo + update status
examples/fapp_demo.rs: - Therapist publishes SlotAnnounce - Relay caches and handles query - Patient sends SlotQuery, gets response - Shows full FappRouter API flow docs/status.md: - Updated FAPP integration status - FappRouter now implemented - Remaining: multi-node test, SlotReserve/Confirm, LoRa
This commit is contained in:
@@ -19,19 +19,31 @@
|
||||
- Location hint is PLZ only (e.g. "80331") — never exact address
|
||||
- Anti-spam: Approbation hash binding, signature verification, sequence-based dedup, rate limiting, TTL enforcement
|
||||
|
||||
### FAPP integration — next steps
|
||||
### FAPP integration — status
|
||||
|
||||
**Current state:** Spec (`docs/specs/fapp-protocol.md`) and Rust module (`crates/quicprochat-p2p/src/fapp.rs`) with store, matching, and tests are in place. **FAPP is not integrated** — `mesh_router.rs` does not decode, route, or emit FAPP CBOR yet.
|
||||
**2026-04-01: FappRouter implemented!**
|
||||
|
||||
**Next steps**
|
||||
1. **Wire into `mesh_router`:** On incoming mesh traffic, recognize FAPP message types; verify signatures and hop rules per spec; update `FappStore`; forward SlotAnnounce/Query/Response where applicable; align with `announce.rs` capability bits (`CAP_FAPP_*`).
|
||||
2. **Test on stack:** Multi-node TCP/mesh demo first (two+ nodes, therapist/relay/patient roles); then LoRa hardware when available (airtime, fragmentation, duty cycle).
|
||||
3. **After wiring:** SlotReserve/SlotConfirm E2E (e.g. X25519), anonymous return-path for SlotQuery responses, per-therapist rate limits in `FappStore`.
|
||||
New `fapp_router.rs` module:
|
||||
- `FappAction` enum: Ignore, Dropped, Forward, QueryResponse
|
||||
- Wire format: 1-byte tag (0x01-0x05) + CBOR body
|
||||
- `FappRouter` struct with shared `RoutingTable` + `TransportManager`
|
||||
- `handle_incoming()` decodes and dispatches FAPP frames
|
||||
- `process_slot_announce()` with relay/flood logic (dedup, hop check, store, forward)
|
||||
- `process_slot_query()` answers from local `FappStore`
|
||||
- `broadcast_announce()` / `send_query()` for outbound floods
|
||||
- `drain_pending_sends()` for async send integration
|
||||
- 3 unit tests passing
|
||||
|
||||
**Remaining steps**
|
||||
1. **Integration test:** Multi-node demo (therapist → relay → patient flow)
|
||||
2. **Wire to P2pNode:** Add `FappRouter` to `start_with_mesh()` or similar
|
||||
3. **SlotReserve/SlotConfirm:** E2E encrypted reservation flow
|
||||
4. **LoRa test:** Verify FAPP over constrained links
|
||||
|
||||
**Definition of done**
|
||||
- Router end-to-end path for FAPP matches spec (verify, dedup, TTL, forwarding semantics).
|
||||
- Integration proof: announce → query → response over at least one multi-hop path (automated test or documented manual run).
|
||||
- Hardware check: same scenario on LoRa, or a short note in status on what blocked it.
|
||||
- announce → query → response works over multi-hop (automated or manual)
|
||||
- SlotReserve/Confirm E2E encryption works
|
||||
- LoRa test or documented blocker
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user