{"record":{"id":"dc6f00b2faf131f8","repo":"ruvnet/ruflo","slug":"unsupported-rvfa-version-version-expected-r","errorCode":null,"errorMessage":"Unsupported RVFA version: ${version} (expected ${RVFA_VERSION})","messagePattern":"Unsupported RVFA version: (.+?) \\(expected (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/appliance/rvfa-format.ts","lineNumber":324,"sourceCode":"    this.header = header;\n  }\n\n  /** Parse an RVFA image from an in-memory Buffer. */\n  static fromBuffer(buf: Buffer): RvfaReader {\n    if (buf.length < PREAMBLE_SIZE) {\n      throw new Error('Buffer too small to contain RVFA preamble');\n    }\n\n    // Magic\n    const magic = buf.subarray(0, MAGIC_SIZE).toString('ascii');\n    if (magic !== 'RVFA') {\n      throw new Error(`Invalid RVFA magic: expected \"RVFA\", got \"${magic}\"`);\n    }\n\n    // Version\n    const version = buf.readUInt32LE(MAGIC_SIZE);\n    if (version !== RVFA_VERSION) {\n      throw new Error(\n        `Unsupported RVFA version: ${version} (expected ${RVFA_VERSION})`,\n      );\n    }\n\n    // Header length\n    const headerLen = buf.readUInt32LE(MAGIC_SIZE + VERSION_SIZE);\n    if (headerLen > MAX_HEADER_JSON_SIZE) {\n      throw new Error(\n        `Header JSON exceeds maximum size (${headerLen} > ${MAX_HEADER_JSON_SIZE})`,\n      );\n    }\n    if (PREAMBLE_SIZE + headerLen > buf.length) {\n      throw new Error('Buffer too small to contain declared header');\n    }\n\n    // Parse header JSON\n    const headerSlice = buf.subarray(PREAMBLE_SIZE, PREAMBLE_SIZE + headerLen);\n    let parsed: unknown;","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/cli/src/appliance/rvfa-format.ts#L306-L342","documentation":"The u32 LE version word at offset 4 must equal RVFA_VERSION (currently 1). Any other value is an image written by a different @claude-flow/cli release (or a corrupted version word), and the parser refuses to guess the layout of an unknown version. The message includes both the found and expected numbers.","triggerScenarios":"`RvfaReader.fromBuffer(buf)` on an appliance image produced by a newer/older CLI with a different RVFA_VERSION; corruption in bytes 4–7 (usually preceded by a magic failure); stale IPFS-published images read after a format bump.","commonSituations":"Mixed-version fleets sharing appliance images; pulling an old appliance CID with an upgraded CLI (or vice versa); rebuilding images without regenerating downstream caches.","solutions":["Upgrade the reading CLI to the version that produced the image (the message states both versions)","Or rebuild the appliance locally with the current version so producer and consumer match","If both sides claim version 1, suspect bit corruption — re-fetch the image"],"exampleFix":"// before\nconst reader = RvfaReader.fromBuffer(buf); // Unsupported RVFA version: 2 (expected 1)\n\n// after\nconst ver = buf.readUInt32LE(4);\nif (ver !== 1) throw new Error(`Image format v${ver} needs a matching CLI — upgrade @claude-flow/cli`);\nconst reader = RvfaReader.fromBuffer(buf);","handlingStrategy":"validation","validationCode":"const version = buf.readUInt32LE(4);\nif (version !== 1) { // RVFA_VERSION\n  throw new Error(`Appliance format v${version} not supported by this CLI — upgrade or rebuild`);\n}\nconst reader = RvfaReader.fromBuffer(buf);","typeGuard":null,"tryCatchPattern":"try {\n  const reader = RvfaReader.fromBuffer(buf);\n} catch (e) {\n  if (/Unsupported RVFA version/.test(String(e))) {\n    // producer/consumer version skew — upgrade the CLI or rebuild the image\n  } else {\n    throw e;\n  }\n}","preventionTips":["Pin the same @claude-flow/cli version across fleets that produce and consume appliance images","Gate on the version word read straight from the file before committing to a parse"],"tags":["rvfa-format","rvfa","version-compatibility","binary-format"],"backgroundTag":"unsupported-format-version","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}