phacility/phabricator · warning · Exception

You can not accept this commit because you have already…

Error message

You can not accept this commit because you have already accepted it.

What it means

The second guard in Accept's validateAction(): isViewerFullyAccepted() reports the viewer already accepted every audit request they hold on the commit, so accepting again is a no-op that the application rejects rather than recording a duplicate transaction.

Solutions

  1. No action needed - the accept is already recorded; refresh the commit page to confirm
  2. Make automation check current audit state before applying transactions
  3. If re-review is genuinely wanted, the flow must reset: concerns and Request Verification reopen the audit cycle
Defensive patterns

Strategy: validation

Validate before calling

if ($xaction->isViewerFullyAccepted($object, $viewer)) {
  return; // already accepted; skip applying the transaction
}

Prevention

When it happens

Trigger: Clicking Accept Commit twice; retrying an audit action after a UI delay that already applied it; scripts that re-apply accept on every run.

Common situations: Double-clicks and stale browser tabs; idempotency-naive automation; users unsure whether the first click registered.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/46ca96d83fa738ec. Report an issue: GitHub.

Appendix: source

Thrown at src/applications/diffusion/xaction/DiffusionCommitAcceptTransaction.php:53

    $actor = $this->getActor();
    $this->applyAuditorEffect($object, $actor, $value, $status);
  }

  protected function validateAction($object, PhabricatorUser $viewer) {
    $config_key = 'audit.can-author-close-audit';
    if (!PhabricatorEnv::getEnvConfig($config_key)) {
      if ($this->isViewerCommitAuthor($object, $viewer)) {
        throw new Exception(
          pht(
            'You can not accept this commit because you are the commit '.
            'author. You can only accept commits you did not author. You can '.
            'change this behavior by adjusting the "%s" setting in Config.',
            $config_key));
      }
    }

    if ($this->isViewerFullyAccepted($object, $viewer)) {
      throw new Exception(
        pht(
          'You can not accept this commit because you have already '.
          'accepted it.'));
    }
  }

  public function getTitle() {
    return pht(
      '%s accepted this commit.',
      $this->renderAuthor());
  }

  public function getTitleForFeed() {
    return pht(
      '%s accepted %s.',
      $this->renderAuthor(),
      $this->renderObject());
  }

View on GitHub (pinned to 5720a38cfe)