{"record":{"id":"662c7a645e97f926","repo":"phacility/phabricator","slug":"path-s-is-not-unknown","errorCode":null,"errorMessage":"Path \"%s\" is not unknown.","messagePattern":"Path \"(.+?)\" is not unknown\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"info","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php","lineNumber":49,"sourceCode":"      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify a commit to look up with `%s`.',\n          '--commit'));\n    }\n    $commit = $this->loadNamedCommit($commit_name);\n\n    $path_name = $args->getArg('path');\n    if ($path_name === null) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify a path to look up with `%s`.',\n          '--path'));\n    }\n\n    $path_map = id(new DiffusionPathIDQuery(array($path_name)))\n      ->loadPathIDs();\n    if (empty($path_map[$path_name])) {\n      throw new PhutilArgumentUsageException(\n        pht('Path \"%s\" is not unknown.', $path_name));\n    }\n    $path_id = $path_map[$path_name];\n\n    $graph_cache = new PhabricatorRepositoryGraphCache();\n\n    $t_start = microtime(true);\n    $cache_result = $graph_cache->loadLastModifiedCommitID(\n      $commit->getID(),\n      $path_id);\n    $t_end = microtime(true);\n\n    $console = PhutilConsole::getConsole();\n\n    $console->writeOut(\n      \"%s\\n\",\n      pht('Query took %s ms.', new PhutilNumber(1000 * ($t_end - $t_start))));\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php#L31-L67","documentation":"Usage error from 'bin/repository cache': the supplied --path was not found in the repository path ID map (DiffusionPathIDQuery returned no entry for it). The message wording 'is not unknown' is inverted legacy Phabricator phrasing; the actual condition is that the path IS unknown, meaning it does not exist in the normalized path table used by the graph cache, usually because it was never seen during repository import or path indexing.","triggerScenarios":"Passing a path that does not exist in the repository (typo, wrong case, missing leading slash); passing a path style that does not match normalization such as 'src' vs '/src'; querying before the repository paths have been imported and indexed.","commonSituations":"Cache debugging on a freshly imported repo whose path indexing is incomplete; path typos or platform-specific separators; Windows-derived path strings.","solutions":["Use the exact canonical form of the path as recorded in the repository, typically with a leading slash such as '/src/eng.cpp'","Check the path exists at that commit with 'git ls-tree <commit> <path>'","If the repo is newly imported, let import and path indexing finish, then retry"],"exampleFix":"# before\nbin/repository cache --commit abc123 --path src\n\n# after\nbin/repository cache --commit abc123 --path /src","handlingStrategy":"validation","validationCode":"// Confirm the path exists in the repo before querying the cache:\nlist($out) = execx('git ls-tree %s -- %s', $commit, $path);\nif (!trim($out)) {\n  // path unknown to this commit; do not invoke the cache lookup\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use canonical paths with a leading slash matching Diffusion normalization","Verify path spelling and case against the repository tree before cache lookups","Wait for path indexing to finish on newly imported repositories"],"tags":["phabricator","cli","path-lookup","cache","usage-error"],"backgroundTag":"unknown-path-lookup","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}