Clarify packet dedupe policy

This commit is contained in:
Jack Kingsman
2026-02-16 19:11:44 -08:00
parent e8ddba0131
commit 95e8bcca08
3 changed files with 12 additions and 0 deletions

View File

@@ -102,6 +102,12 @@ The following are **deliberate design choices**, not bugs. They are documented i
2. **No authentication or authorization**: There is no login, no API keys, no session management. The app is designed for trusted networks (home LAN, VPN). The README warns users not to expose it to untrusted networks.
3. **Arbitrary bot code execution**: The bot system (`app/bot.py`) executes user-provided Python via `exec()` with full `__builtins__`. This is intentional — bots are a power-user feature for automation. The README explicitly warns that anyone on the network can execute arbitrary code through this.
## Intentional Packet Handling Decision
Raw packet deduplication is path-aware by design:
- Keep repeats that represent the same payload arriving via different mesh paths (this path diversity is useful).
- Drop packets that are truly identical observations (same payload and same effective pathing observation) to avoid redundant noise.
## Data Flow
### Incoming Messages

View File

@@ -78,6 +78,11 @@ app/
- Message uniqueness: `(type, conversation_key, text, sender_timestamp)`.
- Duplicate insert is treated as an echo/repeat; ACK count/path list is updated.
### Raw packet dedup policy
- Path diversity is meaningful: same payload observed across different paths should be retained/represented.
- Only truly identical packet observations should be dropped as duplicates.
### Periodic advertisement
- Controlled by `app_settings.advert_interval` (seconds).

View File

@@ -107,6 +107,7 @@ Specialized logic is delegated to hooks:
- `VisualizerView.tsx` hosts `PacketVisualizer3D.tsx` (desktop split-pane and mobile tabs).
- `PacketVisualizer3D` uses persistent Three.js geometries for links/highlights/particles and updates typed-array buffers in-place per frame.
- Packet repeat aggregation keys prefer decoder `messageHash` (path-insensitive), with hash fallback for malformed packets.
- Keep packet repeats that add distinct path observations; only drop truly identical duplicate observations.
## WebSocket (`useWebSocket.ts`)