{"record":{"id":"62d99358c2e25ce5","repo":"Yeachan-Heo/oh-my-codex","slug":"native-assets-cache-publication-verification-fai-62d993","errorCode":null,"errorMessage":"[native-assets] cache publication verification failed for ${cachedBinaryPath}","messagePattern":"\\[native-assets\\] cache publication verification failed for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/native-assets.ts","lineNumber":748,"sourceCode":"      );\n      try {\n        await downloadFile(asset.download_url, archivePath);\n        const archiveStat = await stat(archivePath);\n        if (typeof asset.size === 'number' && asset.size > 0 && archiveStat.size !== asset.size) {\n          throw new Error(`[native-assets] downloaded archive size mismatch for ${asset.archive}`);\n        }\n        const digest = await sha256ForFile(archivePath);\n        if (digest !== asset.sha256) {\n          throw new Error(`[native-assets] checksum mismatch for ${asset.archive}`);\n        }\n\n        const archiveEntries = await inspectNativeArchive(archivePath);\n        const archiveBinary = selectNativeArchiveBinary(archiveEntries, asset.binary_path);\n        await writeSelectedNativeArchiveMember(archivePath, archiveBinary.path, extractedBinaryPath);\n\n        const published = await publishManagedNativeBinary(extractedBinaryPath, cachedBinaryPath, platform, env);\n        if (published) return published;\n        throw new Error(`[native-assets] cache publication verification failed for ${cachedBinaryPath}`);\n      } catch (error) {\n        if (index < assets.length - 1 && isUnavailableArchiveError(error)) {\n          await rm(archivePath, { force: true });\n          await rm(extractedBinaryPath, { force: true });\n          continue;\n        }\n        throw error;\n      }\n    }\n    return undefined;\n  } finally {\n    await rm(tempRoot, { recursive: true, force: true });\n  }\n}\n","sourceCodeStart":730,"sourceCodeEnd":763,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/native-assets.ts#L730-L763","documentation":"publishManagedNativeBinary returned undefined while trying to publish the extracted platform binary into the cache at cachedBinaryPath, i.e. the atomic publish path bailed out and the post-publish verification could not be satisfied for that path. The thrown wrapper names the exact cached binary path that failed.","triggerScenarios":"hydrateNativeBinary after successfully extracting the archive, when the publish step cannot complete — e.g. cache root unwritable, lock issues, or verification failing on the destination; the loop then only retries on isUnavailableArchiveError for earlier assets.","commonSituations":"Unwritable/read-only cache roots in containers; concurrent hydration holding locks; antivirus interfering with freshly published executables.","solutions":["Check writability and permissions of the cache root; fix like errors 293/295.","Ensure no other hydration process is active for the same cache key.","Set the cache-root env override to a writable local path and retry."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import { access, constants } from 'node:fs/promises';\nasync function canPublish(root: string): Promise<boolean> { try { await access(root, constants.W_OK | constants.X_OK); return true; } catch { return false; } }","typeGuard":null,"tryCatchPattern":"try { await hydrateNativeBinary(); } catch (e) { if (/cache publication verification failed for/.test(String(e))) { /* fix cache writability/locks (see 292-295), then retry */ } throw e; }","preventionTips":["Verify the cache root is writable before hydration","Avoid concurrent hydration on shared caches","Pre-warm caches in build pipelines"],"tags":["native-assets","cache","publish","verification"],"backgroundTag":"cache-publish-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}