refactor(ndm): rename comp/networkdevices to comp/ndmconnectivitycheck #58803
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 487 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.370
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #58803"
general
weight: 0.35
Pierre-L42
What does this PR do?
Renames
comp/networkdevicestocomp/ndmconnectivitycheckand runs it over the shared probing package.The component is the interactive connectivity check that the Private Action Runner drives through the Agent IPC endpoint. It is not the Agent-side component for all of Network Device Monitoring, and its name said otherwise, which is why the discovery work could not sit next to it.
pkg/networkdevice/probe(#58800), so the connectivity check and the discovery sweep share one implementation. One unreachable address no longer discards the results of the addresses probed alongside it, which it did before: an error from any target propagated out of the request'serrgroupand failed the whole check.dto.go, translated to and from the probe package's types.Concurrency is unchanged from
main: a check is bounded by the worker count its own request asks for, and the number of checks in flight is bounded by the Private Action Runner's task concurrency. This PR adds no Agent-side budget and no new configuration.Motivation
Fourth of five pull requests splitting up #56540, which was ~3,000 lines of production code in one review. #58800, #58801 and #58802 have merged; #58804 is the last.
Review feedback addressed
OnStarthook, so every Core Agent pinged loopback at startup, waiting up to a second, even on agents that never serve a connectivity check. Detection already ran lazily behind async.Onceon the first check, so the hook was pure cost.useRawSocketoverride applies only on Linux again. Windows has no UDP pinger and macOS no raw one, and both reject the wrong socket type, so honouring the override everywhere made every target fail on those platforms. The removedbuildPingerforced the type per OS and consulted the request only on Linux;resolveRawSocket(goos, detected, override)restores that and is testable for all three platforms without build tags.network_devices.connectivity_check.workers. Reserving a request's whole worker count for the duration of a scan, regardless of how many targets it had, meant a single-IP check could hold the entire budget and that concurrent checks serialised behind each other in FIFO order. Rather than make the accounting finer, the budget is dropped: PAR already bounds how many checks run at once. Removing it also drops the component'sconfig.Componentdependency.Describe how you validated your changes
dto_test.gocovers the translation both ways, including the per-target failure that previously failed the batch, and the socket-type resolution on Linux, Windows and macOS.bzl build //cmd/agent/subcommands/run:runsucceeds, which matters here because droppingconfig.Componentchanges the component's fx dependencies.dda inv components.lint-componentsanddda inv schema.lintboth pass.comp/README.mdand.github/CODEOWNERSare regenerated rather than hand-edited, including through the rebase ontomain, where they were the only conflicts.Possible drawbacks / trade-offs
A component rename shows up as a large diff for a small change. Reviewing with
?w=1and rename detection on keeps it toscan.go,dto.goandnewcomponent.go.Dropping the budget means the Agent still has no ceiling of its own on probes per request: a request asking for 10,000 workers gets them. That is exactly today's behaviour on
main, so this PR is not a regression, but the bound lives in PAR's task concurrency rather than in the Agent.🤖 Generated with Claude Code