{"record":{"id":"aeca573f640b86a6","repo":"diegosouzapw/OmniRoute","slug":"existing-tunnel-client-failed-integrity-validation","errorCode":null,"errorMessage":"Existing tunnel-client failed integrity validation","messagePattern":"Existing tunnel-client failed integrity validation","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/chatgpt-web-codex/tunnelClient.ts","lineNumber":213,"sourceCode":"  if (!ownsSupervisorLease) return;\n  const status = tunnelSupervisorLeaseStatus();\n  if (status.ownedByCurrentProcess) rmSync(tunnelClientPaths().supervisorLease, { force: true });\n  ownsSupervisorLease = false;\n}\n\nexport async function ensureTunnelClientInstalled(): Promise<string> {\n  const paths = tunnelClientPaths();\n  if (existsSync(paths.binary) && existsSync(paths.manifest)) {\n    const manifest = JSON.parse(readFileSync(paths.manifest, \"utf8\")) as Partial<InstallManifest>;\n    const actual = sha256(readFileSync(paths.binary));\n    if (\n      manifest.version === 1 &&\n      manifest.tunnelClientVersion === CHATGPT_WEB_CODEX_TUNNEL_VERSION &&\n      manifest.binarySha256 === actual\n    ) {\n      return paths.binary;\n    }\n    throw new Error(\"Existing tunnel-client failed integrity validation\");\n  }\n\n  const asset = tunnelPlatformAsset();\n  const [archive, checksumFile] = await Promise.all([\n    download(`${RELEASE_BASE}/${asset}`),\n    download(`${RELEASE_BASE}/SHA256SUMS.txt`),\n  ]);\n  const expected = parseTunnelChecksum(new TextDecoder().decode(checksumFile), asset);\n  const archiveSha256 = sha256(archive);\n  if (archiveSha256 !== expected) throw new Error(`Checksum mismatch for ${asset}`);\n\n  const files = unzipSync(archive);\n  const executableName = process.platform === \"win32\" ? \"tunnel-client.exe\" : \"tunnel-client\";\n  const entry = Object.entries(files).find(([name]) => basename(name) === executableName);\n  if (!entry) throw new Error(`${asset} does not contain ${executableName}`);\n  atomicWriteFile(paths.binary, entry[1]);\n  if (process.platform !== \"win32\") chmodSync(paths.binary, 0o700);\n  const manifest: InstallManifest = {","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/chatgpt-web-codex/tunnelClient.ts#L195-L231","documentation":"Error \"Existing tunnel-client failed integrity validation\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/chatgpt-web-codex/tunnelClient.ts:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}