Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0fff919e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| console.log(chalk.green('\n✅ Successful providers:')); | ||
| results.successfulProviders.forEach((provider, index) => { | ||
| console.log(` ${index + 1}. ${provider.name} (score: ${provider.bestScore})`); | ||
| const badge = mtrBadge(provider.bestConnection); |
There was a problem hiding this comment.
Keep bestConnection when rendering MTR provider summary
In printDetailedReport, the successful-provider summary now derives the MTR badge/loss from provider.bestConnection, but entries in results.successfulProviders are populated without a bestConnection field (they only carry provider/name/count/score in runAnalysis). When --detailed output is shown, this makes every successful provider display MTR: ✗, loss: N/A regardless of real MTR results, so the newly added MTR summary is systematically incorrect.
Useful? React with 👍 / 👎.
Motivation
Description
startProbeListenerhelper and newlistenerCLI command incli.jsto run TCP and/or UDP echo listeners usingnetanddgram, with--host,--port, and--protocoloptions.iran_connectivity.jsby introducingmtrAvailable,mtrLossPercent,mtrRawSample, and updatingstageResults.mtrand the connectivity scoring logic to award points based on loss thresholds.cli.jsto display an MTR badge and loss percent in summary and per-provider details, and added the listener and MTR notes toREADME.mdincluding example commands and quick probe snippets.jqexample filtering byports["443"]) and the command reference now listslistener.Testing
npm testand the suite completed successfully.npm run lintwhich passed without errors.node cli.js --helpin CI to validate command registration and it succeeded.Codex Task