Dev log #21 Hardening WebRTC-Direct and solving SCM leaks
Description and use
Resolved WebRTC‑Direct race conditions and socket leaks in py‑libp2p, fixed SCM polling issues in agent‑orchestrator, improved documentation and CI stability.
Problem
Interoperability and resource leaks in py-libp2p WebRTC-Direct and incorrect SCM polling in agent-orchestrator caused unstable connections and CI failures.
Outcome
Improved cross‑language WebRTC interoperability, eliminated socket leaks, corrected SCM polling, and enhanced documentation, leading to stable CI and reliable agent operation.
Workflow
- Identify race condition in WebRTC dialer; modify ICE credential setup before first‑contact replay.
- Add socket close logic in mplex and swarm shutdown handlers.
- Implement ICE‑Lite listener PR #1532 in py‑libp2p.
- Fix backslash filename handling in agent‑orchestrator PR #5055.
- Update GitHub polling logic to respect 'since' parameter.
- Run tests to confirm no socket leaks and CI passes.
- Merge PRs and close redundant ones.
- Document changes in PR #1513.
- Review related PRs and issues.
- Plan next steps for remaining socket leak cleanup and ICE‑Lite listener completion.
Evidence
fixed a race condition in the WebRTC dialer where ICE credentials weren’t being set correctly before the first‑contact replay
fixed socket leaks in both mplex and the swarm
backslash filename bug on non‑Windows systems
- Record date: 2026-09-21T22:15:43.671Z