{"record":{"id":"184feb335270e8c0","repo":"affaan-m/ECC","slug":"path-does-not-exist-path","errorCode":null,"errorMessage":"Path does not exist: {path}","messagePattern":"Path does not exist: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/continuous-learning-v2/scripts/instinct-cli.py","lineNumber":171,"sourceCode":"    \"\"\"\n    path = Path(path_str).expanduser().resolve()\n\n    # Block paths that escape into system directories\n    # We block specific system paths but allow temp dirs (/var/folders on macOS)\n    blocked_prefixes = [\n        \"/etc\", \"/usr\", \"/bin\", \"/sbin\", \"/proc\", \"/sys\",\n        \"/var/log\", \"/var/run\", \"/var/lib\", \"/var/spool\",\n        # macOS resolves /etc → /private/etc\n        \"/private/etc\",\n        \"/private/var/log\", \"/private/var/run\", \"/private/var/db\",\n    ]\n    path_s = str(path)\n    for prefix in blocked_prefixes:\n        if path_s.startswith(prefix + \"/\") or path_s == prefix:\n            raise ValueError(f\"Path '{path}' targets a system directory\")\n\n    if must_exist and not path.exists():\n        raise ValueError(f\"Path does not exist: {path}\")\n\n    return path\n\n\ndef _validate_instinct_id(instinct_id: str) -> bool:\n    \"\"\"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:","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/continuous-learning-v2/scripts/instinct-cli.py#L153-L189","documentation":"Error \"Path does not exist: {path}\" thrown in affaan-m/ECC.","triggerScenarios":"Thrown at skills/continuous-learning-v2/scripts/instinct-cli.py:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the directory first or correct the path; paths validated with must_exist=True must already exist on disk.","Check for typos, missing mounts, or a relative path resolving to an unexpected location."],"exampleFix":"mkdir -p \"$HOME/.ecc/projects/myproj\" && instinct-cli --path \"$HOME/.ecc/projects/myproj\"","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"}