Fix incomplete config schema for guardrails so it can be backported to 1.3.x
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3583851. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
Related to !1474
>>>
<p>[Tracker]<br>
<strong>Update Summary: </strong>[One-line status update for stakeholders]<br>
<strong>Short Description: </strong>Fix incomplete config schema for guardrails so it can be backported to 1.3.x<br>
<strong>Check-in Date: </strong>MM/DD/YYYY<br>
[/Tracker]</p>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The work in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-2"><a href="https://www.drupal.org/project/ai/issues/3582856" title="Status: Fixed">#3582856: Add Input Length Limit guardrail plugin against DoW attacks</a></span> adds schema definitions for the new guardrail configuration, but the underlying problem is broader than the new <code>input_length_limit</code> plugin. The current guardrail config entities already have incomplete schema definitions for <code>guardrail_settings</code>, and the guardrail set schema is also incomplete and inconsistent for fields such as <code>stop_threshold</code> and the guardrail plugin ID mappings.</p>
<p>Because <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-2"><a href="https://www.drupal.org/project/ai/issues/3582856" title="Status: Fixed">#3582856: Add Input Length Limit guardrail plugin against DoW attacks</a></span> is a feature issue targeting <code>1.4.x</code>, keeping the schema fix there makes it harder to move the bug fix to <code>1.3.x</code> as well. Splitting the schema correction into its own bug issue makes the fix clearer, easier to review, and backportable independently of the new guardrail plugin work.</p>
<p>The proposed schema changes are already visible in the related merge request diff: <a href="https://git.drupalcode.org/project/ai/-/merge_requests/1407.diff">https://git.drupalcode.org/project/ai/-/merge_requests/1407.diff</a>.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<ul>
<li>Split the config schema fixes out of <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-2"><a href="https://www.drupal.org/project/ai/issues/3582856" title="Status: Fixed">#3582856: Add Input Length Limit guardrail plugin against DoW attacks</a></span> into a dedicated bug fix issue.</li>
<li>Add schema coverage for <code>guardrail_settings</code> using plugin-specific schema definitions keyed by guardrail plugin ID.</li>
<li>Add the missing labels and schema entries for the current guardrail set configuration, including <code>stop_threshold</code> and the nested pre/post guardrail mappings.</li>
<li>Keep the new <code>input_length_limit</code> feature work in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-2"><a href="https://www.drupal.org/project/ai/issues/3582856" title="Status: Fixed">#3582856: Add Input Length Limit guardrail plugin against DoW attacks</a></span>, but move the generic schema correction into this issue so it can be committed to <code>1.3.x</code> and then merged forward.</li>
<li>Add or keep test coverage that confirms the affected config entities and plugin configuration can be saved without schema gaps.</li>
</ul>
<h3 id="summary-ai-usage">AI usage (if applicable)</h3>
<p>[x] AI Assisted Issue<br>
This issue was generated with AI assistance, but was reviewed and refined by the creator.</p>
<p>[ ] AI Assisted Code<br>
[ ] AI Generated Code<br>
[ ] Vibe Coded</p>
<p>- <strong>This issue was created with the help of AI</strong></p>
issue