From 9520e26a0074af8a22c091f1d4795e0adc42e6a2 Mon Sep 17 00:00:00 2001 From: Richard R Date: Sat, 13 Jun 2026 14:03:54 -0600 Subject: [PATCH] fix(compute-worker): wrap state store methods to ensure correct invocation Fix/refactor reconciliation logic to wrap getOpStateRecord and listOpStates methods from the state store, ensuring they are invoked as functions rather than accessed as properties. This improves type safety and prevents potential runtime errors from improper method usage. --- packages/compute-worker/src/operations/reconciliation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/compute-worker/src/operations/reconciliation.ts b/packages/compute-worker/src/operations/reconciliation.ts index df8dc9e..921587f 100644 --- a/packages/compute-worker/src/operations/reconciliation.ts +++ b/packages/compute-worker/src/operations/reconciliation.ts @@ -55,8 +55,8 @@ export function createOperationReconciler(input: { recoveryPromise = (async () => { const recoveredStates = await recoverOrphanedOperations({ operationStateStore: { - getOpStateRecord: input.stateStore.getOpStateRecord!, - listOpStates: input.stateStore.listOpStates!, + getOpStateRecord: (opId) => input.stateStore.getOpStateRecord!(opId), + listOpStates: () => input.stateStore.listOpStates!(), }, orchestrator: { markFailedIfUnchanged: async (request) => {