{
  "slug": "bk-job-flaky-tests-lists-flaky-tests-for-a-failed-job-950f66fa1999",
  "title": "bk job flaky-tests lists flaky tests for a failed job",
  "tools": [
    "bk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-08T11:00:57.000Z",
  "announced_at": "2026-10-08T11:00:57.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When inspecting a failed job for retry evidence, run `bk job flaky-tests <job-uuid>` to list failed tests Test Engine currently labels flaky. Treat an empty result as inconclusive; current labels do not establish why the job failed.",
    "examples": [
      "bk job flaky-tests <job-uuid> --text",
      "bk job flaky-tests <job-uuid> --json"
    ],
    "gotchas": [
      "Version: v3.61.0",
      "<job-uuid> (required): UUID of the failed job to inspect.",
      "--text: Select text output.",
      "--json: Select JSON output; structured output includes job UUID, build UUID, test details, and execution metrics.",
      "--yaml: Select YAML output; structured output includes job UUID, build UUID, test details, and execution metrics.",
      "Prerequisite: Token requires `read_builds` and `read_suites` scopes.",
      "Prerequisite: Test Engine executions need the `build.job_id` tag matching the job UUID; missing or overridden collector job metadata may prevent matches.",
      "Requires `read_builds` and `read_suites` token scopes.",
      "Test Engine executions must be tagged with the matching `build.job_id`; missing or overridden collector job metadata can prevent matches.",
      "Current flaky labels do not prove flakiness caused the job failure.",
      "An empty result does not mean the tests are not flaky; Test Engine data may be missing or incomplete.",
      "The command fetches all pages.",
      "Live Test Engine data was not exercised."
    ]
  },
  "why_it_matters": "When deciding whether to retry a failed job, inspect the failed tests Test Engine currently labels flaky.",
  "sources": [
    "https://github.com/buildkite/cli/releases/tag/v3.61.0",
    "https://github.com/buildkite/cli/pull/1021",
    "https://github.com/buildkite/cli/blob/v3.61.0/README.md",
    "https://github.com/buildkite/cli/blob/v3.61.0/cmd/job/flaky_tests.go"
  ],
  "rank": 0.96036,
  "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-7542f5f0b24ae8a0-0:gate",
    "evidence_hash": "ed2dcc0e637d31274ef00dd4dcc45b3548dfb5e0051792e5cbceed34afb5e2ad"
  },
  "review": {
    "draft_hash": "896084e757837a7ea0014dc94697c326fd5d7f769bea4f2f3aca448ab28ce31f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-08T11:00:57.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.81 (>= 0.6 needed)."
  }
}
