{"record":{"id":"30a0a08790c4b128","repo":"ruvnet/ruflo","slug":"rvf-embedding-cache-truncated-entry-stopping-lo","errorCode":null,"errorMessage":"[rvf-embedding-cache] Truncated entry, stopping load","messagePattern":"\\[rvf-embedding-cache\\] Truncated entry, stopping load","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts","lineNumber":533,"sourceCode":"          formatVersion = possibleVersion;\n          offset += 4;\n        }\n      }\n\n      // Read entries\n      while (offset + 8 <= buffer.byteLength) {\n        // Need at least 4 (hash) + 4 (dims) = 8 bytes for the header\n        const hash = view.getUint32(offset, true);\n        offset += 4;\n\n        const dims = view.getUint32(offset, true);\n        offset += 4;\n\n        const entryDataSize = formatVersion === 2\n          ? dims * 4 + 8 + 8 + 8   // v2: embedding + createdAt + accessedAt + accessCount\n          : dims * 4 + 8 + 8;       // v1: embedding + accessedAt + accessCount\n        if (offset + entryDataSize > buffer.byteLength) {\n          console.warn('[rvf-embedding-cache] Truncated entry, stopping load');\n          break;\n        }\n\n        // Read embedding\n        const embedding = new Float32Array(dims);\n        for (let i = 0; i < dims; i++) {\n          embedding[i] = view.getFloat32(offset, true);\n          offset += 4;\n        }\n\n        let createdAt: number;\n        let accessedAt: number;\n        let accessCount: number;\n\n        if (formatVersion >= 2) {\n          createdAt = view.getFloat64(offset, true);\n          offset += 8;\n          accessedAt = view.getFloat64(offset, true);","sourceCodeStart":515,"sourceCodeEnd":551,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts#L515-L551","documentation":"Log warning in loadFromFile's entry loop: remaining bytes are fewer than the entry header/embedding requires (corrupt or truncated file); loading stops at the last complete entry instead of failing.","triggerScenarios":"Thrown at v3/@claude-flow/embeddings/src/rvf-embedding-cache.ts:533 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the cache file so it is regenerated; truncation indicates an incomplete previous write."],"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"}