{"record":{"id":"92439fd05b925345","repo":"ruvnet/ruflo","slug":"wasm-loader-parse-toml-failed-using-fallback","errorCode":null,"errorMessage":"[WASM Loader] parse_toml failed, using fallback:","messagePattern":"\\[WASM Loader\\] parse_toml failed, using fallback:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/wasm-loader.ts","lineNumber":802,"sourceCode":"  const cached = formulaParseCache.get(cacheKey);\n  if (cached) {\n    recordTiming('parseFormula:cache-hit', startTime, false);\n    return cached;\n  }\n\n  // Use batch deduplication for concurrent requests\n  return parseDedup.dedupe(cacheKey, async () => {\n    const wasmModule = await loadFormulaWasm();\n\n    if (wasmModule) {\n      try {\n        const resultJson = wasmModule.parse_toml(content);\n        const result = JSON.parse(resultJson) as Formula;\n        formulaParseCache.set(cacheKey, result);\n        recordTiming('parseFormula', startTime, true);\n        return result;\n      } catch (error) {\n        console.warn('[WASM Loader] parse_toml failed, using fallback:', error);\n      }\n    }\n\n    // JavaScript fallback\n    const result = parseTomlFallback(content);\n    formulaParseCache.set(cacheKey, result);\n    recordTiming('parseFormula', startTime, false);\n    return result;\n  });\n}\n\n/**\n * Cook a formula by substituting variables.\n * Uses WASM if available (352x faster), falls back to JavaScript.\n *\n * @param formula - Formula to cook\n * @param vars - Variables to substitute\n * @returns Cooked formula with variables substituted","sourceCodeStart":784,"sourceCodeEnd":820,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/wasm-loader.ts#L784-L820","documentation":"Log warning in parseFormula: the WASM parse_toml call (or its JSON result parse) threw, so the formula is parsed with the JavaScript fallback parser instead; the failure reason is logged.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:802 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the TOML input and the WASM parse error; the JS fallback parser is used — fix malformed TOML or rebuild the WASM module."],"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"}