You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong base36 example in pkg/dns/encoding.go doc comment #434
pkg/dns/encoding.go has a doc-comment example that doesn't match the actual output of big.Int.Text(36):
// EncodeAccountID converts AWS account ID (12 decimal digits) to base36 (7 chars)// Example: "123456789012" -> "1s69p4h"
Standard base-36 of 123456789012 is 1kpqzg2c (8 chars), not 1s69p4h. Verified with Python, Node (BigInt("123456789012").toString(36)), and against the sibling implementation in lambda/dns-updater/main.go, whose getFullDNSName doc comment correctly shows -> my-instance.1kpqzg2c.spore.host for the same input.
So the two files give contradictory examples for identical logic; pkg/dns/encoding.go's is the stale/incorrect one. Also note the "(7 chars)" is misleading — 12-digit account ids encode to 8 base36 chars.
Cosmetic (doc-only; the code is correct), but confusing when reimplementing the DNS-name scheme against it. Found while building a browser-side reproduction of the {name}.{base36(account)}.spore.host naming for a spawn-ts demo.
Activity
fix(dns): surface DNS registration failures instead of swallowing them (
scttfrdmn commentedon Oct 19, 2026
Fixed in 02e9620 (#436):
pkg/dns/encoding.go:9-10on main now reads "base36 (≤8 chars)" and"123456789012" -> "1kpqzg2c".