{"record":{"id":"add6c33371247a15","repo":"affaan-m/ECC","slug":"remote-import-host-could-not-be-resolved-parsed","errorCode":null,"errorMessage":"remote import host could not be resolved: {parsed.hostname}","messagePattern":"remote import host could not be resolved: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/continuous-learning-v2/scripts/instinct-cli.py","lineNumber":200,"sourceCode":"    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\n            or ip.is_unspecified\n        ):\n            raise ValueError(f\"remote import host resolves to a non-public address: {host}\")\n\n    return urllib.parse.urlunparse(parsed)","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/continuous-learning-v2/scripts/instinct-cli.py#L182-L218","documentation":"Error \"remote import host could not be resolved: {parsed.hostname}\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the hostname is spelled correctly and resolvable (try: getent hosts <host> or nslookup <host>).","Check DNS/network connectivity; in restricted environments, mirror the instinct file locally and import from disk."],"exampleFix":"nslookup raw.example.com || curl -O https://reachable-mirror/instinct.md && instinct import ./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"}