{"record":{"id":"dec04c58d1abab21","repo":"phacility/phabricator","slug":"object-s-is-not-a-buildable","errorCode":null,"errorMessage":"Object \"%s\" is not a buildable!","messagePattern":"Object \"(.+?)\" is not a buildable!","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php","lineNumber":52,"sourceCode":"    $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)\n      ->withIDs(array($plan_id))\n      ->executeOne();\n    if (!$plan) {\n      throw new PhutilArgumentUsageException(\n        pht('Build plan \"%s\" does not exist.', $plan_id));","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/harbormaster/management/HarbormasterManagementBuildWorkflow.php#L34-L70","documentation":"The name resolved to a real object, but it does not implement HarbormasterBuildableInterface — the marker interface for things Harbormaster can build (revisions, commits, repositories). Anything else (tasks, users, pastes, mocks...) reaches this check and is rejected with the object's name.","triggerScenarios":"Passing a Maniphest monogram (T123), a user PHID, or a Paste P45 to `harbormaster build`; expecting any object to be buildable; scripts that feed arbitrary object names into the command.","commonSituations":"Assuming 'buildable' means 'anything with a PHID'; automating builds from object lists that include non-buildable types.","solutions":["Pass a buildable object: a Differential revision (D123), a Diffusion commit, or a repository, per Harbormaster's buildable types.","If you need to build a commit, use its monogram/PHID from Diffusion rather than the raw hash alone.","Filter your input list to buildable types before invoking the command."],"exampleFix":"# before\n./bin/phabricator harbormaster build --plan 3 T123\n\n# after\n./bin/phabricator harbormaster build --plan 3 D123","handlingStrategy":"type-guard","validationCode":"// After resolving the name, before building:\n$object = head($query->execute());\nif (!($object instanceof HarbormasterBuildableInterface)) {\n  // not buildable; skip\n}","typeGuard":"function isBuildableObject($object) {\n  return $object instanceof HarbormasterBuildableInterface;\n}","tryCatchPattern":null,"preventionTips":["Restrict automation inputs to known-buildable types (Differential revisions, Diffusion commits, repositories).","Run the instanceof check in your wrapper before spawning harbormaster build."],"tags":["harbormaster","cli","usage-error","type-mismatch","buildable"],"backgroundTag":"entity-type-mismatch","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}