mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 12:04:41 +01:00
perf(server): bound run reads in authentication and conversation recovery (#17663)
Read compact run identity during authentication and compact turn state during conversation recovery. Preserve fresh checks, durable steering and reply evidence, locking, and complete stored payloads. Validate 184 targeted PostgreSQL and lifecycle tests, workspace typecheck, server build, full CI, and Apex 5/5. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
f9581e533e
commit
9f3a5456ac
8 files changed
+265
-18
No files matched your search
@@ -429,7 +429,8 @@ export function actorMiddleware(db: Db, opts: ActorMiddlewareOptions): RequestHa
|
||||
return;
|
||||
}
|
||||
if (identityRun?.activeIdentityContextId && identityRun.status === "running") {
|
||||
const captured = await captureRunIdentity(db, { companyId: claims.company_id, agentId: claims.sub, runId: claims.run_id });
|
||||
const captured = await captureRunIdentity(db, { companyId: claims.company_id, agentId: claims.sub, runId: claims.run_id },
|
||||
{ readScope: "request_authentication" });
|
||||
identityRun.activeIdentityContextId = captured.context?.id ?? null;
|
||||
identityRun.responsibleUserId = captured.context?.responsibleUserId ?? null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user