{
  "schemaVersion": 1,
  "generatedAt": "2026-07-27T00:05:57.000Z",
  "spec": {
    "id": "SPEC-1150",
    "title": "Clear released specs from the pending release ledger",
    "status": "done",
    "request": "Make the release commit the atomic source of truth for which pending specs were published, while preserving any ledger entry created or updated after the immutable release-base snapshot.",
    "acceptanceCriteria": [
      {
        "id": "AC1",
        "text": "GIVEN `planu/releases/pending.json` contains valid entries at `RELEASE_BASE_HEAD`, WHEN the release commit is created, THEN every current entry with the same complete `{specId,title,completedAt}` identity is removed, and a shared cross-process lock makes entries added or changed after the snapshot—including an append attempted during reconciliation—remain."
      },
      {
        "id": "AC2",
        "text": "GIVEN release execution resumes before or after the release commit, WHEN pending reconciliation runs, THEN it derives the same snapshot from the persisted `RELEASE_BASE_HEAD`, is idempotent, and never repeats mutation after `release-commit` is recorded; `tests/integration/release-pipeline-recovery.test.ts` line 4 changes the recovery expectation."
      },
      {
        "id": "AC3",
        "text": "GIVEN dry-run mode, a missing/empty snapshot, or malformed snapshot/current JSON, WHEN pending reconciliation is evaluated, THEN dry-run performs no write, missing/empty snapshot preserves current state, and malformed data exits non-zero without changing the current file."
      },
      {
        "id": "AC4",
        "text": "GIVEN release 4.11.17 publishes the currently queued specs, WHEN delivery completes, THEN `planu/releases/pending.json` is empty, npm exposes 4.11.17, and `main`, `develop`, and `release` resolve to the same release commit."
      }
    ]
  },
  "lifecycle": [
    {
      "status": "approved",
      "verifiedAt": "2026-07-26T21:16:33.989Z"
    },
    {
      "status": "implementing",
      "verifiedAt": "2026-07-26T21:16:44.223Z"
    },
    {
      "status": "done",
      "verifiedAt": "2026-07-26T23:39:17.088Z"
    }
  ],
  "validation": {
    "passed": true,
    "score": 100,
    "verifiedAt": "2026-07-26T23:39:16.982Z",
    "evidence": [
      {
        "label": "Release reconciliation tests",
        "path": "tests/scripts/reconcile-release-pending.test.ts"
      },
      {
        "label": "Release recovery tests",
        "path": "tests/integration/release-pipeline-recovery.test.ts"
      }
    ]
  },
  "release": {
    "version": "4.11.17",
    "tag": "v4.11.17",
    "commit": "d589ca65ce4242e55c07b8dd73ab98eb6022fe26",
    "url": "https://www.npmjs.com/package/@planu/cli",
    "verifiedAt": "2026-07-27T00:05:57.000Z"
  },
  "sources": [
    {
      "label": "Published first-party evidence snapshot",
      "url": "https://planu.dev/proof/real-spec-demo.json"
    },
    {
      "label": "Published npm release",
      "url": "https://www.npmjs.com/package/@planu/cli"
    }
  ]
}
