Repository navigation
fix(dns): retry the ending list until it loads, then refresh hourly (0.118.2) - #584
Merged
Merged
Conversation
…y (0.118.2) The bridge read the ending list once at start. Restarted on a machine whose resolver is routed to it (the normal setup), it could not reach the registry while it was itself not yet listening, logged 'could not read the ending list', and answered every Moshpit name NXDOMAIN until restarted again. Seen on bonita 2026-10-17: live.streaming and family.ancestry did not resolve though dev2's bridge served both. keepEndingsFresh retries an empty list (5 s, 10 s, 30 s, then every 5 min), refreshes a loaded one hourly (new endings resolve without a restart), and never empties a good list on a failed refresh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan1 finding(s) in the 3 file(s) this pull request changes. HIGH/CRITICAL: 1
105 pre-existing finding(s) elsewhere in the repository — **HIGH/CRITICAL**: 7 | **MEDIUM**: 87 | **LOW**: 11Not introduced by this pull request. The full set is in the Security tab.
…and 85 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Bug:
moshcode dns startread the registry's ending list once, at startup. On a restart, the machine's own resolver is the bridge, which isn't listening yet, so the fetch fails. The bridge logscould not read the ending listand then answers every Moshpit name NXDOMAIN until it's restarted again.Seen on bonita today:
live.streamingandfamily.ancestrydidn't resolve, even though dev2's bridge serves both and the same fetch succeeded seconds later.Fix:
keepEndingsFreshretries an empty list (5 s, 10 s, 30 s, then every 5 min). Once loaded, it refreshes hourly, so newly claimed endings resolve without a restart. A failed refresh never empties a good list. The set is filled in place, and the server already reads it on every query.Tests:
test/dns-endings-retry.test.mjs(3). All 428 DNS tests pass.🤖 Generated with Claude Code