{"record":{"id":"03c830c9df72fc1b","repo":"diegosouzapw/OmniRoute","slug":"kiro-message-crc-mismatch-expected-messagecrc","errorCode":null,"errorMessage":"[Kiro] Message CRC mismatch: expected ${messageCRC}, got ${computedMessageCRC} — skipping corrupted frame","messagePattern":"\\[Kiro\\] Message CRC mismatch: expected (.+?), got (.+?) — skipping corrupted frame","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/executors/kiro/eventstream.ts","lineNumber":125,"sourceCode":"    // Prelude CRC covers bytes [0..7] (totalLength + headersLength)\n    const preludeCRC = view.getUint32(8, false);\n    const computedPreludeCRC = crc32(data.slice(0, 8));\n    if (preludeCRC !== computedPreludeCRC) {\n      console.warn(\n        `[Kiro] Prelude CRC mismatch: expected ${preludeCRC}, got ${computedPreludeCRC} — skipping corrupted frame`\n      );\n      return null;\n    }\n\n    // Message CRC covers bytes [0..totalLength-5] (everything except the CRC itself).\n    // Skipped by default (O(frame bytes) per frame) — the prelude CRC above already\n    // validates framing and the stream is TLS-protected. Enable KIRO_VERIFY_FULL_CRC=true\n    // to restore full validation for debugging corrupted-stream issues.\n    if (KIRO_VERIFY_FULL_CRC) {\n      const messageCRC = view.getUint32(data.length - 4, false);\n      const computedMessageCRC = crc32(data.slice(0, data.length - 4));\n      if (messageCRC !== computedMessageCRC) {\n        console.warn(\n          `[Kiro] Message CRC mismatch: expected ${messageCRC}, got ${computedMessageCRC} — skipping corrupted frame`\n        );\n        return null;\n      }\n    }\n    // Parse headers\n    const headers: Record<string, string> = {};\n    let offset = 12; // After prelude\n    const headerEnd = 12 + headersLength;\n\n    while (offset < headerEnd && offset < data.length) {\n      const nameLen = data[offset];\n      offset++;\n      if (offset + nameLen > data.length) break;\n\n      const name = TEXT_DECODER.decode(data.subarray(offset, offset + nameLen));\n      offset += nameLen;\n","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/kiro/eventstream.ts#L107-L143","documentation":"An AWS EventStream frame failed the message-level CRC32 validation (computed CRC over bytes [0..totalLength-5] does not match the trailing CRC). The frame is skipped rather than propagated. Note this check is normally skipped by default for performance — the prelude CRC already validates framing — so seeing it means it was explicitly enabled or the default changed.","triggerScenarios":"Thrown at open-sse/executors/kiro/eventstream.ts:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Skip-corrupted-frame behavior preserves stream continuity — monitor frequency","Retry the request if content loss is observed","Check transport/proxy reliability if corruption recurs"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}