{"record":{"id":"34b8b43e443220b1","repo":"Yeachan-Heo/oh-my-codex","slug":"manifest-archive-hint-mismatch","errorCode":"manifest_archive_hint_mismatch","errorMessage":"[native-assets] manifest_archive_hint_mismatch: ${basename}","messagePattern":"\\[native-assets\\] manifest_archive_hint_mismatch: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/native-assets/policy.ts","lineNumber":176,"sourceCode":"    const expectedBinary = nativeProductBinaryName(asset.product);\n    const expectedBinaryPath = nativeProductBinaryPath(asset.product, asset.platform);\n    if (!expectedBinary || !expectedBinaryPath || asset.binary !== expectedBinary) {\n      throw policyError('manifest_binary_product_mismatch', asset.binary);\n    }\n\n    const binaryPath = normalizeNativeArchivePath(asset.binary_path, 'file');\n    if (binaryPath !== asset.binary_path || binaryPath.split('/').at(-1) !== expectedBinaryPath) {\n      throw policyError('manifest_binary_basename_mismatch', asset.binary_path);\n    }\n\n    const key = nativeReleaseAssetLogicalKey(asset);\n    if (logicalKeys.has(key)) throw policyError('manifest_duplicate_logical_key', asset.archive);\n    logicalKeys.add(key);\n    const basename = nativeReleaseAssetBasename(asset);\n    if (asset.archive !== basename || !nativeArchiveSuffix(basename)) {\n      throw policyError('manifest_archive_invalid', asset.archive);\n    }\n    if (archiveHintMismatch(asset, basename)) throw policyError('manifest_archive_hint_mismatch', basename);\n    if (basenames.has(basename)) throw policyError('manifest_duplicate_archive_basename', basename);\n    basenames.add(basename);\n    let downloadUrl: URL;\n    try {\n      downloadUrl = new URL(asset.download_url);\n    } catch {\n      throw policyError('manifest_invalid_url', asset.download_url);\n    }\n    if ((downloadUrl.protocol !== 'https:' && downloadUrl.protocol !== 'http:')\n      || downloadUrl.pathname.split('/').at(-1) !== basename) {\n      throw policyError('manifest_url_basename_mismatch', asset.download_url);\n    }\n  }\n}\n","sourceCodeStart":158,"sourceCodeEnd":191,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/native-assets/policy.ts#L158-L191","documentation":"The archive name embeds platform/libc hints that contradict the asset's declared platform/libc fields, detected by archiveHintMismatch. The basename must be consistent with the metadata it claims.","triggerScenarios":"An asset declaring platform 'linux-x64' with libc 'gnu' but an archive named ...-musl-..., or any hint substring (platform, libc, arch) that disagrees with the asset record.","commonSituations":"Renaming archives after regenerating for a different libc, or editing the platform field without renaming the file.","solutions":["Align the archive filename hints with the asset's platform/libc fields","Or fix the asset metadata to match what the filename encodes","Regenerate the manifest from the actual build artifacts"],"exampleFix":"// before\n{ platform:'linux-x64', libc:'gnu', archive:'omxd-linux-x64-musl.tar.zst' }\n// after\n{ platform:'linux-x64', libc:'gnu', archive:'omxd-linux-x64-gnu.tar.zst' }","handlingStrategy":"validation","validationCode":"const ok = assets.every((a) => !archiveHintMismatch(a, nativeReleaseAssetBasename(a)));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Encode platform and libc in archive names mechanically","Never rename artifacts after the fact"],"tags":["native-assets","manifest","naming-consistency"],"backgroundTag":"manifest-validation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}