{
  "slug": "datadog-ci-sourcemaps-upload-checks-for-existing-debug-ids-450a12746027",
  "title": "datadog-ci sourcemaps upload checks for existing debug IDs",
  "tools": [
    "datadog-ci"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-22T15:45:16.000Z",
  "announced_at": "2026-10-22T15:45:16.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When uploading sourcemaps that already have debug IDs, add `--experimental-duplicate-check` to skip IDs already present in Datadog. The check runs in debug-ID mode; `--dry-run` reports skips without uploading.",
    "examples": [
      "datadog-ci sourcemaps upload ./build --debug-id --experimental-duplicate-check",
      "datadog-ci sourcemaps upload ./build --debug-id --experimental-duplicate-check --dry-run"
    ],
    "gotchas": [
      "Version: v5.26.0",
      "<directory> (required): Directory containing sourcemaps; the CLI searches it and subfolders recursively.",
      "--debug-id (required): Selects debug-ID upload mode; uploads only bundles that already contain a debug ID.",
      "--experimental-duplicate-check: Default false. In debug-ID mode, checks before upload and skips sourcemaps whose IDs already exist; on check failure, upload proceeds. Effective only with `--debug-id`.",
      "--dry-run: Default false. Runs checks but omits the final upload step.",
      "Prerequisite: Set `DD_API_KEY` in the environment.",
      "Prerequisite: Debug-ID mode requires bundles that already contain a debug ID; run `sourcemaps inject` first if IDs are missing.",
      "`--experimental-duplicate-check` is opt-in and effective only with `--debug-id`.",
      "Checks are sent in batches of up to 1000 IDs.",
      "On request or response error, the command warns and uploads all sourcemaps.",
      "The duplicate check gives up after 1 second and uploads everything."
    ]
  },
  "why_it_matters": "Upload sourcemaps in `--debug-id` mode while avoiding uploads for debug IDs already present in Datadog.",
  "before": "Run `sourcemaps upload --debug-id` without `--experimental-duplicate-check`; uploads follow the existing path without querying `check_exists`.",
  "sources": [
    "https://github.com/DataDog/datadog-ci/releases/tag/v5.26.0",
    "https://github.com/DataDog/datadog-ci/pull/2549",
    "https://github.com/DataDog/datadog-ci/pull/2555",
    "https://github.com/DataDog/datadog-ci/blob/v5.26.0/packages/base/src/commands/sourcemaps/README.md"
  ],
  "rank": 0.97029,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "daily-20261026-04",
    "verdict_id": "daily-20261026-04:daily-20261026-04-a48d936adff05f55-1:gate",
    "evidence_hash": "6a60fbc0de9c0afa1a62fb047ff78e74fd6cf63084e2bf209615b3a6f7b3f509"
  },
  "review": {
    "draft_hash": "004f7d6ad1e80d22ee6c9f2880bcfe3556ee4d76df85ad63cffef50f56ec4e26",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-22T15:45:16.000Z",
    "decision": "daily-20261026-04:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.72 (>= 0.6 needed)."
  }
}
