{"record":{"id":"b66b725cf7d359b7","repo":"phacility/phabricator","slug":"specify-a-path-to-look-up-with-s","errorCode":null,"errorMessage":"Specify a path to look up with `%s`.","messagePattern":"Specify a path to look up with `(.+?)`\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"info","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php","lineNumber":40,"sourceCode":"            'help'    => pht('Specify a path to look up.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n\n    $commit_name = $args->getArg('commit');\n    if ($commit_name === null) {\n      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(),","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php#L22-L58","documentation":"Usage error from the 'bin/repository cache' workflow: --commit was provided and resolved via loadNamedCommit, but --path was not supplied. The command needs both a commit and a path to look up the last-modified graph cache entry; it aborts with PhutilArgumentUsageException before querying anything.","triggerScenarios":"Running 'bin/repository cache --commit <sha>' alone; forgetting the path half of the lookup pair during cache debugging.","commonSituations":"Admin testing whether a specific commit is cached and forgetting that the lookup is per (commit, path) pair.","solutions":["Re-run with both flags: 'bin/repository cache --commit <sha> --path /src/file.php'","Check 'bin/repository cache --help' to review the options"],"exampleFix":"# before\nbin/repository cache --commit abc123ef\n\n# after\nbin/repository cache --commit abc123ef --path /src","handlingStrategy":"validation","validationCode":"if (!isset($opts['commit']) || !isset($opts['path'])) {\n  fwrite(STDERR, \"usage: bin/repository cache --commit <sha> --path <path>\\n\");\n  exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat --commit and --path as an inseparable pair for the cache workflow","Automate cache debugging through a wrapper that validates flags first"],"tags":["phabricator","cli","usage-error","cache"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}