{
  "schemaVersion": 1,
  "tool": {
    "name": "skewcheck",
    "version": "0.1.0"
  },
  "executionId": "example-H-valid-repair",
  "project": "fixture/H-valid-repair",
  "createdAt": "2026-10-24T18:30:04.727Z",
  "baselineRevision": "shop-v1",
  "candidateRevision": "H-valid-repair",
  "database": {
    "serverVersion": "16.15 (Debian 16.15-1.pgdg12+2)"
  },
  "proposedMigrations": [
    "002_rename_email.sql"
  ],
  "experiment": [
    "control: old application (shop-v1) × baseline schema (1 migrations)",
    "candidate ×2: old application (shop-v1) × proposed schema (2 migrations)",
    "context: current application (H-valid-repair) × proposed schema"
  ],
  "verdict": "SAFE",
  "blocking": false,
  "exitCode": 0,
  "summary": "No supported incompatibility was detected under the conditions tested. This is not a universal safety guarantee.",
  "reasons": [],
  "recommendedAction": "Proceed with normal review. Keep the old application's tests meaningful; SAFE only covers what they exercise.",
  "complete": true,
  "findings": [],
  "schemaChanges": [
    {
      "id": "column_added:customers.email_address",
      "kind": "column_added",
      "risk": "inert",
      "schema": "public",
      "table": "customers",
      "column": "email_address",
      "after": "text"
    },
    {
      "id": "index_added:customers.customers_email_address_key",
      "kind": "index_added",
      "risk": "breaking",
      "schema": "public",
      "table": "customers",
      "object": "customers_email_address_key",
      "after": "CREATE UNIQUE INDEX customers_email_address_key ON public.customers USING btree (email_address)",
      "exercisedBy": [
        "insert",
        "update"
      ]
    },
    {
      "id": "trigger_added:customers.customers_sync_email",
      "kind": "trigger_added",
      "risk": "behavioral",
      "schema": "public",
      "table": "customers",
      "object": "customers_sync_email",
      "after": "CREATE TRIGGER customers_sync_email BEFORE INSERT OR UPDATE ON public.customers FOR EACH ROW EXECUTE FUNCTION customers_sync_email()",
      "exercisedBy": [
        "insert",
        "update",
        "delete"
      ]
    }
  ],
  "coverage": [
    {
      "changeId": "column_added:customers.email_address",
      "target": "customers.email_address",
      "risk": "inert",
      "required": false,
      "exercised": true,
      "statementCount": 3,
      "tests": [
        "test/customers.test.js",
        "test/orders.test.js"
      ],
      "staticReferences": []
    },
    {
      "changeId": "index_added:customers.customers_email_address_key",
      "target": "customers.customers_email_address_key",
      "risk": "breaking",
      "required": true,
      "exercised": true,
      "statementCount": 2,
      "tests": [
        "test/customers.test.js",
        "test/orders.test.js"
      ],
      "staticReferences": [
        "src/admin.js:5",
        "src/customers.js:4",
        "src/customers.js:9",
        "test/customers.test.js:4",
        "test/orders.test.js:4"
      ]
    },
    {
      "changeId": "trigger_added:customers.customers_sync_email",
      "target": "customers.customers_sync_email",
      "risk": "behavioral",
      "required": true,
      "exercised": true,
      "statementCount": 2,
      "tests": [
        "test/customers.test.js",
        "test/orders.test.js"
      ],
      "staticReferences": [
        "src/admin.js:5",
        "src/customers.js:4",
        "src/customers.js:9",
        "test/customers.test.js:4",
        "test/orders.test.js:4"
      ]
    }
  ],
  "coverageSummary": "2 of 2 risk-bearing schema change(s) were exercised by the old application's tests in the control run.",
  "runs": [
    {
      "id": "ctl",
      "label": "control (old app × baseline schema)",
      "app": "baseline",
      "schema": "baseline",
      "database": "sc_ctl",
      "revision": "shop-v1",
      "completed": true,
      "migrations": [
        {
          "file": "001_init.sql",
          "ok": true
        }
      ],
      "tests": [
        {
          "test": "test/customers.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 103,
          "outputTail": "TAP version 13\n# Subtest: signs up a customer and finds them by email\nok 1 - signs up a customer and finds them by email\n  ---\n  duration_ms: 10.59512\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 71.68283\n"
        },
        {
          "test": "test/orders.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 104,
          "outputTail": "TAP version 13\n# Subtest: new orders start in status \"new\" and can be shipped\nok 1 - new orders start in status \"new\" and can be shipped\n  ---\n  duration_ms: 13.300439\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 76.450659\n"
        }
      ],
      "errors": [],
      "statements": 7
    },
    {
      "id": "cand1",
      "label": "candidate #1 (old app × proposed schema)",
      "app": "baseline",
      "schema": "candidate",
      "database": "sc_cand1",
      "revision": "shop-v1",
      "completed": true,
      "migrations": [
        {
          "file": "001_init.sql",
          "ok": true
        },
        {
          "file": "002_rename_email.sql",
          "ok": true
        }
      ],
      "tests": [
        {
          "test": "test/customers.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 97,
          "outputTail": "TAP version 13\n# Subtest: signs up a customer and finds them by email\nok 1 - signs up a customer and finds them by email\n  ---\n  duration_ms: 10.863243\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 70.605757\n"
        },
        {
          "test": "test/orders.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 100,
          "outputTail": "TAP version 13\n# Subtest: new orders start in status \"new\" and can be shipped\nok 1 - new orders start in status \"new\" and can be shipped\n  ---\n  duration_ms: 14.019009\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 72.698944\n"
        }
      ],
      "errors": [],
      "statements": 7
    },
    {
      "id": "cand2",
      "label": "candidate #2 (old app × proposed schema)",
      "app": "baseline",
      "schema": "candidate",
      "database": "sc_cand2",
      "revision": "shop-v1",
      "completed": true,
      "migrations": [
        {
          "file": "001_init.sql",
          "ok": true
        },
        {
          "file": "002_rename_email.sql",
          "ok": true
        }
      ],
      "tests": [
        {
          "test": "test/customers.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 97,
          "outputTail": "TAP version 13\n# Subtest: signs up a customer and finds them by email\nok 1 - signs up a customer and finds them by email\n  ---\n  duration_ms: 10.779212\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 70.846776\n"
        },
        {
          "test": "test/orders.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 100,
          "outputTail": "TAP version 13\n# Subtest: new orders start in status \"new\" and can be shipped\nok 1 - new orders start in status \"new\" and can be shipped\n  ---\n  duration_ms: 14.400974\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 73.343949\n"
        }
      ],
      "errors": [],
      "statements": 7
    },
    {
      "id": "cur",
      "label": "current app × proposed schema (context)",
      "app": "current",
      "schema": "candidate",
      "database": "sc_cur",
      "revision": "H-valid-repair",
      "completed": true,
      "migrations": [
        {
          "file": "001_init.sql",
          "ok": true
        },
        {
          "file": "002_rename_email.sql",
          "ok": true
        }
      ],
      "tests": [
        {
          "test": "test/customers.test.js",
          "outcome": "pass",
          "exitCode": 0,
          "durationMs": 95,
          "outputTail": "TAP version 13\n# Subtest: v2 signs up a customer and finds them by email_address\nok 1 - v2 signs up a customer and finds them by email_address\n  ---\n  duration_ms: 10.79131\n  ...\n1..1\n# tests 1\n# suites 0\n# pass 1\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 69.240603\n"
        }
      ],
      "errors": [],
      "statements": 2
    }
  ],
  "skippedChecks": [
    "Performance / lock-time analysis (out of scope)."
  ],
  "limitations": [
    "Skewcheck only observes code paths that the old application's tests execute; untested paths are reported as coverage gaps, not as safe.",
    "Coverage is identifier-level: a statement \"touches\" a changed object when it names the table (and column, or uses *). It is not a SQL parser.",
    "Correlation between an error and a schema change uses a fixed set of deterministic rules (R1–R6). Anything else is reported as ADVISORY, never UNSAFE.",
    "Performance, locking and migration runtime on production-sized data are not evaluated.",
    "Test files of one run share a database and run sequentially; ordering effects are identical across runs but are not isolated.",
    "Data-only migration effects are detected only when a test asserts on the affected data."
  ],
  "policy": {
    "advisory": "warn",
    "noEvidence": "block",
    "inconclusive": "block",
    "candidateRepeats": 2,
    "testTimeoutMs": 60000,
    "maxBaselineFailureRatio": 0.5,
    "protectedPaths": [],
    "repairBranchPrefixes": [
      "skewcheck-repair/"
    ]
  }
}