The DNSCrypt expired-certificate tests pass reliably on Windows #363

Closed
opened 2026-11-06 20:05:58 -05:00 by claude · 0 comments
Owner

Part of epic #8.

  • Draft: none (seen in epic #8 Windows runs on Lofnheim, 2026-11-06)
  • Priority: medium
  • Agent: protocol-coder
  • Depends on: epic #8 part 2 (IgnoreIcmpPortUnreachable, #17)
  • Decisions: none

Why

Ninlil.Dns.Protocol.DnsCrypt.Tests.DnsCryptExpiredCertificateTests (src/dotnet/tests/Ninlil.Dns.Protocol.DnsCrypt.Tests/DnsCryptExpiredCertificateTests.cs) flakes in native Windows runs. Two causes were noted, and neither has been examined in depth yet:

  • Its test client's UDP socket receives a ConnectionReset. Windows reports an ICMP port-unreachable from an earlier send as WSAECONNRESET on the next receive, the same mechanism #17 fixes on the listening side.
  • Its listener port comes from reserve-and-release (GetFreePort), which can race on Windows. The wider conversion is #362. This test may convert first if that is the fix.

What changes

  • Reproduce on Windows (Lofnheim) first. Run the class repeatedly and capture the failure.
  • Fix the cause in the test client, the listener, or both. If a production DNSCrypt UDP socket turns out to miss IgnoreIcmpPortUnreachable, fix it there and say so.
  • Bind on port 0 and read the bound port if the listener can expose it, as #17 did for UdpDnsListener.

Acceptance

  • The failure is shown on Windows, or the run of 20 passes is recorded if it does not reproduce.
  • The class passes 20 times in a row natively on Lofnheim and in the CI container on asgard.
  • Every item in Before you finish that applies is done.
Part of epic #8. - **Draft:** none (seen in epic #8 Windows runs on Lofnheim, 2026-11-06) - **Priority:** medium - **Agent:** protocol-coder - **Depends on:** epic #8 part 2 (`IgnoreIcmpPortUnreachable`, #17) - **Decisions:** none ### Why `Ninlil.Dns.Protocol.DnsCrypt.Tests.DnsCryptExpiredCertificateTests` (`src/dotnet/tests/Ninlil.Dns.Protocol.DnsCrypt.Tests/DnsCryptExpiredCertificateTests.cs`) flakes in native Windows runs. Two causes were noted, and neither has been examined in depth yet: - Its test client's UDP socket receives a `ConnectionReset`. Windows reports an ICMP port-unreachable from an earlier send as WSAECONNRESET on the next receive, the same mechanism #17 fixes on the listening side. - Its listener port comes from reserve-and-release (`GetFreePort`), which can race on Windows. The wider conversion is #362. This test may convert first if that is the fix. ### What changes - Reproduce on Windows (Lofnheim) first. Run the class repeatedly and capture the failure. - Fix the cause in the test client, the listener, or both. If a production DNSCrypt UDP socket turns out to miss `IgnoreIcmpPortUnreachable`, fix it there and say so. - Bind on port 0 and read the bound port if the listener can expose it, as #17 did for `UdpDnsListener`. ### Acceptance - [ ] The failure is shown on Windows, or the run of 20 passes is recorded if it does not reproduce. - [ ] The class passes 20 times in a row natively on Lofnheim and in the CI container on asgard. - [ ] Every item in [Before you finish](https://git.lantea.one/lantea-one/ninlil/src/branch/main/AGENTS.md#before-you-finish) that applies is done.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#363
No description provided.