phacility/phabricator · error · Exception
You can not mark this comment as complete: you did not…
Error message
You can not mark this comment as complete: you did not author the commit and the comment is not a draft you wrote.
What it means
An authorization sentinel in loadCommentForDone: the 'Done' action is only permitted for the author of the commit or for the comment's author acting on their own draft comment. The viewer matches neither condition, so the request is rejected as an unauthorized state change, not as a missing object.
Solutions
- Ask the commit author to mark the comment as done
- If you authored the comment, publish it (non-draft) before using Done
- Have an administrator act on the comment if policy requires it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:79 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/d611b4fba9dea73e.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:79
->setViewer($viewer)
->withPHIDs(array($inline->getCommitPHID()))
->executeOne();
if (!$commit) {
throw new Exception(pht('Failed to load commit.'));
}
$owner_phid = $commit->getAuthorPHID();
$viewer_phid = $viewer->getPHID();
$viewer_is_owner = ($owner_phid && ($owner_phid == $viewer_phid));
$viewer_is_author = ($viewer_phid == $inline->getAuthorPHID());
$is_draft = $inline->isDraft();
if ($viewer_is_owner) {
// You can mark inlines on your own commits as "Done".
} else if ($viewer_is_author && $is_draft) {
// You can mark your own unsubmitted inlines as "Done".
} else {
throw new Exception(
pht(
'You can not mark this comment as complete: you did not author '.
'the commit and the comment is not a draft you wrote.'));
}
return $inline;
}
protected function canEditInlineComment(
PhabricatorUser $viewer,
PhabricatorAuditInlineComment $inline) {
// Only the author may edit a comment.
if ($inline->getAuthorPHID() != $viewer->getPHID()) {
return false;
}
// Saved comments may not be edited.View on GitHub (pinned to 5720a38cfe)