{"record":{"id":"1f3f0a8c192faf29","repo":"Yeachan-Heo/oh-my-codex","slug":"manifest-duplicate-archive-basename","errorCode":"manifest_duplicate_archive_basename","errorMessage":"[native-assets] manifest_duplicate_archive_basename: ${basename}","messagePattern":"\\[native-assets\\] manifest_duplicate_archive_basename: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/native-assets/policy.ts","lineNumber":177,"sourceCode":"    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":159,"sourceCodeEnd":191,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/native-assets/policy.ts#L159-L191","documentation":"Two different logical assets share the same archive basename, which would collide on disk when downloading or extracting. The validator tracks every basename and rejects repeats.","triggerScenarios":"Two entries with different logical keys but the identical archive filename, e.g. both ending in 'omxd-linux-x64.tar.zst'.","commonSituations":"Copy-paste when adding an asset without updating the filename, or a generator bug emitting the same name for multiple targets.","solutions":["Give each asset a unique archive basename encoding its target","Re-check for accidental duplicate rows","Regenerate names from the asset fields so they cannot collide"],"exampleFix":"// before\n[..., {archive:'omxd-linux-x64.tar.zst'}, {archive:'omxd-linux-x64.tar.zst'}]\n// after\n[..., {archive:'omxd-linux-x64.tar.zst'}, {archive:'omxd-linux-arm64.tar.zst'}]","handlingStrategy":"validation","validationCode":"const names = new Set<string>();\nconst ok = assets.every((a) => { const b = nativeReleaseAssetBasename(a); if (names.has(b)) return false; names.add(b); return true; });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive archive names from asset fields so collisions are impossible"],"tags":["native-assets","manifest","duplicate-filename"],"backgroundTag":"manifest-validation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}