Clarify that Patrol alert severity controls immediate investigations (#4239)

Name the existing selector Investigate immediately so Critical only does
not contradict the retained ten-minute warning exception. Preserve
selectable values, saved settings, helper visibility and all surrounding
controls. Keep its contract description and rendered behavior tests in
sync.

Contract-Neutral: Clarify existing immediate-trigger copy only; no
trigger policy, saved value, capability, API, layout or
information-visibility change.

---
Fleet candidate `20261110T150018Z-web-product` from the `web-product`
lane. Reviewed tip `16121b2aa351558b286aa8f0e9bc0d169e5853f4` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
This commit is contained in:
pulse-triage[bot]
2026-11-10 16:18:39 +00:00
committed by GitHub
4 changed files with 69 additions and 14 deletions

View File

@@ -1474,7 +1474,7 @@ has no trigger controls. Outside setup-only states it may show a one-line
triggers, busy mode, alert or anomaly triggers off) and links to that settings
page, unless a provider setup block puts a `Fix setup` action in place of the
link. In the settings page's Triggers section, a
minimum-severity selector ("Investigate alerts at or above": Critical only /
immediate-alert severity selector ("Investigate immediately": Critical only /
Warning and critical) sits under the `Alert-triggered Patrols` toggle and
renders only while that toggle is on. The selector and the trigger toggles
edit the settings form only, and nothing is written until `Save Patrol

View File

@@ -0,0 +1,49 @@
{
"version": 1,
"base_sha": "4b7efba7f7e88f2a50da242fe5cd374f2418a7df",
"verified_at": "2026-11-10T15:11:39Z",
"result": "passed",
"changed_paths": [
"frontend-modern/src/components/Settings/AISettings.tsx"
],
"content_sha256": {
"frontend-modern/src/components/Settings/AISettings.tsx": "f0d45a3cab70370230af81f6803ba72586475c15516a06b88a8cbdbc01e50362"
},
"routes": [
"/settings/pulse-intelligence/patrol"
],
"viewports": [
{
"width": 1440,
"height": 1000
},
{
"width": 390,
"height": 844
}
],
"states": [
"Critical only: Investigate immediately names the setting; the unchanged accessible help describes warnings active for10 minutes, at most4/hour, in Ask first and Autopilot. Both themes, desktop and phone.",
"Warning and critical: unchanged options/values, no delayed-warning help.",
"Alert triggers off hides selector/help; turning on restores the unsaved choice.",
"Watch-only install retains selector, hides delayed-warning help; no claim that it investigates.",
"Comparable before/after page-top and focused trigger states retain all control positions and surrounding information.32 captures/16 pairs inspected."
],
"interactions": [
"Changed severity using native selector and ArrowUp; verified help and aria-describedby track choice. No implicit settings write.",
"Toggled alert triggers off/on, preserving local severity.",
"Saved warning using actual AI settings form and HTTP client; exact PUT settings payload, organization and CSRF asserted against fixture. Reloaded saved response and verified warning.",
"Changed locally to critical then Reset; saved warning survives with no additional write.",
"Saved critical; exact second PUT, original saved settings restored, reloaded critical/help. Browser and preview closed."
],
"browser": {
"name": "Chromium",
"version": "141.0.7390.37",
"playwright": "1.56.1"
},
"limitations": [
"Actual application with offline synthetic API/provider responses; no live server authorization, model execution or original-client recovery claimed.",
"Browser preview uses exact edited runtime bytes; full committed-source tests and production build are separate proof.",
"Native screen reader and physical mobile keyboard not exercised."
]
}

View File

@@ -231,7 +231,7 @@ const PatrolSettingsContent: Component<{ state: ReturnType<typeof useAISettingsS
<Show when={props.state.form.patrolAlertTriggers}>
<FormSelect
id="ai-patrol-alert-min-severity"
label="Investigate alerts at or above"
label="Investigate immediately"
value={props.state.form.patrolAlertTriggerMinSeverity}
onChange={(event) =>
props.state.setForm(

View File

@@ -255,7 +255,7 @@ describe('AISettings model loading error states', () => {
expect(screen.getByLabelText('Enable alert-triggered Patrols')).toBeInTheDocument();
expect(screen.getByLabelText('Enable anomaly-triggered Patrols')).toBeInTheDocument();
expect(screen.getByLabelText('Enable container update risk analysis')).toBeInTheDocument();
expect(screen.getByLabelText('Investigate alerts at or above')).toHaveValue('warning');
expect(screen.getByLabelText('Investigate immediately')).toHaveValue('warning');
expect(screen.getByText('Model readiness')).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Open Patrol/i })).toBeInTheDocument();
expect(screen.getByRole('button', { name: /Save Patrol settings/i })).toBeInTheDocument();
@@ -432,7 +432,7 @@ describe('AISettings model loading error states', () => {
renderComponent('patrol');
await screen.findByLabelText('Enable alert-triggered Patrols');
fireEvent.change(screen.getByLabelText('Investigate alerts at or above'), {
fireEvent.change(screen.getByLabelText('Investigate immediately'), {
target: { value: 'warning' },
});
fireEvent.click(screen.getByLabelText('Enable alert-triggered Patrols'));
@@ -478,16 +478,16 @@ describe('AISettings model loading error states', () => {
});
const alertToggle = screen.getByLabelText('Enable alert-triggered Patrols');
expect(alertToggle).toHaveAttribute('aria-pressed', 'false');
expect(screen.queryByLabelText('Investigate alerts at or above')).toBeNull();
expect(screen.queryByLabelText('Investigate immediately')).toBeNull();
fireEvent.click(alertToggle);
fireEvent.change(screen.getByLabelText('Investigate alerts at or above'), {
fireEvent.change(screen.getByLabelText('Investigate immediately'), {
target: { value: 'warning' },
});
fireEvent.click(alertToggle);
expect(screen.queryByLabelText('Investigate alerts at or above')).toBeNull();
expect(screen.queryByLabelText('Investigate immediately')).toBeNull();
fireEvent.click(alertToggle);
expect(screen.getByLabelText('Investigate alerts at or above')).toHaveValue('warning');
expect(screen.getByLabelText('Investigate immediately')).toHaveValue('warning');
await new Promise((resolve) => setTimeout(resolve, 0));
expect(updateSettingsMock).not.toHaveBeenCalled();
@@ -515,13 +515,19 @@ describe('AISettings model loading error states', () => {
patrol_alert_trigger_min_severity: minSeverity,
});
it('tells a Critical only install that lasting warnings are still looked at', async () => {
it('distinguishes immediate critical investigations from the delayed warning exception', async () => {
getSettingsMock.mockResolvedValue(alertTriggerSettings('critical'));
renderComponent('patrol');
const selector = await screen.findByLabelText('Investigate alerts at or above');
const selector = await screen.findByLabelText('Investigate immediately');
await waitFor(() => expect(selector).toHaveValue('critical'));
expect(within(selector).getByRole('option', { name: 'Critical only' })).toHaveValue(
'critical',
);
expect(within(selector).getByRole('option', { name: 'Warning and critical' })).toHaveValue(
'warning',
);
expect(selector).toHaveAccessibleDescription(
'In Ask first and Autopilot, Patrol also looks at warnings that stay active for 10 minutes, at most 4 an hour.',
);
@@ -539,7 +545,7 @@ describe('AISettings model loading error states', () => {
renderComponent('patrol');
const selector = await screen.findByLabelText('Investigate alerts at or above');
const selector = await screen.findByLabelText('Investigate immediately');
await waitFor(() => expect(selector).toHaveValue('warning'));
expect(screen.queryByText(sustainedAlertHelp)).toBeNull();
});
@@ -550,7 +556,7 @@ describe('AISettings model loading error states', () => {
renderComponent('patrol');
const selector = await screen.findByLabelText('Investigate alerts at or above');
const selector = await screen.findByLabelText('Investigate immediately');
await waitFor(() => expect(selector).toHaveValue('critical'));
expect(screen.getByText(/This install runs Watch only/i)).toBeInTheDocument();
expect(screen.queryByText(sustainedAlertHelp)).toBeNull();
@@ -583,7 +589,7 @@ describe('AISettings model loading error states', () => {
await waitFor(() => {
expect(screen.getByLabelText('Schedule')).toHaveValue('180');
});
fireEvent.change(screen.getByLabelText('Investigate alerts at or above'), {
fireEvent.change(screen.getByLabelText('Investigate immediately'), {
target: { value: 'warning' },
});
fireEvent.click(screen.getByRole('button', { name: /Save Patrol settings/i }));
@@ -594,7 +600,7 @@ describe('AISettings model loading error states', () => {
);
});
expect(notificationSuccessMock).not.toHaveBeenCalled();
expect(screen.getByLabelText('Investigate alerts at or above')).toHaveValue('warning');
expect(screen.getByLabelText('Investigate immediately')).toHaveValue('warning');
fireEvent.click(screen.getByRole('button', { name: /Save Patrol settings/i }));