Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Clarify legacy Assistant protection limits and contain mode menu
pulse-triage[bot]6488742416d9
diff --git a/docs/AI.md b/docs/AI.mdindex 4899253228..084b114eac 100644--- a/docs/AI.md+++ b/docs/AI.md@@ -487,6 +487,10 @@ Older saved `autonomous` preferences display as **Ask first**, not as permissionto execute without approval. The stored preference and its existing entitlementchecks are preserved for older clients.+**Protected guests (legacy)** retains older VMIDs or names. This list does not+exclude saved action plans. Review each plan’s target and approval policy in+**Actions** instead of treating this list as an execution safeguard.+### Reviewing an Assistant action plan1. Assistant submits a typed action for a resource advertising that capability.diff --git a/docs/AI_AUTONOMY.md b/docs/AI_AUTONOMY.mdindex 075bbc2d69..e090c6931e 100644--- a/docs/AI_AUTONOMY.md+++ b/docs/AI_AUTONOMY.md@@ -109,6 +109,10 @@ entitlement checks for older clients. It does not bypass approval. An unrelatedsettings save does not rewrite that preference. Unknown values fail closed toread-only. Patrol mode and Autopilot acknowledgements remain separate.+**Protected guests (legacy)** retains older VMIDs or names. This list does not+exclude saved action plans. Review each plan’s target and approval policy in+**Actions** instead of treating this list as an execution safeguard.+### Configuration**UI:** Settings → Pulse Intelligence → Assistant → Chat action modediff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 00492ee4a0..6a8d9af826 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -25,7 +25,9 @@ then checks explicit read-only opt-out and later opt-in remain possible.AI settings responses project legacy Assistant levels to planning for review;this grants no agent command, enrolment, identity or transport authority.-Protected guests and authenticated execute authority still govern typed plans.+The retained legacy Protected guests list does not exclude canonical saved+plans. Authenticated execute authority and the action approval policy remain+separate from that configuration list.Existing agent report/command and shared capability vocabularies remainunchanged, including their separate approval and entitlement enforcement.diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex 065b256ae6..06e0b64c23 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -31,6 +31,16 @@ legacy command-approval selection. `TestAssistantProjectedModeEchoPreservesLegacuses actual encrypted GET/PUT persistence with and without the entitlement,then checks explicit read-only opt-out and later opt-in remain possible.+### Legacy protection copy is not a canonical-plan guarantee++The retained Protected guests list is older configuration, not a filter of+canonical saved resource plans. Settings and both existing help pages must+state that limitation and direct the operator to Actions target/approval review.+The value is preserved on unrelated saves. Mounted component, accessible+description and mirrored-help checks prevent a false exclusion promise.+`TestService_isAutonomousModeEnabled` also covers every current saved level,+explicit core-owned investigation enable/disable and unchanged stored values.+### Interactive Assistant modes reflect action planningInteractive Assistant offers Read-only and Ask first (`controlled`).@@ -39,7 +49,7 @@ for interactive responses/tool availability. Saved bytes, shared capabilityvocabulary, entitlement checks and legacy `IsAutonomous` approval-admissionremain intact; removing that legacy check would relax command approval.Chat's control tool saves typed plans to Actions without execution. Scoped-handoff flags, execute authority, policy, protected guests and action lifecycle+handoff flags, execute authority, policy and action lifecyclereview/run/verification remain necessary; Patrol mode/Autopilot is separate.Unrelated Settings saves compare normalised values and preserve saved legacypreferences. Runtime, real encrypted-settings roundtrip/API, mounted componentdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex f0b562088d..0cb63b015e 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -20,6 +20,11 @@## Purpose+The retained `protected_guests` settings field is legacy compatibility data,+not an exclusion filter for canonical saved action plans. Existing Assistant+help now states that limitation and requires target/approval review in Actions.+No field value, GET/PUT shape, scope or approval authority changes.+A legacy client echoing the projected `controlled` mode into an unrelated AIsettings PUT must retain a stored `autonomous` preference and its existinglegacy command-approval selection. `TestAssistantProjectedModeEchoPreservesLegacyPolicy`diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex f753dc894f..351562de65 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -30,6 +30,12 @@ The two-option Chat menu keeps radio semantics, keyboard cycling/Escape/focusand saved-error recovery. Copy explains infrastructure plans in Actions andseparate Patrol authority; it does not grant approval or execution. Existingscoped resource/alert/Patrol briefings and compact layouts remain intact.+The retained Protected guests (legacy) field has an accessible description+explicitly stating that it does not exclude saved action plans. Its saved list+is not erased or presented as an execution safeguard. The Chat control menu+clamps to the composer and viewport on open and closes on viewport resize,+so a wrapped toolbar does not clip either option. Mounted geometry checks+and real 390px/320px browser bounds cover this observed gap.### Shared alert breach-date presentationdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex b44f941508..34d4e0d1c7 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -32,8 +32,9 @@ then checks explicit read-only opt-out and later opt-in remain possible.The AI settings control projection describes read/query or plans for review inActions. It does not authorise a backup, restore, replay or data change; actionapproval/run and independent verification remain separate. Stored legacy-preferences, recovery-point access, protected guests and Patrol policy are-preserved. The handler change adds no recovery endpoint or execution route.+preferences, recovery-point access, the legacy protected-guests value and+Patrol policy are preserved. The latter guest list is not a canonical saved-+plan exclusion or a recovery execution safeguard. The handler change adds no recovery endpoint or execution route.### Retained guest identity cannot renew QGA eligibilitydiff --git a/frontend-modern/browser-tests/assistant-control-compatibility.cjs b/frontend-modern/browser-tests/assistant-control-compatibility.cjsindex e50cc1f108..a81a933f8e 100644--- a/frontend-modern/browser-tests/assistant-control-compatibility.cjs+++ b/frontend-modern/browser-tests/assistant-control-compatibility.cjs@@ -16,14 +16,15 @@ const hash = (f) => crypto.createHash('sha256').update(fs.readFileSync(f)).digesconst { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));const server = await createServer({ root, configFile: path.join(root, 'vite.config.ts'), cacheDir: path.join(output, 'vite-cache'), server: { host: '127.0.0.1', port: 5308, strictPort: true, watch: null } });const origin = 'http://127.0.0.1:5308';- const results = [], screenshots = [];+ const results = [], screenshots = [], browserVersions = [];let browser, phase = 'server', browserClosed = false, serverClosed = false;- const result = () => ({ result: 'passed', base_sha: binding.base_sha, content_sha256: binding.content_sha256, playwrightVersion: version, results, screenshots, browserClosed, serverClosed, scope: 'Actual Settings state/save, Chat menus/scoped context and Docs with synthetic local API transport. No model/action/native persistence or deployed/released acceptance.' });+ const result = () => ({ result: 'passed', base_sha: binding.base_sha, content_sha256: binding.content_sha256, playwrightVersion: version, browserVersions, results, screenshots, browserClosed, serverClosed, scope: 'Actual Settings state/save, Chat menus/scoped context and Docs with synthetic local API transport. No model/action/native persistence or deployed/released acceptance.' });try {await server.listen();for (const [name, engine, width, height, dark] of [ ['desktop-light', chromium, 1365, 900, false], ['phone-dark', webkit, 390, 844, true], ['narrow-light', webkit, 320, 740, false] ]) {browserClosed = false;browser = await engine.launch(engine === chromium ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] } : { headless: true });+ browserVersions.push({ name, engine: engine === chromium ? 'chromium' : 'webkit', version: browser.version() });const page = await browser.newPage({ viewport: { width, height }, isMobile: width < 500, hasTouch: width < 500, locale: 'en-GB' });page.setDefaultTimeout(8000); page.setDefaultNavigationTimeout(60000);const errors = [], offOrigin = [], writes = [], checks = [], reads = [];@@ -66,7 +67,7 @@ const hash = (f) => crypto.createHash('sha256').update(fs.readFileSync(f)).digesassert.equal(await select.locator('option').count(), 2);const text = await page.locator('main').innerText();assert.ok(!text.includes('chat-only') && !text.includes('Infrastructure changes stay with Patrol'));- if (expected === 'controlled') { assert.ok(text.includes('Chat does not execute the plan')); assert.equal(await page.getByLabel('Protected guests').inputValue(), 'vm-101'); }+ if (expected === 'controlled') { assert.ok(text.includes('Chat does not execute the plan')); const legacy = page.getByLabel('Protected guests (legacy)', { exact: true }); assert.equal(await legacy.inputValue(), 'vm-101'); assert.equal(await legacy.getAttribute('aria-describedby'), 'ai-protected-guests-help'); assert.ok(text.includes('This list does not exclude saved action plans.')); assert.ok(text.includes('Review each plan’s target and approval policy in Actions.')); }else assert.ok(text.includes('Assistant can query and explain only. It cannot plan infrastructure actions.'));assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));});@@ -91,10 +92,23 @@ const hash = (f) => crypto.createHash('sha256').update(fs.readFileSync(f)).digesassert.equal(await ask.getAttribute('aria-checked'), 'true');await page.keyboard.press('Home'); assert.ok(await modes.first().evaluate((el) => el === document.activeElement));await page.keyboard.press('ArrowUp'); assert.ok(await ask.evaluate((el) => el === document.activeElement));+ const bounds = await page.getByRole('menu').boundingBox();+ const composer = await page.locator('[data-assistant-composer]').boundingBox();+ assert.ok(bounds.x >= composer.x - 1 && bounds.x + bounds.width <= composer.x + composer.width + 1);+ assert.ok(bounds.x >= 0 && bounds.x + bounds.width <= width + 1);await capture('chat-menu');await page.keyboard.press('Escape'); await page.waitForFunction(() => document.activeElement?.getAttribute('aria-label') === 'Assistant chat action mode: Ask first');assert.equal(await page.getByRole('menu').count(), 0);});+ await check('Viewport resize closes the menu and reopened bounds fit', async () => {+ await trigger.click();+ await page.setViewportSize({ width: width + 1, height });+ await page.getByRole('menu').waitFor({ state: 'hidden' });+ await page.setViewportSize({ width, height }); await trigger.click();+ const bounds = await page.getByRole('menu').boundingBox();+ assert.ok(bounds.x >= 0 && bounds.x + bounds.width <= width + 1);+ await page.keyboard.press('Escape');+ });await check('Scoped alert attachment keeps identity and approval boundary', async () => {await page.evaluate(() => window.__assistantProof.scoped());await page.getByText('Approval required before any action.', { exact: true }).waitFor();@@ -122,7 +136,7 @@ const hash = (f) => crypto.createHash('sha256').update(fs.readFileSync(f)).digesawait page.getByRole('link', { name: link, exact: true }).click();const h = page.getByRole('heading', { name: heading, exact: true }); await h.waitFor(); await h.scrollIntoViewIfNeeded();const text = await page.locator('article').innerText(); assert.ok(text.includes('Assistant chat does not execute'));- assert.ok(text.includes('stored') && text.includes('entitlement') && text.includes('independent verification'));+ assert.ok(text.includes('stored') && text.includes('entitlement') && text.includes('independent verification') && text.includes('Protected guests (legacy)') && text.includes('does not exclude saved action plans'));assert.ok(!text.includes('executes actions without prompting') && !text.includes('executes commands without prompting'));assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));await capture(state);diff --git a/frontend-modern/browser-verification/c5f3ee2ce68acf0e.json b/frontend-modern/browser-verification/c5f3ee2ce68acf0e.jsonnew file mode 100644index 0000000000..94da24268c--- /dev/null+++ b/frontend-modern/browser-verification/c5f3ee2ce68acf0e.json@@ -0,0 +1,47 @@+{+ "version": 1,+ "base_sha": "5572159e140794200e4c7e9c7129050c7afe6770",+ "result": "passed",+ "verified_at": "2026-10-10T00:28:53Z",+ "changed_paths": [+ "frontend-modern/src/components/AI/Chat/index.tsx",+ "frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx"+ ],+ "content_sha256": {+ "frontend-modern/src/components/AI/Chat/index.tsx": "6c85f884a5a5ccc70eeeffba1371779e60ca11e0c2886d6a016b48a1a84e197c",+ "frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx": "60e426b86e0f3cb657117f9b2bf28dc894784c8605c78eb7b596b0a534c5b27b"+ },+ "routes": [+ "Existing Settings/Chat/Docs in local /browser-tests/assistant-control-compatibility.html fixture",+ "/settings/ai/assistant",+ "/docs/AI#control-levels",+ "/docs/AI_AUTONOMY#assistant-control-levels"+ ],+ "states": [+ "Five raw saved modes without preference/policy rewrites",+ "Legacy protected list value and accessible no-plan-exclusion limitation",+ "Read-only and Ask first, saved-error preservation, explicit opt-out",+ "Scoped alert identity and false-autonomy/approval context",+ "Chromium desktop light and WebKit 390px dark/320px light"+ ],+ "interactions": [+ "51 assertion groups including keyboard menu focus/wrap/Escape, writes, popup composer/viewport bounds and resize-close/reopen",+ "19 inspected captures; byte-identical prior inspections are hash-bound",+ "Actual Docs links, planning/approval/legacy limits and local table scroll"+ ],+ "viewports": [+ {+ "width": 1365,+ "height": 900+ },+ {+ "width": 390,+ "height": 844+ },+ {+ "width": 320,+ "height": 740+ }+ ],+ "notes": "Playwright 1.56.1 matches integration lock. Chromium 141.0.7390.37; WebKit 26.0. Public Chat still saves typed plans only. Legacy data, authenticated Actions approval/run, raw-command gates and Patrol policy unchanged. Browser/server closed. Synthetic transport, no inference/action/native or release acceptance."+}diff --git a/frontend-modern/public/docs/AI.md b/frontend-modern/public/docs/AI.mdindex 4899253228..084b114eac 100644--- a/frontend-modern/public/docs/AI.md+++ b/frontend-modern/public/docs/AI.md@@ -487,6 +487,10 @@ Older saved `autonomous` preferences display as **Ask first**, not as permissionto execute without approval. The stored preference and its existing entitlementchecks are preserved for older clients.+**Protected guests (legacy)** retains older VMIDs or names. This list does not+exclude saved action plans. Review each plan’s target and approval policy in+**Actions** instead of treating this list as an execution safeguard.+### Reviewing an Assistant action plan1. Assistant submits a typed action for a resource advertising that capability.diff --git a/frontend-modern/public/docs/AI_AUTONOMY.md b/frontend-modern/public/docs/AI_AUTONOMY.mdindex 075bbc2d69..e090c6931e 100644--- a/frontend-modern/public/docs/AI_AUTONOMY.md+++ b/frontend-modern/public/docs/AI_AUTONOMY.md@@ -109,6 +109,10 @@ entitlement checks for older clients. It does not bypass approval. An unrelatedsettings save does not rewrite that preference. Unknown values fail closed toread-only. Patrol mode and Autopilot acknowledgements remain separate.+**Protected guests (legacy)** retains older VMIDs or names. This list does not+exclude saved action plans. Review each plan’s target and approval policy in+**Actions** instead of treating this list as an execution safeguard.+### Configuration**UI:** Settings → Pulse Intelligence → Assistant → Chat action modediff --git a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsxindex 70090706bf..9e40ec4bfb 100644--- a/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx+++ b/frontend-modern/src/components/AI/Chat/__tests__/AIChat.test.tsx@@ -3582,6 +3582,24 @@ describe('AIChat', () => {});});+ it('clamps the mode menu inside the composer and closes it on viewport resize', () => {+ renderChat();+ const trigger = screen.getByRole('button', { name: 'Assistant chat action mode: Read-only' });+ const composer = trigger.closest('[data-assistant-composer]') as HTMLElement;+ vi.spyOn(trigger, 'getBoundingClientRect').mockReturnValue({ left: 185 } as DOMRect);+ vi.spyOn(composer, 'getBoundingClientRect').mockReturnValue({+ left: 16,+ right: 374,+ } as DOMRect);+ fireEvent.click(trigger);+ const menu = screen.getByRole('menu', { name: 'Assistant chat action options' });+ expect(menu.style.width).toBe('240px');+ expect(menu.style.left).toBe('-51px');+ fireEvent(window, new Event('resize'));+ expect(screen.queryByRole('menu')).not.toBeInTheDocument();+ expect(trigger).toHaveAttribute('aria-expanded', 'false');+ });+it('opens the control menu from the keyboard', async () => {renderChat();const controlButton = screen.getByRole('button', {diff --git a/frontend-modern/src/components/AI/Chat/index.tsx b/frontend-modern/src/components/AI/Chat/index.tsxindex 08638e7730..3b9e8e0cbd 100644--- a/frontend-modern/src/components/AI/Chat/index.tsx+++ b/frontend-modern/src/components/AI/Chat/index.tsx@@ -739,6 +739,7 @@ export const AIChat: Component<AIChatProps> = (props) => {});const [controlLevel, setControlLevel] = createSignal<AIControlLevel>('read_only');const [showControlMenu, setShowControlMenu] = createSignal(false);+ const [controlMenuPlacement, setControlMenuPlacement] = createSignal({ left: 0, width: 240 });const [controlSaving, setControlSaving] = createSignal(false);const [transcriptCopyFallback, setTranscriptCopyFallback] =createSignal<TranscriptCopyFallback | null>(null);@@ -1495,6 +1496,17 @@ export const AIChat: Component<AIChatProps> = (props) => {const openControlMenuAndFocusSelection = () => {if (controlSaving()) return;+ // A wrapped toolbar can put the trigger at either edge. Keep the whole+ // review-only menu inside the composer, not clipped by the chat panel.+ const trigger = controlModeButtonRef?.getBoundingClientRect();+ const composer = controlModeButtonRef+ ?.closest('[data-assistant-composer]')+ ?.getBoundingClientRect();+ const leftEdge = Math.max(16, composer?.left ?? 16);+ const rightEdge = Math.min(window.innerWidth - 16, composer?.right || window.innerWidth - 16);+ const width = Math.min(240, Math.max(0, rightEdge - leftEdge));+ const left = Math.max(leftEdge, Math.min(trigger?.left ?? leftEdge, rightEdge - width));+ setControlMenuPlacement({ left: left - (trigger?.left ?? leftEdge), width });setShowControlMenu(true);focusCurrentControlModeOption();};@@ -2934,10 +2946,13 @@ export const AIChat: Component<AIChatProps> = (props) => {closeSlashCommandAutocomplete({ clearTransientDraft: true });}};+ const closeControlMenuOnResize = () => setShowControlMenu(false);+ window.addEventListener('resize', closeControlMenuOnResize);document.addEventListener('click', handleClickOutside);onCleanup(() => {stashComposerDraftForRemount();document.removeEventListener('click', handleClickOutside);+ window.removeEventListener('resize', closeControlMenuOnResize);aiChatStore.registerInput?.(null);clearInterruptArm();if (queuedFollowUpCommandTargetTimeout) {@@ -5491,7 +5506,11 @@ export const AIChat: Component<AIChatProps> = (props) => {<Show when={showControlMenu()}><div- class="absolute bottom-full left-0 z-50 mb-2 w-60 overflow-hidden rounded-md border border-border bg-surface shadow-xs"+ class="absolute bottom-full z-50 mb-2 overflow-hidden rounded-md border border-border bg-surface shadow-xs"+ style={{+ left: `${controlMenuPlacement().left}px`,+ width: `${controlMenuPlacement().width}px`,+ }}role="menu"aria-label={AI_CHAT_CONTROL_MODE_MENU_LABEL}>diff --git a/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx b/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsxindex dcd2474854..1a43a2f4eb 100644--- a/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx+++ b/frontend-modern/src/components/Settings/AIRuntimeControlsSection.tsx@@ -324,11 +324,12 @@ export const AIAssistantCommandAccessSection: Component<AIRuntimeControlsSectionfor="ai-protected-guests"class="text-xs font-medium text-muted w-28 shrink-0 pt-1">- Protected guests+ Protected guests (legacy)</label><div class="flex-1"><inputid="ai-protected-guests"+ aria-describedby="ai-protected-guests-help"type="text"value={state.form.protectedGuests}onInput={(e) => state.setForm('protectedGuests', e.currentTarget.value)}@@ -336,8 +337,9 @@ export const AIAssistantCommandAccessSection: Component<AIRuntimeControlsSectionclass="w-full min-h-10 sm:min-h-9 px-2 py-2 text-sm border border-border rounded-sm"disabled={state.saving()}/>- <p class="text-[10px] text-muted mt-1">- Comma-separated VMIDs or names excluded from Assistant action planning.+ <p id="ai-protected-guests-help" class="text-[10px] text-muted mt-1">+ Retained legacy VMIDs or names. This list does not exclude saved action plans.+ Review each plan’s target and approval policy in Actions.</p></div></div>diff --git a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsxindex ca03538383..554ab60f21 100644--- a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx@@ -941,6 +941,24 @@ describe('Assistant saved-control compatibility', () => {},);+ it('explains the legacy protected list does not exclude canonical action plans', async () => {+ getSettingsMock.mockResolvedValue({+ ...baseSettings(),+ control_level: 'autonomous',+ protected_guests: ['101', 'prod-db'],+ });+ renderComponent('assistant');+ const legacy = await screen.findByLabelText('Protected guests (legacy)');+ await waitFor(() => expect(legacy).toHaveValue('101, prod-db'));+ expect(legacy).toHaveAccessibleDescription(+ 'Retained legacy VMIDs or names. This list does not exclude saved action plans. Review each plan’s target and approval policy in Actions.',+ );+ expect(screen.queryByText(/excluded from Assistant action planning/i)).not.toBeInTheDocument();+ fireEvent.click(screen.getByRole('button', { name: /Save Assistant settings/i }));+ await waitFor(() => expect(updateSettingsMock).toHaveBeenCalledTimes(1));+ expect(updateSettingsMock.mock.calls[0][0]).not.toHaveProperty('protected_guests');+ });+it('explicitly opts out of legacy action planning without changing Patrol', async () => {const saved = { ...baseSettings(), control_level: 'autonomous', protected_guests: ['vm-101'] };getSettingsMock.mockResolvedValue(saved);diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 44694dcdfb..e28ace1275 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -117,6 +117,16 @@ const settingsRuntimeSources = import.meta.glob(['../*.tsx', '../ConnectionEdito}) as Record<string, string>;describe('settings architecture guardrails', () => {+ it('pairs the legacy protected field with its accessible canonical-plan limitation', () => {+ expect(aiRuntimeControlsSectionSource).toContain('Protected guests (legacy)');+ expect(aiRuntimeControlsSectionSource).toContain('aria-describedby="ai-protected-guests-help"');+ expect(aiRuntimeControlsSectionSource).toContain('id="ai-protected-guests-help"');+ expect(aiRuntimeControlsSectionSource).toContain(+ 'This list does not exclude saved action plans.',+ );+ expect(aiRuntimeControlsSectionSource).not.toContain('excluded from Assistant action planning');+ });+it('keeps the Patrol cost preview on the canonical cost-preview API and presentation helper', () => {// The price table and the install's run history live on the server; the// settings surface must not re-derive dollars from model names.diff --git a/internal/ai/chat/service_patrol_additional_test.go b/internal/ai/chat/service_patrol_additional_test.goindex b06b013990..d984d24501 100644--- a/internal/ai/chat/service_patrol_additional_test.go+++ b/internal/ai/chat/service_patrol_additional_test.go@@ -743,14 +743,24 @@ func TestService_ListAvailableToolsAndSetters(t *testing.T) {}func TestService_isAutonomousModeEnabled(t *testing.T) {- service := &Service{cfg: &config.AIConfig{ControlLevel: config.ControlLevelAutonomous}}- if !service.isAutonomousModeEnabled() {- t.Fatalf("expected autonomous mode from config")+ for _, level := range []string{config.ControlLevelReadOnly, config.ControlLevelControlled, config.ControlLevelAutonomous, "suggest", "unknown", ""} {+ t.Run(level, func(t *testing.T) {+ service := &Service{cfg: &config.AIConfig{ControlLevel: level}}+ if service.isAutonomousModeEnabled() {+ t.Fatal("saved Assistant preference must not enable non-interactive investigation mode")+ }+ service.SetAutonomousMode(true)+ if !service.isAutonomousModeEnabled() {+ t.Fatal("expected explicit core-owned investigation mode")+ }+ service.SetAutonomousMode(false)+ if service.isAutonomousModeEnabled() || service.cfg.ControlLevel != level {+ t.Fatal("disabling investigation mode must not rewrite the saved preference")+ }+ })}-- service = &Service{}- if service.isAutonomousModeEnabled() {- t.Fatalf("expected autonomous mode to be false")+ if (&Service{}).isAutonomousModeEnabled() {+ t.Fatal("expected autonomous mode to be false without explicit investigation mode")}}diff --git a/scripts/release_control/ai_runtime_docs_policy_test.py b/scripts/release_control/ai_runtime_docs_policy_test.pyindex 1ebcc3ef8a..53e53a2c6f 100644--- a/scripts/release_control/ai_runtime_docs_policy_test.py+++ b/scripts/release_control/ai_runtime_docs_policy_test.py@@ -331,7 +331,7 @@ class AIRuntimeDocsPolicyTest(unittest.TestCase):start = text.index("## Assistant Control Levels" if name == "AI_AUTONOMY.md" else "### Control Levels")end = text.index("\n---", start)section = " ".join(text[start:end].split())- for retained in ("Read-only", "Ask first", "Actions", "does not execute", "stored", "entitlement", "Patrol", "verification"):+ for retained in ("Read-only", "Ask first", "Actions", "does not execute", "stored", "entitlement", "Patrol", "verification", "Protected guests (legacy)", "does not exclude saved action plans"):self.assertIn(retained, section)for retired in ("executes commands without prompting", "AI executes actions without prompting", "APPROVAL_REQUIRED", "Approve** to execute"):self.assertNotIn(retired, section)