Repository navigation
feat(network): advertise core over Bonjour as _seedypod._tcp - #75
Merged
Merged
Conversation
…its without an address Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Contributor
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
1 of 3 tasks
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.
Core-side prerequisite from ADR-0017: advertise core over Bonjour so the iOS app (NWBrowser) finds units without a typed-in address.
src/network/mdns.ts:CoreAdvertiserpublishes_seedypod._tcpon core's HTTP port (PORT, default 3000) via@homebridge/ciao(already pulled in by hap-nodejs at 1.4.0; now a direct dep so the bundled server can import it). Instance name is the unit name, hostname<unit-id>-core.local.id(hald'ssystem.unitId, thenHAL_UNIT_ID, then hostname),v(core version),auth(1whensettings.apiKeyis set, else0). TXT updates live on settings mutations and haldsystemevents.SEEDYPOD_MDNS=0(alsofalse/off), under Vitest /NODE_ENV=test, and whenHOSTis loopback. The Vercel demo is web-only, so nothing runs there. Failures are logged and core carries on; SIGINT/SIGTERM sends goodbyes before shutdown.Test plan
pnpm lint,pnpm tsc,pnpm test(newsrc/network/tests/mdns.test.tscovers enable rules, TXT derivation, hostname label, ciao wiring with a fake responder, live TXT updates, failure and stop paths)PORT=3999 tsx server/index.ts, thendns-sd -L Gardyn _seedypod._tcp localresolvedsim-0001-core.local.:3999withid=sim-0001 v=dev auth=0; SIGINT exited cleanlyavahi-browse -rt _seedypod._tcpshows the unit; setting an API key in Settings flipsauthto1🤖 Generated with Claude Code