moderation_state field silently missing after installing ai_context via recipe or config sync
<!-- Please search existing work items before filing to avoid duplicates. -->
## Summary
When `ai_context` is enabled through a config sync or a recipe that doesn't explicitly import the module's own config, `ai_context_item` silently never becomes a moderated entity type: the module-owned `ai_context_editorial` workflow is never created, and `ai_context_item` never gains the `moderation_state` field. No error or warning is produced in either case.
This is a gap left over from #3581501 ("ai_context_install breaks existing config site installs (and probably recipes)"), whose own title flagged the recipe risk but whose fix (`if ($is_syncing) { return; }` in `ai_context_install()`) never addressed it.
## Steps to reproduce
1. Create a minimal recipe that only lists `ai_context` under `install`, with no `config` section, e.g.:
```yaml
name: 'Install AI Context'
type: 'Site'
install:
- ai_context
```
2. Apply it: `ddev drush recipe /path/to/that/recipe`
3. Check whether the workflow exists and the field is present:
```
ddev drush php:eval "var_dump(\Drupal\workflows\Entity\Workflow::load('ai_context_editorial'));"
ddev drush php:eval "var_dump(\Drupal::entityTypeManager()->getFieldStorageDefinitions('ai_context_item')['moderation_state'] ?? NULL);"
```
The same gap is also reachable via a real config sync: on a site that does not yet have `ai_context` enabled, hand-edit the sync directory's `core.extension.yml` to add `ai_context` (and its dependencies) to the module list, without also including a full, working export of `ai_context`'s own config, then run `drush config:import`.
## Expected result
After either install path, `ai_context_item` is a moderated entity type: the `ai_context_editorial` workflow exists with `ai_context_item` in its `type_settings.entity_types`, and the entity has the computed `moderation_state` field, matching what a normal (non-syncing) `drush pm:enable ai_context` produces.
## Actual result
Neither the workflow nor the `moderation_state` field exists after either install path. Nothing is logged, so the gap is invisible until a site builder notices moderation UI is missing for context items.
Root cause: `ai_context_install(bool $is_syncing)` unconditionally returns early (skipping `_ai_context_add_to_workflow()`) whenever `$is_syncing` is `TRUE` — true for both a config sync and a recipe install. For a recipe that doesn't explicitly import `ai_context`'s config, and for a bare config sync that only adds the module name to `core.extension`, nothing else ever supplies the workflow.
Note for whoever fixes this: self-healing this from inside `hook_install()` while `$is_syncing` is `TRUE` doesn't work for a real config sync — `ConfigImporter` reconciles active storage against its source after processing extensions, so anything created inside `hook_install()` that isn't part of the sync source gets deleted again before `import()` returns. A fix needs to run after the install/import/recipe-apply operation has fully finished (e.g. a `ConfigEvents::IMPORT` subscriber for config sync, and a `RecipeAppliedEvent` subscriber for recipes) rather than inside the hook itself.
## Environment
- Drupal version: 11.4-dev
- Module version: 1.0.x-dev
- PHP version: 8.3
- Provider: N/A (not provider-specific)
- Last known working version: N/A — a normal, non-syncing `drush pm:enable ai_context` has always worked correctly; only the syncing install paths are affected.
### Screenshots / recordings *(optional)*
<!-- Attach a screenshot or screen recording. Drag and drop files directly into this text area. -->
### Error messages or logs *(optional)*
None. No error, warning, or log entry is produced — the workflow and field are simply absent afterward.
<!-- If this issue description was significantly AI-generated (entire sections, not autocomplete), please note it in a comment below. See https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquette/policy-on-the-use-of-ai-when-contributing-to-drupal -->
> [!note]
> Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.
>
> * [x] AI **Assisted Issue** \
> _Mainly written by a human; AI used for partial generation under full human supervision._
>
> * [x] AI **Generated Issue** \
> _Mainly generated by AI, reviewed and approved by a human before this issue was created._
<!-- If you discover this is a duplicate of an existing issue, use: /duplicate #<issue> -->
issue
GitLab AI Context
Project: project/ai_context
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/ai_context/-/raw/1.0.x/CONTRIBUTING.md — contribution guidelines
- https://git.drupalcode.org/project/ai_context/-/raw/1.0.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/ai_context
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD