{
  "slug": "cdk-diff-adds-fail-on-destructive-17b9356ae364",
  "title": "cdk diff adds --fail-on destructive",
  "tools": [
    "cdk"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-08T00:57:21.000Z",
  "announced_at": "2026-10-08T00:57:21.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When reviewing a proposed stack update, run `cdk diff --fail-on=destructive <StackName>` to exit with code 1 if a change would replace, delete, or orphan an existing resource. In-place updates and new resources do not trigger failure.",
    "examples": [
      "cdk diff --fail-on=destructive <StackName>"
    ],
    "gotchas": [
      "Version: 2.1145.0",
      "--fail-on=destructive: Fail with exit code 1 only if changes replace, delete, or orphan an existing resource; in-place updates and additions do not cause failure.",
      "<StackName>: Optional stack name to diff; without it the CLI diffs the app's stacks.",
      "Prerequisite: Requires Node.js or another JavaScript runtime; minimum supported Node.js version is v18."
    ]
  },
  "why_it_matters": "Configure `cdk diff` to fail on destructive changes when reviewing a proposed stack update.",
  "sources": [
    "https://github.com/aws/aws-cdk-cli/releases/tag/aws-cdk%40v2.1145.0",
    "https://github.com/aws/aws-cdk-cli/blob/fba21bbf3650ef10ef828b29df51d31bf86a9966/packages/aws-cdk/README.md"
  ],
  "rank": 0.98046,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3-rejudge+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-154e9c61984a0688-0:rescue",
    "evidence_hash": "6b53bf9b92aa2aabc51fd1dae0c6689d4b31205728cff3d621deb066b569acfb"
  },
  "review": {
    "draft_hash": "bb8fbad24826bee3f52b8e8d388fc154d909fe58d670ed9cdb008093e17b1c41",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-08T00:57:21.000Z",
    "decision": "wave2a-20261017:rescue",
    "reason": "Rescue path: first rejected only because the extracted card lacked usage; judged again on the enriched card, 3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.79 (>= 0.6 needed)."
  }
}
