{
  "slug": "bk-preflight-runs-builds-against-a-snapshot-of-local-changes-4713fcefb349",
  "title": "bk preflight runs builds against a snapshot of local changes",
  "tools": [
    "bk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-29T05:36:26.000Z",
  "announced_at": "2026-04-29T05:36:26.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When iterating on uncommitted changes, run `bk preflight run` for the selected pipeline to snapshot the working tree and monitor the build until it starts failing. The command cleans up its temporary branch when finished.",
    "examples": [
      "bk preflight run --pipeline <org>/<pipeline> --watch"
    ],
    "gotchas": [
      "Version: v3.39.0",
      "Availability: Experimental preview; enabled by default. Subject to change without notice.",
      "--pipeline, -p (required): Pipeline slug, or `<org>/<pipeline>`; a slug can be used when the Buildkite organization is set in `bk` config.",
      "--watch / --no-watch: Watch the build until completion; `--no-watch` starts the build and exits immediately.",
      "--exit-on: Exit condition: `build-failing` (default) exits when the build enters the failing state; `build-terminal` exits when it reaches a terminal state. These values are alternatives.",
      "Prerequisite: The current Preflight guide requires Buildkite CLI 3.40.0 or later; this differs from the card’s v3.39.0 release.",
      "Prerequisite: Configure an API access token with `read_builds`, `write_builds`, and `read_pipelines` scopes.",
      "Prerequisite: Have Git commit and push access to the repository.",
      "Runs against the selected pipeline.",
      "Snapshots staged, unstaged, and untracked files.",
      "The build is monitored and the command exits as soon as the build starts failing.",
      "The temporary branch is cleaned up when finished.",
      "Docs conflict: The current guide requires CLI 3.40.0 or later, while the card describes v3.39.0. The current command reference documents `bk preflight run`; the current guide’s examples use `bk preflight` without `run`."
    ]
  },
  "why_it_matters": "When iterating on uncommitted repository changes against Buildkite Pipelines, run a preflight build and monitor its failures.",
  "sources": [
    "https://github.com/buildkite/cli/releases/tag/v3.39.0",
    "https://github.com/buildkite/cli/pull/809",
    "https://github.com/buildkite/cli/pull/811",
    "https://buildkite.com/docs/platform/cli/reference/preflight",
    "https://buildkite.com/docs/platform/cli/preflight"
  ],
  "rank": 0.98042,
  "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": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-257c5abfae384d48-0:gate",
    "evidence_hash": "044a69f47f4208d769d8ab62d42c42b3d8ae0b6f86e6bb4db934fb6dd9cf216c"
  },
  "review": {
    "draft_hash": "8bcadaa7ee7ea5e42244f383e0b35bb4fde66d567aa8f59ba44bb194f71d3d59",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.76 (>= 0.6 needed)."
  }
}
