{
  "slug": "sentry-cli-code-mappings-upload-bulk-uploads-repository-code-mappings-763f99ba978f",
  "title": "sentry-cli code-mappings upload bulk uploads repository code mappings",
  "tools": [
    "sentry-cli"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-25T21:13:42.000Z",
  "announced_at": "2026-03-25T21:13:42.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When configuring repository code mappings, create a nonempty JSON array of mappings with nonempty `stackRoot` and `sourceRoot` values, then run `sentry-cli code-mappings upload <PATH>` for the target organization. Repository and default branch can be inferred from local Git; set `--repo` and `--default-branch` explicitly when needed.",
    "examples": [
      "sentry-cli code-mappings upload <PATH> --org <ORG>",
      "sentry-cli code-mappings upload <PATH> --org <ORG> --repo <OWNER/REPO> --default-branch <BRANCH>",
      "[{\"stackRoot\":\"com/example/module\",\"sourceRoot\":\"src/main/java/com/example/module\"}]"
    ],
    "gotchas": [
      "Version: 3.3.4",
      "PATH (required): Path to a JSON file containing a nonempty array of code mappings; each mapping requires nonempty `stackRoot` and `sourceRoot`.",
      "--org (required): Organization ID or slug.",
      "--repo: Repository name, e.g. `owner/repo`; defaults to the Git remote.",
      "--default-branch: Default branch name; shown with default `main`.",
      "stackRoot (required): Stack trace path root to map; must not be empty.",
      "sourceRoot (required): Corresponding source path in the repository; must not be empty.",
      "Prerequisite: Use an authenticated Sentry CLI invocation; the command accepts `--auth-token <AUTH_TOKEN>`.",
      "Prerequisite: When repo and branch are inferred, the CLI uses the configured VCS remote first, then best-effort remote detection: upstream, origin, then first remote.",
      "Mappings link stack trace paths to source paths in the repository.",
      "Large mapping files are automatically split into batches for upload."
    ]
  },
  "why_it_matters": "Configure Sentry code mappings for a repository so error stack traces can show source context and link to code.",
  "sources": [
    "https://github.com/getsentry/sentry-cli/releases/tag/3.3.4",
    "https://github.com/getsentry/sentry-cli/pull/3207/files",
    "https://github.com/getsentry/sentry-cli/pull/3208"
  ],
  "rank": 0.93019,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "ghtools-20261008",
    "verdict_id": "ghtools-20261008:ghtools-20261008-a1dd27b7b30eed01-1:gate",
    "evidence_hash": "01a4ad9846711a4b50619e9f88b849e5aed59566e91993349ce59fdc7772ff0f"
  },
  "review": {
    "draft_hash": "f87edad0c838ee56d405fc284d9da09fedceeffe25765c6613182c1fb47080d3",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "ghtools-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.75 (>= 0.6 needed)."
  }
}
