mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 11:20:42 +01:00
docs(server): record why the review-participant recovery insert leaves responsibleUserId null
Add a comment above the heartbeat_runs insert in queueReviewParticipantRecoveryRun. It states that claimQueuedRun and initializeRunIdentity set the value later, that no code reads it on a queued row, and that resolving it here would add a throw inside the release transaction that runs the review-recovery path. Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
0bff1d5cb6
commit
0b81bda287
1 file changed
+7
@@ -453,6 +453,13 @@ function buildTransaction(tx: Db, deps: WakeQueuePostgresAdapterDeps): WakeQueue
|
||||
.returning()
|
||||
.then((rows) => rows[0]);
|
||||
|
||||
// This insert does not set responsibleUserId. claimQueuedRun resolves the
|
||||
// responsible user and writes it in the same update that moves the run
|
||||
// from "queued" to "running", and initializeRunIdentity then overwrites
|
||||
// it again from the run identity chain. No code reads responsibleUserId
|
||||
// on a queued row. Resolving the responsible user here, like the other
|
||||
// recovery writers do, would add a throw inside this release transaction
|
||||
// — on the one path whose job is to un-stick a stalled review.
|
||||
const queuedRun = await tx
|
||||
.insert(heartbeatRuns)
|
||||
.values({
|
||||
|
||||
Reference in new issue
Block a user