Let code suggest a profile, not only a grade

Problem/motivation

An integration can suggest a grade with suggest() or apply a profile with applyProfile(). It cannot suggest a profile. A profile carries the scope answers, such as the deep fake question, so a module that wants an editor to confirm a profile has no way to ask. AI Automators needs this for generated images, audio and video, see ai#3586827 (closed).

Proposed resolution

  • A new interface with suggestProfile($entity, $profile_id, $source, $note = NULL), implemented by the recorder service. It follows the rules of suggest(): no downgrade, one pending suggestion per source.
  • Accepting the suggestion applies the profile the way applyProfile() does.
  • DisclosureRecorderInterface does not change, so existing implementations keep working.

API changes

New DisclosureProfileSuggesterInterface. Callers check for it with instanceof.

Data model changes

The suggestion table gets a nullable profile column, added by an update hook. Existing rows keep a NULL profile and behave as today.

AI Compliance

🤖 Generated with the help of an LLM, reviewed and approved by me before posting.