Repository navigation
feat: make packet loss opt-in and drop dead TURN defaults - #167
Conversation
|
LGTM! |
|
💬 Approved with comments — The packet loss opt-in, the early failure on a missing TURN server, setup errors reported through onError, and leaving packet loss out of AIM scores are all correct and tested. The only comment is an optional README note about how the option types are written. Findings: 1 suggestion The decision is advisory: this comment never approves, blocks or requests changes on the pull request. 🔧 Fix with your agentPaste the following into your coding agent to investigate and fix these issues. 📝 Documentation: 💬 1 suggestionOptional: the README lists the TURN options as Recommendation: 💬 Optional Nits
View full review
✅ All other checks passed🚀 Release: ✅ LGTMRisk: Low. The default results change, so this should ship in a minor release, as the description says. 🔒 Security: ✅ LGTMNo security concerns. The change removes the default TURN endpoints and does not add any new network destinations or new handling of credentials. 📖 AGENTS.md: ✅ LGTMThis change follows the repository guidelines. 📋 Code Quality: ✅ LGTMI found no correctness, error-handling or test-coverage problems. I checked these paths:
⚡ Performance: ✅ LGTMNo performance concerns. The change removes a default measurement, adds early-failure paths and filters a few array entries when calculating scores. None of these is on a hot path. Reviewed commit: |
|
AI Code Reviewer finding:
Local Agent verdict:
AI Code Reviewer finding:
Local Agent verdict:
|
|
AI Code Reviewer finding:
Local Agent verdict:
|
|
AI Code Reviewer finding:
Local Agent verdict:
AI Code Reviewer finding:
Local Agent verdict:
|
|
AI Code Reviewer finding:
Local Agent verdict:
AI Code Reviewer finding:
Local Agent verdict:
|
…rrors after construction
|
AI Code Reviewer finding:
Local Agent verdict:
|
The default config pointed packet loss at a TURN server that no longer exists (
turn.speed.cloudflare.com:50000) and a credentials endpoint that only Cloudflare's own origins can use. As a result, the defaultpacketLossmeasurement always failed for third parties.packetLossis removed from the default measurements, andturnServerUri/turnServerCredsApiUrlnow default tonull. speed.cloudflare.com sets its own measurements and TURN config, so it isn't affected.PacketLossEnginerejects the TURN config, the error is caught and reported throughonError(after construction, so it isn't lost withautoStart), and the run moves on to the next measurement. Before, the constructor threw from insideplay(), which would stop the test once the defaults were gone. The engine also fails straight away, rather than after the ICE timeout, when neitherturnServerUrinor the credentials API provides a server. Failed packet loss measurements are now marked finished, soresults.isFinishedis accurate after an error.packetLossmeasurement is configured, packet loss is left out of the scores. A failed measurement still counts as 0 points (Set 0 points to packet loss AIM score in case of ICE connection error #20).turn.cloudflare.com:3478with your own credentials.Default results change, so this should ship in a minor release.