chore: replace `grandcat/zeroconf` with `hashicorp/mdns` for mDNS discovery #80
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 298 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.341
Real PR Conversation Timeline
1 comments
"Review active on #80"
general
weight: 0.35
L3n41c
Description
Replaces the unmaintained
github.com/grandcat/zeroconf(last commit Dec 2023, only tag v1.0.0 from 2019, 56 open issues) withgithub.com/hashicorp/mdns v1.0.7(actively maintained) for the Freebox mDNS discovery of the_fbx-api._tcpservice.This also removes the dead
github.com/cenkalti/backoff v2.2.1+incompatibleindirect dependency from the module graph.Motivation / context
grandcat/zeroconfis no longer maintained and drags in the abandonedcenkalti/backoffv2 module (v4/v5 exist upstream).hashicorp/mdnsonly depends onmiekg/dnsandgolang.org/x/net, both already present in the module graph.-
hashicorp/mdnsnever closes theEntrieschannel and sends to it non-blockingly, so termination relies on the context only (noclose(Entries), nookcheck);- it does not filter answers by service type (explicit TODO in its
client.go), so entries are filtered by the_fbx-api._tcp.local.suffix inDiscover;- the query loop is bounded by
QueryParam.Timeout(set to the existing 5s discovery timeout) instead of zeroconf's infinite periodic probing.Changes
internal/freebox/discovery.go:Discovernow usesmdns.QueryContextwith aQueryParam(Service: "_fbx-api._tcp",Domain: "local.",Timeout: discoverTimeout, bufferedEntrieschannel, error returned via a buffered channel).parseServiceEntryreadsentry.InfoFields/entry.Host/entry.Port.internal/freebox/discovery_test.go: test entries adapted tomdns.ServiceEntry(Host,InfoFields).go.mod/go.sum:github.com/hashicorp/mdns v1.0.7added;grandcat/zeroconfandcenkalti/backoffremoved (verified withgo mod graph).Verification checklist
go build ./...go vet ./...golangci-lint run— 0 issuesgofmtclean on modified filesgo test -race ./...— all packages passgo mod graphconfirmsgrandcat/zeroconfandcenkalti/backoffare goneDiscoverreturns a clean wrapped error when no Freebox answers on the network — no hang, no goroutine leakNote: this PR is independent from the older open PR #45 on
chore/replace-zeroconf-with-hashicorp-mdns; it was written from scratch on top of currentmain.