{
 "action": "Not for automatic application — the patched example does not run on 17.0.2: exit code 1, ReferenceError: isValidNameError is not defined. Show this correction to the user as a lead. Replace the old line with the new one; the rest of the code can stay.",
 "agent_rule": "Apply a correction on your own only when the installed version is one it was checked on (versions.checked_on: versions.fails_on and every recheck) and its proof.auto_apply is true (proof.equivalent is true and proof.applicability.status is applies). On a newer version than those checked, a version between versions.works_on and versions.fails_on, or an unknown version, show it to the user as a lead and do not apply it; on versions.works_on or older it does not apply.",
 "alternatives": [],
 "applicability": {
  "exit_code": 1,
  "line": 1,
  "method": "literal_patch",
  "occurrences": 1,
  "patched_sha": "a1ad43142c7b",
  "reason": "the patched example does not run on 17.0.2: exit code 1, ReferenceError: isValidNameError is not defined",
  "run_on": "17.0.2",
  "status": "fails"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "Remove deprecated `assertValidName` & `isValidNameError`",
  "url": "https://github.com/graphql/graphql-js/releases"
 },
 "confirmations": {
  "failed": 0,
  "worked": 1
 },
 "detect": [
  "isValidNameError"
 ],
 "ecosystem": "npm",
 "equivalence": "same",
 "error_kind": "not_function",
 "error_signature": {
  "message": "isValidNameError is not a function",
  "norm": "not_function:isvalidnameerror",
  "type": "TypeError"
 },
 "first_seen": "2026-10-28T08:02:32+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "npm/graphql/17.0.2/0002",
 "kind": "removed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "graphql",
 "proof": {
  "applicability": {
   "exit_code": 1,
   "line": 1,
   "method": "literal_patch",
   "occurrences": 1,
   "patched_sha": "a1ad43142c7b",
   "reason": "the patched example does not run on 17.0.2: exit code 1, ReferenceError: isValidNameError is not defined",
   "run_on": "17.0.2",
   "status": "fails"
  },
  "auto_apply": false,
  "auto_apply_reason": "the patch gives fails 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": "same",
  "equivalent": true,
  "fails_on": "17.0.2",
  "fixed_on": "17.0.2",
  "level": "differential",
  "method": {
   "fix_on": "17.0.2",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "16.13.2",
   "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": "const { assertName } = require('graphql');\n\nfunction isValidNameError(name) {\n  if (name.length > 1 && name[0] === '_' && name[1] === '_') {\n    return new Error(\n      `Name \"${name}\" must not begin with \"__\", which is reserved by GraphQL introspection.`,\n    );\n  }\n  try {\n    assertName(name);\n  } catch (error) {\n    return error;\n  }\n}\n\nconst proposedNames = [\n  'User',\n  '2fast',\n  '__secret',\n  'Order_Item',\n  'bad-name',\n];\n\nfor (const name of proposedNames) {\n  const error = isValidNameError(name);\n  if (error) {\n    console.log(`${name}: invalid: ${error.message}`);\n  } else {\n    console.log(`${name}: valid`);\n  }\n}",
  "script_wrong": "const { isValidNameError } = require('graphql');\n\nconst proposedNames = [\n  'User',\n  '2fast',\n  '__secret',\n  'Order_Item',\n  'bad-name',\n];\n\nfor (const name of proposedNames) {\n  const error = isValidNameError(name);\n  if (error) {\n    console.log(`${name}: invalid: ${error.message}`);\n  } else {\n    console.log(`${name}: valid`);\n  }\n}",
  "works_on": "16.13.2"
 },
 "right": "const { assertName } = require('graphql');",
 "seen_in_models": [
  "gemini-3.8-flash"
 ],
 "seq": 2,
 "slug": "isvalidnameerror",
 "source": "pipeline",
 "symbol": "isValidNameError",
 "updated": "2026-10-28T08:02:32+00:00",
 "url": "https://formachines.ai/errata/npm/graphql/0002-isvalidnameerror/",
 "variant_confirmations": 1,
 "variant_models": [
  "gemini-3.8-flash"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">16.13.2,<=17.0.2",
  "checked_on": [
   "17.0.2"
  ],
  "fails_on": "17.0.2",
  "works_on": "16.13.2"
 },
 "wrong": "const { isValidNameError } = require('graphql');"
}