{"record":{"id":"25376adbd11b7d73","repo":"ruvnet/ruflo","slug":"type-mismatch-value-has-type-value-type-but-pa","errorCode":null,"errorMessage":"Type mismatch: value has type ${value.type} but path is in type ${path.type}","messagePattern":"Type mismatch: value has type (.+?) but path is in type (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/prime-radiant/src/engines/HottEngine.ts","lineNumber":95,"sourceCode":"      return result;\n    }\n\n    // Pure JS: syntactic equivalence of proofs\n    return path1.proof === path2.proof;\n  }\n\n  /**\n   * Transport a value along a path\n   * If P: A -> Type and p: x = y, transport P p: P(x) -> P(y)\n   *\n   * @param path - Path to transport along\n   * @param value - Value to transport\n   * @returns Transported value\n   */\n  async transportAlong(path: Path, value: TypedValue): Promise<TypedValue> {\n    // Verify value type matches path source\n    if (value.type !== path.type) {\n      throw new Error(\n        `Type mismatch: value has type ${value.type} but path is in type ${path.type}`\n      );\n    }\n\n    if (this.wasmModule) {\n      // Use WASM for transport\n      const pathPtr = this.allocPath(path);\n      const valuePtr = this.allocValue(value);\n      const resultPtr = this.wasmModule.hott_transport(pathPtr, valuePtr);\n      const result = this.readValue(resultPtr);\n      this.freePath(pathPtr);\n      this.freeValue(valuePtr);\n      this.freeValue(resultPtr);\n      return result;\n    }\n\n    // Pure JS: if source equals value, return target\n    if (this.equalValues(path.source, value.value)) {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/prime-radiant/src/engines/HottEngine.ts#L77-L113","documentation":"HottEngine.transportAlong() checked the value's type against the path's type and they differ — transporting a value along a path over a different type is meaningless in HoTT. Both types are included in the message so the mismatch is immediately visible.","triggerScenarios":"Thrown at v3/plugins/prime-radiant/src/engines/HottEngine.ts:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying cause in logs, fix the root issue, and retry the operation.","Validate inputs and preconditions before invoking this code path so the error is avoided."],"exampleFix":null,"handlingStrategy":"validation","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"}