mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
Clarify Patrol mode boundaries
This commit is contained in:
@@ -95,23 +95,25 @@ describe('PatrolIntelligenceHeader', () => {
|
||||
expect(PATROL_AUTONOMY_POLICY_PRESENTATION).toEqual({
|
||||
monitor: {
|
||||
label: 'Watch only',
|
||||
detail: 'Patrol checks and reports issues without making changes.',
|
||||
detail: 'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
compactLabel: 'Watch only',
|
||||
},
|
||||
approval: {
|
||||
label: 'Ask first',
|
||||
detail: 'Patrol investigates issues and prepares fixes. You approve every change.',
|
||||
detail:
|
||||
'Patrol investigates and prepares fixes, but every change waits for your approval.',
|
||||
compactLabel: 'Ask first',
|
||||
},
|
||||
assisted: {
|
||||
label: 'Safe auto-fix',
|
||||
detail: 'Patrol fixes safe policy-allowed issues. It asks before anything riskier.',
|
||||
detail:
|
||||
'Patrol can run low- or medium-risk fixes allowed by policy; higher-risk work still asks first.',
|
||||
compactLabel: 'Safe auto-fix',
|
||||
},
|
||||
full: {
|
||||
label: 'Autopilot',
|
||||
detail:
|
||||
'Patrol handles policy-approved issues automatically. It asks only when policy requires approval.',
|
||||
'Patrol can act automatically within policy and still asks when approval is required.',
|
||||
compactLabel: 'Autopilot',
|
||||
},
|
||||
});
|
||||
@@ -144,6 +146,9 @@ describe('PatrolIntelligenceHeader', () => {
|
||||
expect(headerSource).not.toContain('How much can Patrol do?');
|
||||
expect(headerSource).not.toContain("level === 'full' ? 'assisted'");
|
||||
expect(headerSource).not.toContain('Autonomous critical remediation');
|
||||
expect(headerSource).not.toContain('Ask before changes');
|
||||
expect(headerSource).not.toContain('Auto-fix safe issues');
|
||||
expect(headerSource).not.toContain('Policy autopilot');
|
||||
});
|
||||
|
||||
it('keeps Patrol mode inline and routes configuration to settings', () => {
|
||||
|
||||
@@ -19,23 +19,25 @@ describe('patrolControlPresentation', () => {
|
||||
expect(PATROL_AUTONOMY_POLICY_PRESENTATION).toEqual({
|
||||
monitor: {
|
||||
label: 'Watch only',
|
||||
detail: 'Patrol checks and reports issues without making changes.',
|
||||
detail: 'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
compactLabel: 'Watch only',
|
||||
},
|
||||
approval: {
|
||||
label: 'Ask first',
|
||||
detail: 'Patrol investigates issues and prepares fixes. You approve every change.',
|
||||
detail:
|
||||
'Patrol investigates and prepares fixes, but every change waits for your approval.',
|
||||
compactLabel: 'Ask first',
|
||||
},
|
||||
assisted: {
|
||||
label: 'Safe auto-fix',
|
||||
detail: 'Patrol fixes safe policy-allowed issues. It asks before anything riskier.',
|
||||
detail:
|
||||
'Patrol can run low- or medium-risk fixes allowed by policy; higher-risk work still asks first.',
|
||||
compactLabel: 'Safe auto-fix',
|
||||
},
|
||||
full: {
|
||||
label: 'Autopilot',
|
||||
detail:
|
||||
'Patrol handles policy-approved issues automatically. It asks only when policy requires approval.',
|
||||
'Patrol can act automatically within policy and still asks when approval is required.',
|
||||
compactLabel: 'Autopilot',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,23 +14,23 @@ export const PATROL_AUTONOMY_POLICY_PRESENTATION: Record<
|
||||
> = {
|
||||
monitor: {
|
||||
label: 'Watch only',
|
||||
detail: 'Patrol checks and reports issues without making changes.',
|
||||
detail: 'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
compactLabel: 'Watch only',
|
||||
},
|
||||
approval: {
|
||||
label: 'Ask first',
|
||||
detail: 'Patrol investigates issues and prepares fixes. You approve every change.',
|
||||
detail: 'Patrol investigates and prepares fixes, but every change waits for your approval.',
|
||||
compactLabel: 'Ask first',
|
||||
},
|
||||
assisted: {
|
||||
label: 'Safe auto-fix',
|
||||
detail: 'Patrol fixes safe policy-allowed issues. It asks before anything riskier.',
|
||||
detail:
|
||||
'Patrol can run low- or medium-risk fixes allowed by policy; higher-risk work still asks first.',
|
||||
compactLabel: 'Safe auto-fix',
|
||||
},
|
||||
full: {
|
||||
label: 'Autopilot',
|
||||
detail:
|
||||
'Patrol handles policy-approved issues automatically. It asks only when policy requires approval.',
|
||||
detail: 'Patrol can act automatically within policy and still asks when approval is required.',
|
||||
compactLabel: 'Autopilot',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -650,7 +650,9 @@ describe('AIIntelligence entitlement gating', () => {
|
||||
expect(patrolControl.getByText('Patrol mode')).toBeInTheDocument();
|
||||
expect(patrolControl.getAllByText('Watch only').length).toBeGreaterThan(0);
|
||||
expect(
|
||||
patrolControl.getByText('Patrol checks and reports issues without making changes.'),
|
||||
patrolControl.getByText(
|
||||
'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
expect(patrolControl.queryByRole('button', { name: 'Limits' })).not.toBeInTheDocument();
|
||||
expect(patrolControl.queryByRole('button', { name: 'Ask first' })).toBeNull();
|
||||
@@ -1198,7 +1200,9 @@ describe('AIIntelligence entitlement gating', () => {
|
||||
expect(screen.getByRole('button', { name: 'Safe auto-fix' })).not.toBeDisabled();
|
||||
expect(screen.getByRole('button', { name: 'Autopilot' })).not.toBeDisabled();
|
||||
expect(
|
||||
screen.getByText('Patrol checks and reports issues without making changes.'),
|
||||
screen.getByText(
|
||||
'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.queryByText('Patrol handles')).not.toBeInTheDocument();
|
||||
expect(screen.queryByRole('button', { name: 'Limits' })).not.toBeInTheDocument();
|
||||
@@ -1209,7 +1213,7 @@ describe('AIIntelligence entitlement gating', () => {
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
screen.getByText(
|
||||
'Patrol handles policy-approved issues automatically. It asks only when policy requires approval.',
|
||||
'Patrol can act automatically within policy and still asks when approval is required.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
@@ -1880,7 +1884,9 @@ describe('AIIntelligence entitlement gating', () => {
|
||||
expect(patrolControl.getByText('Patrol mode')).toBeInTheDocument();
|
||||
expect(patrolControl.getAllByText('Watch only').length).toBeGreaterThan(0);
|
||||
expect(
|
||||
patrolControl.getByText('Patrol checks and reports issues without making changes.'),
|
||||
patrolControl.getByText(
|
||||
'Patrol checks infrastructure and reports issues only; it does not start fixes.',
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
expect(patrolControl.getByRole('button', { name: 'Ask first' })).not.toBeDisabled();
|
||||
expect(patrolControl.getByRole('button', { name: 'Safe auto-fix' })).not.toBeDisabled();
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('patrolPagePresentation', () => {
|
||||
'Patrol checks your infrastructure and shows current issues.',
|
||||
);
|
||||
expect(PATROL_PAGE_MONITOR_DESCRIPTION).toBe(
|
||||
'Watch only: Patrol checks and reports issues without making changes.',
|
||||
'Watch only: Patrol checks infrastructure and reports issues only.',
|
||||
);
|
||||
expect(getPatrolPageHeaderMeta({ autonomyLocked: true })).toEqual({
|
||||
title: 'Patrol',
|
||||
@@ -48,14 +48,16 @@ describe('patrolPagePresentation', () => {
|
||||
|
||||
it('describes each governed Patrol mode level by what it can actually do', () => {
|
||||
expect(getPatrolPageHeaderMeta({ autonomyLevel: 'approval' })).toMatchObject({
|
||||
description: 'Patrol investigates issues and asks before every change.',
|
||||
description:
|
||||
'Ask first: Patrol investigates and prepares fixes, but every change waits for approval.',
|
||||
});
|
||||
expect(getPatrolPageHeaderMeta({ autonomyLevel: 'assisted' })).toMatchObject({
|
||||
description: 'Patrol handles safe policy-allowed fixes and asks before anything riskier.',
|
||||
description:
|
||||
'Safe auto-fix: Patrol may run low- or medium-risk fixes allowed by policy.',
|
||||
});
|
||||
expect(getPatrolPageHeaderMeta({ autonomyLevel: 'full' })).toMatchObject({
|
||||
description:
|
||||
'Patrol handles policy-approved work automatically and asks only when approval is required.',
|
||||
'Autopilot: Patrol may act automatically within policy and still asks when approval is required.',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ export const PATROL_PAGE_WATCH_ONLY_DESCRIPTION =
|
||||
'Patrol checks your infrastructure and shows current issues.';
|
||||
|
||||
export const PATROL_PAGE_MONITOR_DESCRIPTION =
|
||||
'Watch only: Patrol checks and reports issues without making changes.';
|
||||
'Watch only: Patrol checks infrastructure and reports issues only.';
|
||||
|
||||
export const PATROL_PAGE_DESCRIPTION =
|
||||
'Patrol checks your infrastructure, explains what it found, follows your mode before acting, and records the result.';
|
||||
@@ -25,11 +25,11 @@ function getPatrolPageDescription(input: PatrolPageHeaderMetaInput): string {
|
||||
|
||||
switch (input.autonomyLevel) {
|
||||
case 'approval':
|
||||
return 'Patrol investigates issues and asks before every change.';
|
||||
return 'Ask first: Patrol investigates and prepares fixes, but every change waits for approval.';
|
||||
case 'assisted':
|
||||
return 'Patrol handles safe policy-allowed fixes and asks before anything riskier.';
|
||||
return 'Safe auto-fix: Patrol may run low- or medium-risk fixes allowed by policy.';
|
||||
case 'full':
|
||||
return 'Patrol handles policy-approved work automatically and asks only when approval is required.';
|
||||
return 'Autopilot: Patrol may act automatically within policy and still asks when approval is required.';
|
||||
default:
|
||||
return PATROL_PAGE_DESCRIPTION;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user