[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 馃珫 Status page with uptime monitoring & API monitoring as code 馃珫 openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor

perf: resolve active workspace once per request instead of per procedure (#2470) master

* perf: resolve active workspace once per request instead of per procedure Batched tRPC requests re-ran the same user脳workspaces query for every procedure in the batch. Memoize the resolution on the request-scoped context so a batch of N procedures costs one Turso round-trip. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: cover protectedProcedure auth and per-request workspace memoization Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor: make resolveWorkspace zero-arg to remove ignored-args footgun The memoized resolver previously accepted (userId, workspaceSlug) but silently discarded them after the first call. Bind both at context creation instead so the signature can't promise a parameterized lookup it doesn't perform. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>


+141 -5
2 changed files