Phabricator maniphest.edit lack validation for adding project

Reproduction Instructions
Create a task

  1. Edit task via maniphest.edit, add transation which add project (projects.add) but instead of adding PHID-PROJ - add user PHID, such transation will be successfully applied.
  2. Try opening task, eg.: https://secure.phabricator.com/T13427

Phabricator/Arcanist Version
Reproducible on secure.phabricator.org, see: https://secure.phabricator.com/T13427

Expectations
Either fail during save or ignore bad edges

This is sort of a general problem with TYPE_EDGE transactions not having convenient hooks for a lot of transaction behaviors. https://secure.phabricator.com/T4968 is somewhat related. I’d like to solve this in a general way rather than splicing in validation narrowly for this particular edge type.

In the meantime, I’ll add validation on the read/rendering pathway to work around these unvalidated writes. This is generally desirable anyway.

I brought this upstream as https://secure.phabricator.com/T13429.

Thank you for fast response