SIGN IN SIGN UP

fix(web): hash overlong path segments so every page builds and links

Forty corpus keys carry a Swift init-signature segment past the 255-byte
filesystem component limit (max observed: 319 bytes), so the static
build's mkdir failed with ENAMETOOLONG and those pages silently never
shipped. The canonical web path now maps any segment over 200 bytes to
truncate(180)~sha1-12 — the same scheme keyPath has always used for
storage files — applied at every emit site (list/tree hrefs, body links,
breadcrumbs, canonicals, sitemap, the .md variant, and the build output
path) so live and static URLs are identical.

The live route resolves hashed paths back to raw keys via a lazy per-db
map of the ~100 long keys, and still serves the raw overlong URL
directly. /api/search additionally carries webPath on the rare hit whose
site URL differs from its corpus key (web-only — MCP/CLI keep the raw
path that read_doc accepts). dist-beta/ build artifacts are gitignored.
G
Gigi committed
2eda335cafb0f4cea4f09a80f77e5f42a75968f8
Parent: 5827592