{"record":{"id":"3d4da0d7dd603930","repo":"nodejs/node","slug":"s-is-not-a-proper-inspector-protocol-checkout-s","errorCode":null,"errorMessage":"%s is not a proper inspector_protocol checkout: %s","messagePattern":"(.+?) is not a proper inspector_protocol checkout: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"tools/inspector_protocol/roll.py","lineNumber":54,"sourceCode":"  if p.returncode != 0:\n    raise Exception('%s: exit status %d', str(cmd), p.returncode)\n  return stdoutdata.decode('utf-8')\n\n\ndef CheckRepoIsClean(path):\n  os.chdir(path)  # As a side effect this also checks for existence of the dir.\n  # If path isn't a git repo, this will throw and exception.\n  # And if it is a git repo and 'git status' has anything interesting to say,\n  # then it's not clean (uncommitted files etc.)\n  if len(RunCmd(['git', 'status', '--porcelain'])) != 0:\n    raise Exception('%s is not a clean git repo (run git status)' % path)\n\n\ndef CheckRepoIsInspectorProtocolCheckout(path):\n  os.chdir(path)\n  revision = RunCmd(['git', 'config', '--get', 'remote.origin.url']).strip()\n  if (revision != 'https://chromium.googlesource.com/deps/inspector_protocol.git'):\n    raise Exception('%s is not a proper inspector_protocol checkout: %s' % (path, revision))\n\n\ndef FindFilesToSyncIn(path):\n  files = []\n  for f in FILES_TO_SYNC:\n    files += glob.glob(os.path.join(path, f))\n  files = [os.path.relpath(f, path) for f in files]\n  return files\n\n\ndef FilesAreEqual(path1, path2):\n  # We check for permissions (useful for executable scripts) and contents.\n  return (os.stat(path1).st_mode == os.stat(path2).st_mode and\n          open(path1).read() == open(path2).read())\n\n\ndef ReadV8IPRevision(node_src_path):\n  lines = open(os.path.join(node_src_path, 'deps/v8/third_party/inspector_protocol/README.v8')).readlines()","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/tools/inspector_protocol/roll.py#L36-L72","documentation":"roll.py verifies the upstream directory is genuinely a clone of the official inspector_protocol repo by checking `git config --get remote.origin.url`. Anything other than https://chromium.googlesource.com/deps/inspector_protocol.git is rejected, so files are never rolled from an unrelated tree.","triggerScenarios":"Passing --ip_src_upstream that points at a fork, a mirror, the node tree itself, or any repo whose origin URL differs from the official chromium URL.","commonSituations":"Using a personal fork for experimentation; cloning from a GitHub mirror; passing the wrong directory by mistake; the checkout's origin was rewritten.","solutions":["Clone the official repo: `git clone https://chromium.googlesource.com/deps/inspector_protocol.git ~/ip/src`.","Repoint the existing checkout's origin: `git -C <upstream> remote set-url origin https://chromium.googlesource.com/deps/inspector_protocol.git`.","Supply --ip_src_upstream pointing at that correct checkout."],"exampleFix":"// before\npython tools/inspector_protocol/roll.py --ip_src_upstream ~/my-fork\n// after\ngit clone https://chromium.googlesource.com/deps/inspector_protocol.git ~/ip/src\npython tools/inspector_protocol/roll.py --ip_src_upstream ~/ip/src","handlingStrategy":"validation","validationCode":"import subprocess\nOFFICIAL='https://chromium.googlesource.com/deps/inspector_protocol.git'\nurl=subprocess.run(['git','-C',ip_src,'config','--get','remote.origin.url'],\n                   capture_output=True,text=True).stdout.strip()\nassert url==OFFICIAL, f'origin is {url!r}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always clone the upstream from the official googlesource URL.","Keep a dedicated ip clone; do not reuse a fork for rolling."],"tags":["git","inspector-protocol","roll","configuration"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}