Repository fails to update

We’ve had a bug for a long while (at least a year), but was just hoping a new version would fix it. No such luck, so here goes.

We have repository set up in Diffusion, hosted at Github. For a long while, the repository shows out-of-date information in Diffusion, and Differantial revisions are not always automatically closed. It seems the repository has become “stuck” in some state with a commit missing, and I can’t “unstuck” it. Is there no way to completely re-import the repository? Deleting it is out of the question, since that seems to delete associated revisions (of which we have 10K+).

On the repository management page in Phabricator, this “raw error” is displayed: Error updating working copy: Commit “c62be7c7e946414b5cd9c737ce09afb0c5ba5d48” has not been discovered yet! Run discovery before updating refs.

If I do as requested and try do discover the repository first, that by itself looks to succeed:

$ ./bin/repository discover rMM
Discovering "rMM"...

But this does not help:

$ ./bin/repository update rMM
[2020-06-16 18:58:46] EXCEPTION: (Exception) Commit "c62be7c7e946414b5cd9c737ce09afb0c5ba5d48" has not been discovered yet! Run discovery before updating refs. at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php:562]
arcanist(head=master, ref.master=091aebe0149a), phabricator(head=master, ref.master=36075f6ce525)
  #0 PhabricatorRepositoryRefEngine::setCloseFlagOnCommits(array) called at [<phabricator>/src/applications/repository/engine/PhabricatorRepositoryRefEngine.php:100]
  #1 PhabricatorRepositoryRefEngine::updateRefs() called at [<phabricator>/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php:141]
  #2 PhabricatorRepositoryManagementUpdateWorkflow::updateRepositoryRefs(PhabricatorRepository) called at [<phabricator>/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php:78]
  #3 PhabricatorRepositoryManagementUpdateWorkflow::execute(PhutilArgumentParser) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:492]
  #4 PhutilArgumentParser::parseWorkflowsFull(array) called at [<arcanist>/src/parser/argument/PhutilArgumentParser.php:377]
  #5 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/repository/manage_repositories.php:22]

Phabricator/Arcanist Version

phabricator: 36075f6ce525 (Sat, May 30)
arc: 091aebe0149a (Tue, Jun 9)