{
  "schema": 1,
  "sqlstate": "3B001",
  "condition_name": "invalid_savepoint_specification",
  "sources": [
    {
      "id": "src.errcodes.18.6",
      "kind": "upstream_source",
      "source_role": "condition_definition",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/utils/errcodes.txt",
      "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
    },
    {
      "id": "src.calls.REL_18_6",
      "kind": "local_artifact",
      "source_role": "source_call_scan",
      "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf"
    },
    {
      "id": "src.xact.18.6",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "src/backend/access/transam/xact.c",
      "sha256": "75b012c0b047d1dc905a30975c244beec366e45eac0dbf109fd21bcd611a8e39",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/access/transam/xact.c#L4482-L4484"
    },
    {
      "id": "src.xact.10.23",
      "kind": "upstream_source",
      "source_role": "source_path",
      "tag": "REL_10_23",
      "commit": "02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4",
      "path": "src/backend/access/transam/xact.c",
      "sha256": "9120bd418bd0f18e3f1065a3772c92ff68f3be54e1a8c6d415043197f6daa47c",
      "url": "https://github.com/postgres/postgres/blob/02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4/src/backend/access/transam/xact.c#L3914-L3916"
    },
    {
      "id": "doc.savepoint.18.6",
      "kind": "upstream_source",
      "source_role": "official_documentation",
      "tag": "REL_18_6",
      "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
      "path": "doc/src/sgml/ref/savepoint.sgml",
      "sha256": "aa6e167d373da6118249c87404a7b2ff8be8c7df790449814f1d9dc433bbd428",
      "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/savepoint.sgml",
      "docs_url": "https://www.postgresql.org/docs/18/sql-savepoint.html"
    }
  ],
  "claims": [
    {
      "id": "identity",
      "statement": "3B001 is the invalid_savepoint_specification condition in Class 3B.",
      "sources": [
        "src.errcodes.18.6"
      ],
      "method": "Read the fixed errcodes.txt row and macro mapping.",
      "limits": "The class-level 3B000 entry is separate from this specific condition."
    },
    {
      "id": "savepoint-path",
      "statement": "RollbackToSavepoint emits a missing-savepoint error when the named savepoint is not present at the current level.",
      "sources": [
        "src.xact.18.6",
        "src.calls.REL_18_6"
      ],
      "method": "Trace ERRCODE_S_E_INVALID_SPECIFICATION in xact.c.",
      "limits": "PG10 uses the older no such savepoint wording; the SQLSTATE and state transition are the stable facts here."
    },
    {
      "id": "recovery",
      "statement": "A failed ROLLBACK TO SAVEPOINT leaves the explicit transaction in error; ROLLBACK ends that block before a new savepoint sequence.",
      "sources": [
        "doc.savepoint.18.6"
      ],
      "method": "Run the shared explicit BEGIN/SAVEPOINT/ROLLBACK case and inspect transaction status.",
      "limits": "A valid savepoint at another nesting level is a different case."
    },
    {
      "id": "runtime",
      "statement": "The selected 3B001 case passed on PostgreSQL 18.6 and 10.21 with the structured SQLSTATE, transaction-state, and repair assertions recorded in the runtime entries.",
      "sources": [
        "runtime.3B001-batch34-20260909.latest",
        "runtime.3B001-batch34-20260909.pg10"
      ],
      "method": "Read the selected runner summaries and raw outputs tied to the shared snippet registry.",
      "limits": "This covers the selected mechanism only, not all source callers or all driver/pool behavior."
    }
  ],
  "messages": [
    {
      "id": "message.savepoint-modern",
      "sqlstate": "3B001",
      "primary_template": "savepoint \"%s\" does not exist",
      "severity_source": "ERROR",
      "sources": [
        "src.xact.18.6"
      ],
      "limits": "The name is dynamic."
    },
    {
      "id": "message.savepoint-pg10",
      "sqlstate": "3B001",
      "primary_template": "no such savepoint",
      "severity_source": "ERROR",
      "sources": [
        "src.xact.10.23"
      ],
      "limits": "PG10 wording omits the savepoint name."
    }
  ],
  "usage_evidence": [
    {
      "scope": "3B001-runtime",
      "status": "observed_runtime",
      "evidence_ids": [
        "runtime",
        "runtime.3B001-batch34-20260909.latest",
        "runtime.3B001-batch34-20260909.pg10"
      ]
    },
    {
      "scope": "condition-and-source-paths",
      "status": "source_path_confirmed",
      "evidence_ids": [
        "identity",
        "savepoint-path",
        "recovery"
      ]
    }
  ],
  "runtime": [
    {
      "id": "runtime.3B001-batch34-20260909.latest",
      "run_id": "3B001-batch34-20260909",
      "target": "latest",
      "server_version": "18.6 (Homebrew)",
      "status": "passed",
      "cases": [
        "invalid_savepoint_recovery"
      ],
      "summary_sha256": "8299597b2f31d38a52997a7386c65d71a3dd433a8bf69583bc1f55f6c5e67b95",
      "raw_sha256": "f01798df2d267371cc2eca0422cf862edf0c30a58edefa138b5a8c2bd451dab5",
      "case_manifest": {
        "sha256": "084e2bb92c6ed5388c30ece2406512434e8134c17880a2c8b8cdecdaca5001bc"
      },
      "observed": {
        "sqlstate": "3B001",
        "primary": "savepoint \"missing\" does not exist",
        "severity": "ERROR",
        "statuses": {
          "after_error": "INERROR",
          "after_repair": "IDLE",
          "after_rollback": "IDLE"
        },
        "repair": {},
        "connection_autocommit": true
      },
      "snippet_registry": {
        "sha256": "595ce7692e34d36cc31df94c65c7040ee9bc4558fa887c23b56ba3187d235deb"
      }
    },
    {
      "id": "runtime.3B001-batch34-20260909.pg10",
      "run_id": "3B001-batch34-20260909",
      "target": "pg10",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "status": "passed",
      "cases": [
        "invalid_savepoint_recovery"
      ],
      "summary_sha256": "7e4de60ee83cc2e565050d93648c16006a266d3f584f8d1b096aef89b546ebe2",
      "raw_sha256": "66ae381dc1edbb309a234751738e015d5bd34b38777f7ae66e7b6eeee549ce91",
      "case_manifest": {
        "sha256": "084e2bb92c6ed5388c30ece2406512434e8134c17880a2c8b8cdecdaca5001bc"
      },
      "observed": {
        "sqlstate": "3B001",
        "primary": "no such savepoint",
        "severity": "ERROR",
        "statuses": {
          "after_error": "INERROR",
          "after_repair": "IDLE",
          "after_rollback": "IDLE"
        },
        "repair": {},
        "connection_autocommit": true
      },
      "snippet_registry": {
        "sha256": "595ce7692e34d36cc31df94c65c7040ee9bc4558fa887c23b56ba3187d235deb"
      }
    }
  ]
}
