mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
fix dispatch session identity propagation
This commit is contained in:
@@ -15,6 +15,7 @@ export function createDispatchContext(
|
||||
params: {
|
||||
taskId: string
|
||||
assigneeHandle: string
|
||||
assigneeAgentSessionId?: string | null
|
||||
// Why: pane key is the remint-stable identity behind the handle — lets worker_done ownership survive handle reissue.
|
||||
assigneePaneKey?: string
|
||||
launchTokenHash?: string
|
||||
@@ -64,6 +65,7 @@ export function createDispatchContext(
|
||||
contractVersion: CURRENT_CONTRACT_VERSION,
|
||||
launchTokenHash: launchTokenHash ?? null,
|
||||
assigneeHandle,
|
||||
assigneeAgentSessionId: params.assigneeAgentSessionId,
|
||||
assigneePaneKey: assigneePaneKey ?? null,
|
||||
processIncarnation: processIncarnation ?? null,
|
||||
creatorDispatchId,
|
||||
|
||||
@@ -18,7 +18,7 @@ export const DISPATCH_CONTEXT_CLAIM_SQL = `INSERT INTO dispatch_contexts (
|
||||
creator_dispatch_id, creator_handle, creator_pane_key,
|
||||
status, failure_count, depth, dispatched_at
|
||||
)
|
||||
SELECT ?, run_id, id, ?, ?, ?, ?, ?, ?, ?, ?, 'dispatched', ?, ?, datetime('now')
|
||||
SELECT ?, run_id, id, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'dispatched', ?, ?, datetime('now')
|
||||
FROM tasks
|
||||
WHERE id = ? AND status = 'ready'
|
||||
AND NOT EXISTS (
|
||||
@@ -99,7 +99,6 @@ export function claimDispatchContextRow(
|
||||
params.depth,
|
||||
params.taskId,
|
||||
params.assigneeHandle,
|
||||
params.assigneeAgentSessionId ?? null,
|
||||
params.assigneePaneKey,
|
||||
params.assigneePaneKey,
|
||||
params.paneSuffix,
|
||||
|
||||
Reference in New Issue
Block a user