{"record":{"id":"7152b53174ff18f0","repo":"phacility/phabricator","slug":"no-such-buildable-s","errorCode":null,"errorMessage":"No such buildable \"%s\"!","messagePattern":"No such buildable \"(.+?)\"!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php","lineNumber":47,"sourceCode":"  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $names = $args->getArg('buildable');\n    if (count($names) != 1) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify exactly one buildable object, by object name.'));\n    }\n\n    $name = head($names);\n\n    $buildable = id(new PhabricatorObjectQuery())\n      ->setViewer($viewer)\n      ->withNames($names)\n      ->executeOne();\n    if (!$buildable) {\n      throw new PhutilArgumentUsageException(\n        pht('No such buildable \"%s\"!', $name));\n    }\n\n    if (!($buildable instanceof HarbormasterBuildableInterface)) {\n      throw new PhutilArgumentUsageException(\n        pht('Object \"%s\" is not a buildable!', $name));\n    }\n\n    $plan_id = $args->getArg('plan');\n    if (!$plan_id) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use %s to specify a build plan to run.',\n          '--plan'));\n    }\n\n    $plan = id(new HarbormasterBuildPlanQuery())\n      ->setViewer($viewer)","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php#L29-L65","documentation":"The single positional name given to `harbormaster build` did not resolve to any object via PhabricatorObjectQuery->withNames() (monograms like D123, callsigns, raw PHIDs). A usage exception is thrown naming the offending value.","triggerScenarios":"A typo'd monogram (D12P, O123); a PHID with a truncated or invalid format; naming an object the acting administrator cannot see (CLI viewer must still pass policies); an ambiguous name the name resolver refuses to guess.","commonSituations":"Passing a commit hash instead of a monogram/PHID; mixing up the Diffusion 'rXYZabcdef' style with plain hashes; running as a CLI admin whose handle resolves differently than expected.","solutions":["Use an unambiguous monogram (D123) or a full PHID string.","Verify the object exists: open it in the web UI or run `phid.lookup` / `phid.query` conduit with the same name.","Check for typos — the name must resolve exactly as the object resolver would render it."],"exampleFix":"# before\n./bin/phabricator harbormaster build --plan 3 D12P\n\n# after\n./bin/phabricator harbormaster build --plan 3 D123","handlingStrategy":"validation","validationCode":"// Resolve before invoking:\n$results = id(new PhabricatorObjectQuery())\n  ->setViewer($viewer)\n  ->withNames(array($name))\n  ->execute();\nif (count($results) !== 1) {\n  // name is not resolvable; do not run the build command\n}","typeGuard":"function isResolvableObjectName($viewer, $name) {\n  $query = id(new PhabricatorObjectQuery())\n    ->setViewer($viewer)\n    ->withNames(array($name));\n  $query->execute();\n  return (bool)$query->getNamedResults();\n}","tryCatchPattern":"try {\n  runBuildWorkflow($args);\n} catch (PhutilArgumentUsageException $e) {\n  if (preg_match('/No such buildable/', $e->getMessage())) {\n    // fix the name or skip this object in automation\n  }\n}","preventionTips":["Prefer full monograms or PHIDs over raw hashes; verify names with phid.lookup in scripts before use.","Generate names from Phabricator APIs rather than typing them, so typos cannot reach the CLI."],"tags":["harbormaster","cli","usage-error","object-resolution"],"backgroundTag":"entity-not-found-by-name","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}