Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeszack

Relationships

#4627 Flaky property test: TrustedHosts generator produces xn-- labels that parse correctly rejects

Opened by zack · 11/10/2026· Shipped 11/10/2026

src/serve/local/trusted_hosts_property_test.ts fails for some seeds. The label arbitrary is a string matching ^a-z?$, which can produce a label like xn--0. That is an ACE (punycode) prefix with an invalid encoding, and TrustedHosts.parse rightly rejects it with: --trusted-hosts entry xn--0 is not a host name or host:port.

Seen in verify-build run 1c4f174e-1432-46af-b669-67c941ac59ce (unrelated change, swamp-club#4625): fast-check seed 1967052999, path 27:0:14:14:14:14:14, counterexample [xn--0, undefined, 1, a].

Fix: exclude labels whose third and fourth characters are hyphens (the reserved R-LDH form) from the generator, for example by filtering out labels matching ^..--, so the property only feeds names URL parsing accepts. The parser itself is correct.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 6 MOREPR_LINKED+ 2 MORESESSION_SUMMARIZED

Shipped

11/10/2026, 11:56:46 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/10/2026, 11:37:39 PM

Sign in to post a ripple.