addRoute split the PATTERN with splitPath, which cuts on every "/" and knows
nothing about brace groups. routers/web/githttp.go registers
m.Methods("GET,OPTIONS", "/objects/info/{file:[^/]*}", repo.GetTextFile(""))
so the constraint was cut in half into "{file:[^" and "]*}". compileSegment
finds no parameter in that fragment and panics by design — but this is
registration, not request handling, so the panic happens before the listener
opens. The process dies at startup and the whole forge is down; v1.26.28 could
never serve a byte, which read as a data problem because a corrupt queue store
was failing slightly earlier in the same boot and masking it.
splitPattern splits only at depth 0, tracking brace depth rather than a boolean
so a nested constraint like {n:[0-9]{2}} still works. splitPath is left exactly
as it was and still backs request routing: in a request path "{" is an ordinary
character and "/" always separates, so making it brace-aware would be a
different, real bug.
Tests cover the live route end to end (registers, matches /objects/info/packs,
and still refuses to span a separator), the nested-brace case, and an explicit
assertion that splitPath did NOT inherit the new behaviour.
Co-authored-by: Hanzo Dev <[email protected]>