{
 "action": "Not for automatic application — after the patch the example still uses Connection, which the verified example does not: the patch covers part of the change. Show this correction to the user as a lead. Review before applying: this fix runs on typeorm 1.1.2, but its printed output differs from what the original printed on 0.3.28 (observed stdout of one example) — it may do different work. Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [],
 "applicability": {
  "leftover": [
   "Connection"
  ],
  "line": 3,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "546c1b9096e9",
  "reason": "after the patch the example still uses Connection, which the verified example does not: the patch covers part of the change",
  "run_on": "1.1.2",
  "status": "incomplete"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "feat!: remove deprecated `Connection` and `ConnectionOptions` by @alumni in https://github.com/typeorm/typeorm/pull/12022",
  "url": "https://github.com/typeorm/typeorm/releases"
 },
 "confirmations": {
  "failed": 0,
  "worked": 2
 },
 "detect": [
  "Connection"
 ],
 "ecosystem": "npm",
 "equivalence": "differs",
 "error_kind": "not_constructor",
 "error_signature": {
  "message": "Connection is not a constructor",
  "norm": "not_constructor:connection",
  "type": "TypeError"
 },
 "first_seen": "2026-10-20T16:11:13+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "npm/typeorm/1.1.2/0001",
 "kind": "behavior_changed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "typeorm",
 "proof": {
  "applicability": {
   "leftover": [
    "Connection"
   ],
   "line": 3,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "546c1b9096e9",
   "reason": "after the patch the example still uses Connection, which the verified example does not: the patch covers part of the change",
   "run_on": "1.1.2",
   "status": "incomplete"
  },
  "auto_apply": false,
  "auto_apply_reason": "the fix's output differs from the original's; the patch gives incomplete when applied word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "differs",
  "equivalent": false,
  "fails_on": "1.1.2",
  "fixed_on": "1.1.2",
  "level": "differential",
  "method": {
   "fix_on": "1.1.2",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "0.3.28",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "\"use strict\";\n\nconst { DataSource } = require(\"typeorm\");\n\nconst options = {\n  name: \"app\",\n  type: \"better-sqlite3\",\n  database: \"/tmp/app.db\",\n\n  // Avoid requiring a native SQLite driver: this connection is never opened.\n  driver: {\n    verbose() {\n      return this;\n    },\n    Database() {\n      throw new Error(\"This script must not open the database.\");\n    },\n  },\n};\n\nfunction describeConnection(conn) {\n  return `name=${conn.name}, type=${conn.options.type}, connected=${conn.isInitialized}`;\n}\n\nconst connection = new DataSource(options);\nconsole.log(describeConnection(connection));",
  "script_wrong": "\"use strict\";\n\nconst { Connection } = require(\"typeorm\");\n\nconst options = {\n  name: \"app\",\n  type: \"sqlite\",\n  database: \"/tmp/app.db\",\n\n  // Avoid requiring a native SQLite driver: this connection is never opened.\n  driver: {\n    verbose() {\n      return this;\n    },\n    Database() {\n      throw new Error(\"This script must not open the database.\");\n    },\n  },\n};\n\nfunction describeConnection(conn) {\n  return `name=${conn.name}, type=${conn.options.type}, connected=${conn.isConnected}`;\n}\n\nconst connection = new Connection(options);\nconsole.log(describeConnection(connection));",
  "works_on": "0.3.28"
 },
 "right": "const { DataSource } = require(\"typeorm\");",
 "seen_in_models": [
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "connection",
 "source": "pipeline",
 "symbol": "Connection",
 "updated": "2026-10-27T17:19:59+00:00",
 "url": "https://formachines.ai/errata/npm/typeorm/0001-connection/",
 "variant_confirmations": 2,
 "variant_models": [
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">0.3.28,<=1.1.2",
  "fails_on": "1.1.2",
  "works_on": "0.3.28"
 },
 "wrong": "const { Connection } = require(\"typeorm\");"
}