Yeachan-Heo/oh-my-codex · error

manifest_archive_hint_mismatch

manifest_archive_hint_mismatch

Error message

[native-assets] manifest_archive_hint_mismatch: ${basename}

What it means

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.

Source

Thrown at src/native-assets/policy.ts:176

    const expectedBinary = nativeProductBinaryName(asset.product);
    const expectedBinaryPath = nativeProductBinaryPath(asset.product, asset.platform);
    if (!expectedBinary || !expectedBinaryPath || asset.binary !== expectedBinary) {
      throw policyError('manifest_binary_product_mismatch', asset.binary);
    }

    const binaryPath = normalizeNativeArchivePath(asset.binary_path, 'file');
    if (binaryPath !== asset.binary_path || binaryPath.split('/').at(-1) !== expectedBinaryPath) {
      throw policyError('manifest_binary_basename_mismatch', asset.binary_path);
    }

    const key = nativeReleaseAssetLogicalKey(asset);
    if (logicalKeys.has(key)) throw policyError('manifest_duplicate_logical_key', asset.archive);
    logicalKeys.add(key);
    const basename = nativeReleaseAssetBasename(asset);
    if (asset.archive !== basename || !nativeArchiveSuffix(basename)) {
      throw policyError('manifest_archive_invalid', asset.archive);
    }
    if (archiveHintMismatch(asset, basename)) throw policyError('manifest_archive_hint_mismatch', basename);
    if (basenames.has(basename)) throw policyError('manifest_duplicate_archive_basename', basename);
    basenames.add(basename);
    let downloadUrl: URL;
    try {
      downloadUrl = new URL(asset.download_url);
    } catch {
      throw policyError('manifest_invalid_url', asset.download_url);
    }
    if ((downloadUrl.protocol !== 'https:' && downloadUrl.protocol !== 'http:')
      || downloadUrl.pathname.split('/').at(-1) !== basename) {
      throw policyError('manifest_url_basename_mismatch', asset.download_url);
    }
  }
}

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Align the archive filename hints with the asset's platform/libc fields
  2. Or fix the asset metadata to match what the filename encodes
  3. Regenerate the manifest from the actual build artifacts

Example fix

// before
{ platform:'linux-x64', libc:'gnu', archive:'omxd-linux-x64-musl.tar.zst' }
// after
{ platform:'linux-x64', libc:'gnu', archive:'omxd-linux-x64-gnu.tar.zst' }
Defensive patterns

Strategy: validation

Validate before calling

const ok = assets.every((a) => !archiveHintMismatch(a, nativeReleaseAssetBasename(a)));

Prevention

When it happens

Trigger: 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.

Common situations: Renaming archives after regenerating for a different libc, or editing the platform field without renaming the file.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/34b8b43e443220b1. Report an issue: GitHub.