secubox-deb/packages/secubox-p2p/api
CyberMind-FR 129e9a3e0c fix(p2p): ephemeral.py fail-closed on non-string ts + fresh load() dict
Fix 1: load() now returns {"boot_id": None, "peers": []} directly instead
of returning dict(_EMPTY), preventing shared mutable list between failed loads.
Removed now-unused _EMPTY constant.

Fix 2: expired() now checks isinstance(ts, str) before len(ts) to fail-closed
on non-string expires_ts (malformed on-disk data treated as expired, never crash).

Fix 3: Added 3 regression tests for boundary conditions:
- test_in_range_excludes_network_and_broadcast: verify network/broadcast excluded
- test_expired_failclosed_on_non_string_ts: verify non-string ts swept safely
- test_load_missing_returns_independent_dicts: verify no mutable list sharing

ref #p2p-ephemeral

Co-Authored-By: Gerald KERMA <devel@cybermind.fr>
2026-07-27 06:29:28 +02:00
..
__init__.py Add 4 new modules and RBAC system 2026-03-24 09:39:15 +01:00
annuaire_client.py feat(p2p): macro grant endpoint — self-signed Subscription auth over auto offer (ref #771) 2026-07-01 08:34:20 +02:00
dht.py secubox-p2p: Kademlia DHT + federation health-checks + hierarchical master-link (#774) (#775) 2026-07-03 06:59:35 +02:00
ephemeral.py fix(p2p): ephemeral.py fail-closed on non-string ts + fresh load() dict 2026-07-27 06:29:28 +02:00
federation.py secubox-p2p: Kademlia DHT + federation health-checks + hierarchical master-link (#774) (#775) 2026-07-03 06:59:35 +02:00
macro_grant.py feat(p2p): macro grant endpoint — self-signed Subscription auth over auto offer (ref #771) 2026-07-01 08:34:20 +02:00
main.py secubox-p2p: Kademlia DHT + federation health-checks + hierarchical master-link (#774) (#775) 2026-07-03 06:59:35 +02:00
masterlink.py secubox-p2p: Kademlia DHT + federation health-checks + hierarchical master-link (#774) (#775) 2026-07-03 06:59:35 +02:00
mesh.py secubox-p2p: Kademlia DHT + federation health-checks + hierarchical master-link (#774) (#775) 2026-07-03 06:59:35 +02:00
registry.py feat(p2p): macro UI (SOCKS endpoint + revoke) + 1.9.0 (ref #771) 2026-07-01 13:05:24 +02:00