{
  "slug": "local-exporter-supports-mode-delete-for-build-results-a645d48896b2",
  "title": "Local exporter supports mode=delete for build results",
  "tools": [
    "buildkit"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-17T23:13:34.000Z",
  "announced_at": "2026-06-17T23:13:34.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When exporting a build result to a local directory that should match the result, use `mode=delete` to remove destination files and directories absent from the result.",
    "examples": [
      "buildctl build ... --output type=local,dest=./bin/release,mode=delete"
    ],
    "gotchas": [
      "Version: v0.31.0",
      "type (required): Set to `local` for local directory output.",
      "dest (required): Destination directory for the local output.",
      "mode: `delete` removes destination files and directories absent from the result; `copy` is the default and preserves them. The documented values are alternatives.",
      "The default behavior remains mode=copy.",
      "For multi-platform local exports in delete mode, the complete export is sent as one filesystem; when platform splitting is enabled, a single platform-directory filesystem is built before streaming."
    ]
  },
  "why_it_matters": "Export a build result to a local directory that must match the result and remain confined to that destination if it is mutated during transfer.",
  "before": "Use the default `mode=copy`, which preserves existing destination files absent from the exported result.",
  "sources": [
    "https://github.com/moby/buildkit/releases/tag/v0.31.0",
    "https://github.com/moby/buildkit/pull/6561",
    "https://github.com/moby/buildkit/blob/v0.31.0/README.md"
  ],
  "rank": 0.97038,
  "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": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-74f4da6d581433aa-2:gate",
    "evidence_hash": "229d2ae5bfdc1550624d3fc7998a48005eaab9d4d2a8408a309f41ebd1c6be7f"
  },
  "review": {
    "draft_hash": "df3e4024583339ec1ed5057a4faec6935dabf3fe20cdea451165c5a05ff64024",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
