{
  "schema": 1,
  "sqlstate": "01000",
  "condition_name": "warning",
  "runner": "scripts/verify_cases.py",
  "targets": {
    "latest": {
      "binary": "Homebrew PostgreSQL 18.6",
      "required": true
    },
    "pg10": {
      "image": "postgres:10",
      "required": true
    }
  },
  "cases": [
    {
      "id": "generic_warning_boundary",
      "versions": [
        "10",
        "18"
      ],
      "preconditions": [
        "A disposable session with a notice handler"
      ],
      "trigger": "Execute a PL/pgSQL RAISE WARNING dispatch probe.",
      "assertions": [
        "The notice handler receives SQLSTATE 01000 and WARNING severity",
        "The warning message is preserved",
        "The session remains IDLE and a follow-up query succeeds",
        "The probe is not presented as the hstore_compat.c natural warning path"
      ],
      "repair": "Treat the warning's message and context as the actionable signal; identify the emitting subsystem before changing data.",
      "cleanup": "No persistent runtime resources are created."
    }
  ],
  "evidence_status": "authored",
  "snippets": [
    {
      "id": "generic_warning_boundary",
      "case_id": "generic_warning_boundary",
      "language": "sql",
      "statements": {
        "probe": "DO $$ BEGIN RAISE WARNING 'calibration warning'; END $$",
        "followup": "SELECT 1"
      }
    }
  ],
  "runtime": [
    {
      "cases": [
        "generic_warning_boundary"
      ],
      "id": "runtime.01000-warning-dispatch-final-20260909.latest",
      "limits": "The run verifies default RAISE WARNING dispatch, not the separate NOTIFY queue, hstore, XID, or MultiXact warning paths.",
      "observed": {
        "followup": 1,
        "message_primary": "calibration warning",
        "scope": "PL/pgSQL RAISE WARNING dispatch probe; does not represent the hstore_compat.c warning path",
        "severity": "WARNING",
        "sqlstate": "01000",
        "status_after_probe": "IDLE"
      },
      "raw_sha256": "754dfce792e831725220e08cd071d0b86642003c774794979d211eb5b5882a84",
      "run_id": "01000-warning-dispatch-final-20260909",
      "server_version": "18.6 (Homebrew)",
      "server_version_num": 180006,
      "snippet_registry": {
        "sha256": "4c8a6418ae49f45ade9dd68c04d13ef1c300f472b2816c9ff57455776153ac58"
      },
      "status": "passed",
      "summary_sha256": "aa77c0684de9e5f8e257416ba32f10550ebb2362bf8ce083ff6c4fd4242b2565",
      "target": "latest",
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Asia/Shanghai",
          "backend_pid": 11439,
          "binary": {
            "bindir": "/opt/homebrew/Cellar/postgresql@18/18.6/bin",
            "pg_config": "/opt/homebrew/bin/pg_config",
            "pg_config_version": "PostgreSQL 18.6 (Homebrew)",
            "postgres": "/opt/homebrew/Cellar/postgresql@18/18.6/bin/postgres"
          },
          "connection_scope": "runner-owned localhost port",
          "current_user": "runner",
          "docker": {},
          "lc_messages": "C",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog,jsonlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "18.6 (Homebrew)",
          "server_version_num": "180006",
          "target_kind": "latest",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [
              {
                "expected": "01000",
                "name": "warning sqlstate",
                "observed": "01000",
                "passed": true
              },
              {
                "expected": "WARNING",
                "name": "warning severity",
                "observed": "WARNING",
                "passed": true
              },
              {
                "expected": "calibration warning",
                "name": "warning message",
                "observed": "calibration warning",
                "passed": true
              },
              {
                "expected": "IDLE and SELECT 1 succeeds",
                "name": "warning connection remains idle",
                "observed": {
                  "followup": 1,
                  "status": "IDLE"
                },
                "passed": true
              }
            ],
            "case_id": "generic_warning_boundary",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.057,
            "observed": {
              "followup": 1,
              "notices": [
                {
                  "message_detail": null,
                  "message_hint": null,
                  "message_primary": "calibration warning",
                  "severity": "WARNING",
                  "sqlstate": "01000"
                }
              ],
              "scope": "PL/pgSQL RAISE WARNING dispatch probe; does not represent the hstore_compat.c warning path",
              "status": "IDLE",
              "warning": {
                "message_detail": null,
                "message_hint": null,
                "message_primary": "calibration warning",
                "severity": "WARNING",
                "sqlstate": "01000"
              }
            },
            "schema": "c01000_generic_warning_boundary",
            "status": "passed"
          }
        ]
      }
    },
    {
      "cases": [
        "generic_warning_boundary"
      ],
      "id": "runtime.01000-warning-dispatch-final-20260909.pg10",
      "image": "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
      "limits": "The run verifies default RAISE WARNING dispatch, not the separate NOTIFY queue, hstore, XID, or MultiXact warning paths.",
      "observed": {
        "followup": 1,
        "message_primary": "calibration warning",
        "scope": "PL/pgSQL RAISE WARNING dispatch probe; does not represent the hstore_compat.c warning path",
        "severity": "WARNING",
        "sqlstate": "01000",
        "status_after_probe": "IDLE"
      },
      "raw_sha256": "471efe14b8234036ed5d978f816b08b2f577eab6c79b56b1259ade338983251d",
      "run_id": "01000-warning-dispatch-final-20260909",
      "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
      "server_version_num": 100021,
      "snippet_registry": {
        "sha256": "4c8a6418ae49f45ade9dd68c04d13ef1c300f472b2816c9ff57455776153ac58"
      },
      "status": "passed",
      "summary_sha256": "ee813797dd39ee66307ce1016bc7840730fa1e919afdbc9a44d8cb75f38129af",
      "target": "pg10",
      "result": {
        "status": "passed",
        "environment": {
          "TimeZone": "Etc/UTC",
          "backend_pid": 80,
          "binary": {},
          "connection_scope": "runner-owned localhost port",
          "current_user": "postgres",
          "docker": {
            "architecture": "arm64",
            "command": "/usr/local/bin/docker",
            "id": "sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc",
            "image": "postgres:10",
            "image_created": "2022-06-23T09:11:18.374607054Z",
            "os": "linux",
            "repo_digests": [
              "postgres@sha256:b2baf8998630663d21370da06387c950e587071bdd307ee34e661cdcc7442bcc"
            ]
          },
          "lc_messages": "en_US.utf8",
          "libpq_version": "18.6",
          "locale": "en_US.UTF-8",
          "log_destination": "csvlog",
          "log_error_verbosity": "verbose",
          "log_min_error_statement": "error",
          "log_min_messages": "error",
          "logging_collector": "on",
          "machine": "arm64",
          "max_connections": "100",
          "platform": "macOS-26.6.2-arm64-arm-64bit-Mach-O",
          "psycopg_version": "3.3.5",
          "python_version": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]",
          "server_encoding": "UTF8",
          "server_version": "10.21 (Debian 10.21-1.pgdg90+1)",
          "server_version_num": "100021",
          "target_kind": "pg10",
          "wal_level": "logical"
        },
        "cases": [
          {
            "assertions": [
              {
                "expected": "01000",
                "name": "warning sqlstate",
                "observed": "01000",
                "passed": true
              },
              {
                "expected": "WARNING",
                "name": "warning severity",
                "observed": "WARNING",
                "passed": true
              },
              {
                "expected": "calibration warning",
                "name": "warning message",
                "observed": "calibration warning",
                "passed": true
              },
              {
                "expected": "IDLE and SELECT 1 succeeds",
                "name": "warning connection remains idle",
                "observed": {
                  "followup": 1,
                  "status": "IDLE"
                },
                "passed": true
              }
            ],
            "case_id": "generic_warning_boundary",
            "cleanup": {
              "errors": [],
              "passed": true
            },
            "elapsed_seconds": 0.047,
            "observed": {
              "followup": 1,
              "notices": [
                {
                  "message_detail": null,
                  "message_hint": null,
                  "message_primary": "calibration warning",
                  "severity": "WARNING",
                  "sqlstate": "01000"
                }
              ],
              "scope": "PL/pgSQL RAISE WARNING dispatch probe; does not represent the hstore_compat.c warning path",
              "status": "IDLE",
              "warning": {
                "message_detail": null,
                "message_hint": null,
                "message_primary": "calibration warning",
                "severity": "WARNING",
                "sqlstate": "01000"
              }
            },
            "schema": "c01000_generic_warning_boundary",
            "status": "passed"
          }
        ]
      }
    }
  ]
}
