ruvnet/ruflo · error

Type mismatch: value has type ${value.type} but path is in t

Error message

Type mismatch: value has type ${value.type} but path is in type ${path.type}

What it means

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.

Source

Thrown at v3/plugins/prime-radiant/src/engines/HottEngine.ts:95

      return result;
    }

    // Pure JS: syntactic equivalence of proofs
    return path1.proof === path2.proof;
  }

  /**
   * Transport a value along a path
   * If P: A -> Type and p: x = y, transport P p: P(x) -> P(y)
   *
   * @param path - Path to transport along
   * @param value - Value to transport
   * @returns Transported value
   */
  async transportAlong(path: Path, value: TypedValue): Promise<TypedValue> {
    // Verify value type matches path source
    if (value.type !== path.type) {
      throw new Error(
        `Type mismatch: value has type ${value.type} but path is in type ${path.type}`
      );
    }

    if (this.wasmModule) {
      // Use WASM for transport
      const pathPtr = this.allocPath(path);
      const valuePtr = this.allocValue(value);
      const resultPtr = this.wasmModule.hott_transport(pathPtr, valuePtr);
      const result = this.readValue(resultPtr);
      this.freePath(pathPtr);
      this.freeValue(valuePtr);
      this.freeValue(resultPtr);
      return result;
    }

    // Pure JS: if source equals value, return target
    if (this.equalValues(path.source, value.value)) {

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Inspect the underlying cause in logs, fix the root issue, and retry the operation.
  2. Validate inputs and preconditions before invoking this code path so the error is avoided.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/prime-radiant/src/engines/HottEngine.ts:95 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/25376adbd11b7d73. Report an issue: GitHub.