{"record":{"id":"cafe63e6816e53fa","repo":"ruvnet/ruflo","slug":"wasm-loader-cook-batch-failed-using-fallback","errorCode":null,"errorMessage":"[WASM Loader] cook_batch failed, using fallback:","messagePattern":"\\[WASM Loader\\] cook_batch failed, using fallback:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/wasm-loader.ts","lineNumber":909,"sourceCode":"  const startTime = performance.now();\n\n  if (formulas.length !== varsArray.length) {\n    throw new Error('formulas and varsArray must have the same length');\n  }\n\n  const wasmModule = await loadFormulaWasm();\n\n  if (wasmModule) {\n    try {\n      const resultJson = wasmModule.cook_batch(\n        JSON.stringify(formulas),\n        JSON.stringify(varsArray)\n      );\n      const result = JSON.parse(resultJson) as Formula[];\n      recordTiming('cookBatch', startTime, true);\n      return result;\n    } catch (error) {\n      console.warn('[WASM Loader] cook_batch failed, using fallback:', error);\n    }\n  }\n\n  // JavaScript fallback\n  const results = await Promise.all(\n    formulas.map((formula, i) => cookFormula(formula, varsArray[i]))\n  );\n  recordTiming('cookBatch', startTime, false);\n  return results;\n}\n\n// ============================================================================\n// Public API - Graph Operations\n// ============================================================================\n\n/**\n * Perform topological sort on a dependency graph.\n * Uses WASM if available (150x faster), falls back to JavaScript.","sourceCodeStart":891,"sourceCodeEnd":927,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/wasm-loader.ts#L891-L927","documentation":"Log warning in cookBatch: the WASM cook_batch call for the whole formula array threw; the batch is processed with the JavaScript fallback implementation.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:909 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the batch input and the WASM cook_batch error; the JS fallback is used — verify the batch entries are valid."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}