style: trim comments to load-bearing invariants only

This commit is contained in:
2026-08-25 22:13:41 -07:00
parent 5e9d030297
commit 895737febc
17 changed files with 5 additions and 58 deletions
+1 -6
View File
@@ -41,8 +41,6 @@ const serverFnName = (request: Request, meta?: ServerFnMeta): string => {
return pathParts[pathParts.length - 1] || "unknown";
};
// Successful reads are skipped (client page views cover usage); read failures
// are always recorded. Naming is uniform across every feature server.ts.
export const READ_FN_NAME = /^(get|list|search|fetch|preview|is[A-Z])/;
const readSampleRate = (): number => {
@@ -56,8 +54,6 @@ const shouldRecordSuccess = (name: string): boolean => {
return sample > 0 && Math.random() < sample;
};
// Thrown Responses/redirects are control flow (session refresh 401s, route
// redirects), not failures.
const isControlFlowError = (error: unknown): boolean =>
error instanceof Response || isRedirect(error);
@@ -86,8 +82,7 @@ export const serverFnLoggingMiddleware = createMiddleware({
const userAgent = request.headers.get("user-agent") || undefined;
const safeArgs = redactArguments(data);
// Registered globally, so session middleware runs inside this one; the actor
// is stashed on the Request by getSessionContextCore and read after next().
// Runs outside session middleware; the actor is stashed on the Request and read after next().
const resolveActor = (): string | undefined =>
getRequestActor(request)?.playerId ??
((context as any)?.metadata?.player_id as string | undefined);