GoForge — Build | Test | Ship | Collaborate GoForge — Build | Test | Ship | Collaborate
v1.0.3

Chi

Routes whose parameters and capabilities are facts

$ go get goforge.dev/gpchi@v1.0.3

Current release — v1.0.3. goforge.dev/gpchi is at 100% feature parity with go-chi/chi v5.3.1 (all 127 declarations (54 root + 73 middleware), differential + fuzz tested), race/vet clean and consumes Go+ stdlib v0.207.0. Install with go get goforge.dev/gpchi@v1.0.3.

GoForge Chi targets go-chi/chi v5.3.1. Its migration facade supports core routing while immutable route snapshots add structured conflicts, deterministic matching, exhaustive outcomes, typed parameters, and capability-indexed middleware.

Current parity

The corrected public inventory contains 127 declarations, all implemented with zero deferred manifest rows. _examples and methods on unexported receiver types are correctly excluded from the consumer API denominator. The surface includes routing, request lifecycle, client-IP policy, content policy, authentication, path handling, header routing, response instrumentation, throttling, profiling, compression, and logging. Global middleware correctly runs before route selection and on 404/405 paths. The full behavioral, race/fuzz, and performance audit remains the release blocker.

The compatibility audit has also corrected late-middleware panics, custom method registration, empty parameters, terminal wildcards, ambiguous parameter-shape replacement, nested mount path shifting, and mounted route traversal. Escaped URL parameters, encoded slashes, and wildcard tails now also have direct differential coverage against the pinned upstream release. Default 405 Allow headers and parent fallback inheritance across mounted routers are also preserved, while explicit child fallbacks retain precedence. Fallbacks registered inside Route subrouters remain prefix-scoped rather than changing unrelated paths. The routing differential fuzzer now varies methods, route shapes, escaped values, and missing paths. It also guards the corrected distinction between valid empty internal parameters and an invalid empty final named parameter. Named and wildcard parameters also populate Go’s standard Request.PathValue; route-pattern normalization and inline middleware metadata during traversal match the pinned Chi behavior. Composite path segments now support multiple parameters, literal affixes, and embedded regex constraints such as {id}.json, {id}:{op}, and foo-{suffix:[a-z]{2,3}}.json.

Go+ and standard library

The router and middleware implementation is authored in 14 .gp files and reproducibly generates checked *_gp.go artifacts. Semantic route resolution uses an exhaustive Go+ MatchOutcome enum with matched, method-mismatch, and missing variants.

std/http/route provides indexed patterns, requests, parameter keys, handlers, route sets, and middleware capabilities. Complete parity must add typed regex/refinement evidence, owned request-body states, and capability composition laws.

Performance

Immutable exact-route dispatch is conservatively 5.33× faster than pinned upstream Chi with 100% fewer allocations. Dynamic, regex, wildcard, middleware, mount, traversal, and compatibility dispatch paths still require paired gates.

The accepted content-type compatibility path measures 30.40–33.59 ns versus upstream’s 30.21–30.31 ns, with zero allocations on both sides. It is an explicit speed-target miss; a typed/fused content-policy API is still required.

Named-parameter snapshot dispatch is conservatively 1.19× faster with 50% fewer allocations after removing temporary path/value slices and pooling route contexts. Exact routing with one global middleware is 1.10× faster with equal allocation cost. These remain explicit speed-target misses.

Release gate

All 127 public declarations and packages must pass differential behavior, race/integration, fuzz, and performance gates. Matching Go+/stdlib versions must be public, the vanity module must build for a clean consumer, and the release repository is pulled immediately before tagging.