From e724beab8e23ebc6db0c09ed8fd55cbcbab06212 Mon Sep 17 00:00:00 2001 From: Merge Sim Date: Tue, 8 Sep 2026 15:54:06 -0700 Subject: [PATCH] fix native run authority type narrowing --- .../runtime/rpc/methods/orchestration/runs/runs.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/runtime/rpc/methods/orchestration/runs/runs.ts b/src/main/runtime/rpc/methods/orchestration/runs/runs.ts index dae7d1b2bbe..9a1023ad48b 100644 --- a/src/main/runtime/rpc/methods/orchestration/runs/runs.ts +++ b/src/main/runtime/rpc/methods/orchestration/runs/runs.ts @@ -47,8 +47,12 @@ export const ORCHESTRATION_RUN_METHODS: RpcMethod[] = [ }) return { run: exposeRun(run) } } + const coordinatorHandle = params.from + if (!coordinatorHandle) { + throw new OrchestrationError('stable_pane_required', 'Missing coordinator identity.') + } const paneKey = resolveOrchestrationCaller(runtime, { - callerTerminalHandle: params.from, + callerTerminalHandle: coordinatorHandle, callerEvidence: orchestrationCompatibilityEvidence, requireStablePane: true }) @@ -56,10 +60,10 @@ export const ORCHESTRATION_RUN_METHODS: RpcMethod[] = [ const priorRun = db.getCurrentRunForPane(paneKey) const run = db.createRun({ objective: params.objective, - coordinatorHandle: params.from, + coordinatorHandle, coordinatorPaneKey: paneKey }) - runtime.cancelMessageWaiters(params.from) + runtime.cancelMessageWaiters(coordinatorHandle) if (priorRun) { runtime.cancelMessageWaiters(`run:${priorRun.id}`) }