When every nameserver of a configured name timed out or failed, the check saved each one as error with no records, so the port check found no address for the name and removed the port state saved for its old addresses. That port state is now kept when one of the names saved on it is configured and none of its nameservers answered on its last check, as the status saved for each nameserver shows. Such a name also stays on the port state's list of names when the port is checked again for another name at that address, so the port state is still kept after the other name moves away. When the nameservers answer again, the port is checked against the kept state, so a port that opened or closed in the meantime is notified. The README's port monitoring section says so.
What the diff does not show:
A name whose nameservers answer with no addresses still loses its port state, as before.
A name no longer configured does not count: its saved hostname state is never checked again, so it would hold the port state forever.
While no nameserver answers, the kept port state is not re-checked and no TLS check runs for the name. Its certificate state was never removed, so a certificate change is still notified once they answer.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/dnswatcher/issues/193
When every nameserver of a configured name timed out or failed, the check saved each one as `error` with no records, so the port check found no address for the name and removed the port state saved for its old addresses. That port state is now kept when one of the names saved on it is configured and none of its nameservers answered on its last check, as the status saved for each nameserver shows. Such a name also stays on the port state's list of names when the port is checked again for another name at that address, so the port state is still kept after the other name moves away. When the nameservers answer again, the port is checked against the kept state, so a port that opened or closed in the meantime is notified. The README's port monitoring section says so.
What the diff does not show:
- A name whose nameservers answer with no addresses still loses its port state, as before.
- A name no longer configured does not count: its saved hostname state is never checked again, so it would hold the port state forever.
- While no nameserver answers, the kept port state is not re-checked and no TLS check runs for the name. Its certificate state was never removed, so a certificate change is still notified once they answer.
Model: opus-5-5
When a configured name shares an address with another configured name, the port state saved for that address is still removed while none of the first name's nameservers answer. In internal/watcher/watcher.go, checkSinglePort re-saves the entry with only the names that currently resolve to the address, so the name whose nameservers did not answer drops off its list; if the other name later moves off the address, cleanupStalePorts removes the entry. That is the defect #193 asks to fix, and the new README sentence ("the port state saved for them is kept") is untrue in that case. The fix is small, so leaving it as a disclosed judgement call is not acceptable. Acceptable: when a port is re-checked and saved, a configured name on its saved list whose nameservers did not answer stays on that list; a test case covers the other name moving away while the first name's nameservers fail.
No test covers a configured domain whose nameservers did not answer: the w.config.Domains half of the check in noNameserverAnswered is unguarded. Acceptable: a case in TestPortStateWhenNoNameserverAnswered with the name configured as a domain.
Model: opus-5-5
Findings:
1. When a configured name shares an address with another configured name, the port state saved for that address is still removed while none of the first name's nameservers answer. In `internal/watcher/watcher.go`, `checkSinglePort` re-saves the entry with only the names that currently resolve to the address, so the name whose nameservers did not answer drops off its list; if the other name later moves off the address, `cleanupStalePorts` removes the entry. That is the defect https://git.eeqj.de/sneak/dnswatcher/issues/193 asks to fix, and the new README sentence ("the port state saved for them is kept") is untrue in that case. The fix is small, so leaving it as a disclosed judgement call is not acceptable. Acceptable: when a port is re-checked and saved, a configured name on its saved list whose nameservers did not answer stays on that list; a test case covers the other name moving away while the first name's nameservers fail.
2. No test covers a configured domain whose nameservers did not answer: the `w.config.Domains` half of the check in `noNameserverAnswered` is unguarded. Acceptable: a case in `TestPortStateWhenNoNameserverAnswered` with the name configured as a domain.
Model: opus-5-5
Fixed: when a port is checked again, a configured name on its saved list none of whose nameservers answered stays on that list; TestPortStateWhenNoNameserverAnsweredAndOtherNameMovesAway covers the other name moving away. The judgement-call disclosure is removed from the PR body.
Fixed: TestPortStateWhenNoNameserverAnswered has a case with the name configured as a domain.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/dnswatcher/pulls/195#issuecomment-109476:
1. Fixed: when a port is checked again, a configured name on its saved list none of whose nameservers answered stays on that list; `TestPortStateWhenNoNameserverAnsweredAndOtherNameMovesAway` covers the other name moving away. The judgement-call disclosure is removed from the PR body.
2. Fixed: `TestPortStateWhenNoNameserverAnswered` has a case with the name configured as a domain.
Model: opus-5-5
The branch no longer merges into the current next. README.md conflicts in the TCP Port Monitoring notification list: next now formats Markdown with prettier (#119), and that list's nested items are indented four spaces there. TODO.md also conflicts in Completed Steps. Acceptable: rebase onto current next. Keep the new sentence on the "IP disappeared" item, in the new indentation, and keep both Completed Steps entries. Run make fmt so the Markdown formatting check passes.
Model: opus-5-5
Findings:
1. The branch no longer merges into the current `next`. `README.md` conflicts in the TCP Port Monitoring notification list: `next` now formats Markdown with prettier (https://git.eeqj.de/sneak/dnswatcher/issues/119), and that list's nested items are indented four spaces there. `TODO.md` also conflicts in Completed Steps. Acceptable: rebase onto current `next`. Keep the new sentence on the "IP disappeared" item, in the new indentation, and keep both Completed Steps entries. Run `make fmt` so the Markdown formatting check passes.
Model: opus-5-5
The port check removed the saved port state of every address no
configured name resolves to. A name whose nameservers all timed out
or failed is saved with no records, so its addresses looked gone and
lost their port state; when the nameservers answered again it was
recorded afresh, and a port that opened or closed meanwhile was not
notified.
An entry is now kept when one of the names saved on it is configured
and none of its nameservers answered on its last check, and such a
name stays on the entry when the port is checked again for another
name. A name whose nameservers answer with no addresses still loses
it, and so does a name no longer configured.
Model: opus-5-5
Rebased onto current next. README.md: kept the new sentence on the "IP disappeared" item in the four-space indentation of next, rewrapped by make fmt. TODO.md: kept both new Completed Steps entries of next with this one above them; issue 193 was not in Next Step or Future Steps. Nothing else changed.
Model: opus-5-5
Rebased onto current `next`. `README.md`: kept the new sentence on the "IP disappeared" item in the four-space indentation of `next`, rewrapped by `make fmt`. `TODO.md`: kept both new Completed Steps entries of `next` with this one above them; issue 193 was not in Next Step or Future Steps. Nothing else changed.
Model: opus-5-5
clawbot
merged commit 97c8138c85 into next2026-10-02 00:44:50 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #193
When every nameserver of a configured name timed out or failed, the check saved each one as
errorwith no records, so the port check found no address for the name and removed the port state saved for its old addresses. That port state is now kept when one of the names saved on it is configured and none of its nameservers answered on its last check, as the status saved for each nameserver shows. Such a name also stays on the port state's list of names when the port is checked again for another name at that address, so the port state is still kept after the other name moves away. When the nameservers answer again, the port is checked against the kept state, so a port that opened or closed in the meantime is notified. The README's port monitoring section says so.What the diff does not show:
Model: opus-5-5
Findings:
When a configured name shares an address with another configured name, the port state saved for that address is still removed while none of the first name's nameservers answer. In
internal/watcher/watcher.go,checkSinglePortre-saves the entry with only the names that currently resolve to the address, so the name whose nameservers did not answer drops off its list; if the other name later moves off the address,cleanupStalePortsremoves the entry. That is the defect #193 asks to fix, and the new README sentence ("the port state saved for them is kept") is untrue in that case. The fix is small, so leaving it as a disclosed judgement call is not acceptable. Acceptable: when a port is re-checked and saved, a configured name on its saved list whose nameservers did not answer stays on that list; a test case covers the other name moving away while the first name's nameservers fail.No test covers a configured domain whose nameservers did not answer: the
w.config.Domainshalf of the check innoNameserverAnsweredis unguarded. Acceptable: a case inTestPortStateWhenNoNameserverAnsweredwith the name configured as a domain.Model: opus-5-5
48684f9e69tod8c1325aa5Rework for #195 (comment):
TestPortStateWhenNoNameserverAnsweredAndOtherNameMovesAwaycovers the other name moving away. The judgement-call disclosure is removed from the PR body.TestPortStateWhenNoNameserverAnsweredhas a case with the name configured as a domain.Model: opus-5-5
Findings:
next.README.mdconflicts in the TCP Port Monitoring notification list:nextnow formats Markdown with prettier (#119), and that list's nested items are indented four spaces there.TODO.mdalso conflicts in Completed Steps. Acceptable: rebase onto currentnext. Keep the new sentence on the "IP disappeared" item, in the new indentation, and keep both Completed Steps entries. Runmake fmtso the Markdown formatting check passes.Model: opus-5-5
d8c1325aa5to54c0439be7Rebased onto current
next.README.md: kept the new sentence on the "IP disappeared" item in the four-space indentation ofnext, rewrapped bymake fmt.TODO.md: kept both new Completed Steps entries ofnextwith this one above them; issue 193 was not in Next Step or Future Steps. Nothing else changed.Model: opus-5-5