Repository navigation
Reach a pod by name: --connection benchpod-a1b2c3 / a1b2c3 - #39
Merged
Merged
Conversation
A bare pod name was dialed as a hostname (a1c5c7:8080) and timed out, and
the CLI's Go resolver does not resolve .local either. A value shaped like a
pod name (^(benchpod-)?[0-9a-f]{6}(.local)?$) is now looked up with the
CLI's own mDNS browse (the one discover uses), ending as soon as the pod
answers and asking twice within 3 s because the pod's responder skips an
answer repeated within a second. A pod not heard on the LAN falls back to
usb:<name>. set-connection saves the resolved LAN address (or
usb:benchpod-<id>) so later commands do not browse. Other hostnames still
go to the system resolver.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
benchpod setup --connection a1c5c7failed with "no BenchPod answers at a1c5c7:8080": a bare pod name was dialed as a hostname, and the CLI's resolver does not resolve.localeither (benchpod-a1c5c7.localfails with an i/o timeout).What changes
parseTargettakes a value shaped like a pod name (benchpod-a1b2c3,a1b2c3, optional.local; regex^(benchpod-)?[0-9a-f]{6}(\.local)?$) and looks it up with the CLI's own mDNS browse (the onediscoveruses). The browse ends as soon as the pod answers. Every other hostname goes to the system resolver as before.usb:<name>, with a one-line note on stderr.set-connection <name>saves the resolved LAN address (likediscover --save), orusb:benchpod-<id>when the pod was only heard on USB or its USB link, so later commands skip the lookup.--connection/set-connectionhelp are updated.Tests
set-connectionin three cases.TestIdentityWipeOnlyOverUSBnow stubs the lookup, sobenchpod-a1b2c3.localstill resolves to a LAN address there.ping/statusonly):--connection a1c5c7,benchpod-a1c5c7andbenchpod-a1c5c7.localreach the pod in 0.1 to 1.3 s across 8 back-to-back runs.benchpod-baea06(unplugged from the LAN) falls back to USB.Notes
embeddedci-server webapp/src/docs/coverage/cli.json) needs a refresh for the new help text.internal/fwrefusalsfails locally against the sibling firmware checkout. That is unrelated to this change.🤖 Generated with Claude Code