Walks the chi router and records, per method+pattern, the middleware chain
above the global middlewares, the endpoint function, and an access matrix
(anon, API token, super admin, and each business role) produced by running
the route's real middleware chain in front of a stub endpoint. Closure names
drop Go's "func" prefix, which flips with inlining. Guards the upcoming split
of route registration out of server.go: any route, handler, or permission
change shows up as a golden diff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>