{"record":{"id":"7f70edc8bfdcb663","repo":"affaan-m/ECC","slug":"remote-import-url-is-missing-a-hostname","errorCode":null,"errorMessage":"remote import URL is missing a hostname","messagePattern":"remote import URL is missing a hostname","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/continuous-learning-v2/scripts/instinct-cli.py","lineNumber":195,"sourceCode":"    \"\"\"Validate instinct IDs before using them in filenames.\"\"\"\n    if not instinct_id or len(instinct_id) > 128:\n        return False\n    if \"/\" in instinct_id or \"\\\\\" in instinct_id:\n        return False\n    if \"..\" in instinct_id:\n        return False\n    if instinct_id.startswith(\".\"):\n        return False\n    return bool(re.match(r\"^[A-Za-z0-9][A-Za-z0-9._-]*$\", instinct_id))\n\n\ndef _validate_import_url(source: str) -> str:\n    \"\"\"Validate remote instinct imports before opening a network connection.\"\"\"\n    parsed = urllib.parse.urlparse(source)\n    if parsed.scheme != \"https\":\n        raise ValueError(\"remote instinct imports require https URLs\")\n    if not parsed.hostname:\n        raise ValueError(\"remote import URL is missing a hostname\")\n\n    try:\n        addr_infos = socket.getaddrinfo(parsed.hostname, parsed.port or 443, type=socket.SOCK_STREAM)\n    except socket.gaierror as exc:\n        raise ValueError(f\"remote import host could not be resolved: {parsed.hostname}\") from exc\n\n    for family, _, _, _, sockaddr in addr_infos:\n        host = sockaddr[0]\n        try:\n            ip = ipaddress.ip_address(host)\n        except ValueError:\n            continue\n        if (\n            ip.is_private\n            or ip.is_loopback\n            or ip.is_link_local\n            or ip.is_multicast\n            or ip.is_reserved","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/continuous-learning-v2/scripts/instinct-cli.py#L177-L213","documentation":"Error \"remote import URL is missing a hostname\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a complete URL including a hostname, e.g. https://host/path/file.md; URLs like 'https:///file.md' are invalid.","Check the URL for typos such as a missing '//' or an empty authority component."],"exampleFix":"instinct import https://raw.example.com/team/instinct.md","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}