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
fix(web): clear explicitly withdrawn Proxmox memory
pulse-triage[bot]7eec89002572
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 71eaeced7b..0404a4e2b7 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -15,6 +15,8 @@## Purpose+The resource adapter fast delta path must remain content-equivalent to the full merge for explicit Proxmox memory withdrawal. An absent canonical metric plus incoming Proxmox usageUnavailable clears the old display value; store patch operations must emit that clear even when only the raw facet key changed. This bounded per-changed-row check must not introduce an estate-wide scan or defeat untouched-row identity preservation. Adapter tests cover both delta paths and store writes, including trusted-zero recovery and ordinary partial omission.+The PR #1935 log-level parser benchmark remains an unresolved environment-boundobservation. Two CI comparisons on unchanged parser source report +10.04 and+10.23 percent for the empty-string case, with stable base/candidate binaries.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex f66a85ba8d..86604f092d 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -23,6 +23,8 @@ and sort the complete canonical change table while startup and ingestion wait.## Purpose+Canonical frontend memory withdrawal is explicit: when a resource snapshot omits the canonical memory metric and its Proxmox memory facet marks usageUnavailable, the display merge must clear any previous metric. Plain partial omission remains compatible with richer REST state, and an incoming canonical metric (including measured zero) takes precedence over unavailable raw evidence. The adapter transition tests pin withdrawal and recovery; the hybrid-memory Chromium fixture exercises the rendered table and drawer at 1280px and 390px. Workload details remain canonical-only: withdrawal shows N/A in the table and removes the Memory section rather than manufacturing a raw-facet total; measured-zero recovery restores Total and Free, with screenshot positioning above fixed navigation. This does not change agent-only or arbitrary field-deletion semantics.+**VM-linked agent memory read — issue #1962 (7 September 2026)**`VMView.LinkedAgentMemory` exposes a value-copy of the agent's own memory samplediff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.jsonindex bb5b912bad..c211fb6304 100644--- a/frontend-modern/browser-verification.json+++ b/frontend-modern/browser-verification.json@@ -1,55 +1,35 @@{"version": 1,- "base_sha": "7e34b00d4face3ffa33a36946bb527dbfbdfd74c",- "verified_at": "2026-09-07T16:12:24.652755Z",+ "base_sha": "c857802df6b00e61e2229eea411d6675deff2d8a",+ "verified_at": "2026-09-07T22:03:54.189527Z","result": "passed","changed_paths": [- "frontend-modern/src/components/AI/Chat/ChatMessages.tsx",- "frontend-modern/src/components/patrol/ApprovalSection.tsx",- "frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts"+ "frontend-modern/src/utils/resourceStateAdapters.ts"],"content_sha256": {- "frontend-modern/src/components/AI/Chat/ChatMessages.tsx": "6f2bea6530d383abe81e13054ef9b7a90f4324c244166fb0a8afaac354439b48",- "frontend-modern/src/components/patrol/ApprovalSection.tsx": "5e7ac87d87674b4c05fe80c3933d4ab542366054e2abbfa3f96afbfe90e993a4",- "frontend-modern/src/features/patrol/patrolInvestigationContextModel.ts": "781c8730a7f566831562160a31ba437b2aabd8840330f59b521894198f79b0f1"+ "frontend-modern/src/utils/resourceStateAdapters.ts": "ce1f8f2aef4b04b64dd2533c09458349811ba7cec9ec2e4bd8634b8e9c3c848f"},"routes": [- "/patrol",- "/actions?action=act_fd2d0bdab1930e2d3a75faf080b8ba7a",- "/actions?action=act_369c466aea179f93fc69aa04a710689a",- "/actions?action=act_d2f137411342c995d840d529a70fbf95",- "/docs/ASSISTANT_ARCHITECTURE",- "/docs/ASSISTANT_SAFETY"+ "/proxmox"],"viewports": [{- "width": 1440,- "height": 1000- },- {- "width": 900,- "height": 1000+ "width": 1280,+ "height": 900},{"width": 390,- "height": 1000+ "height": 844}],"states": [- "Approved and independently verified outcome",- "Rejected and expired unexecuted plans",- "Expanded filesystem evidence and risk",- "Attached finding context, explicit new session, retained saved context",- "Fresh streamed explanation and saved missing-access, VM, storage and rejection outcomes"+ "Canonical 100% to 35%; stale/offline/unavailable agent evidence retains trusted 100%.",+ "Explicit Proxmox withdrawal with omitted canonical memory: table N/A, Memory section absent.",+ "Measured-zero recovery: table 0%, Memory Total and Free both 100 MB; second cluster stays 80%."],"interactions": [- "Open review, close, focus return and Enter reopen",- "Expand every investigation tool card, deep evidence scroll and actual pixel inspection",- "Discuss with Assistant, new-session clearing and saved-session resumption",- "Exact action link, terminal authority controls, reload and Escape",- "Stream at bottom, wheel overscroll containment, scroll away, Latest, resize while open and reachable header/composer",- "Session-history picker and exact persisted message read",- "Documentation linked navigation, reload and end-of-document scroll"+ "Open guest drawer; deliver synthetic canonical socket snapshots while open.",+ "Resize to desktop and narrow Chromium; scroll recovered Memory into view above fixed navigation; inspect all five final screenshots."],- "notes": "Final runtime r34 SHA256 e1ae053e656b28af9ba0e7541a47bdeb56303d1d7912edc57b2dac2f94620bd1 matches 4,853 source inputs. Named r28 fault matrix and subsequent affected writer/streaming proofs are detailed in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. Fresh r34 approved explanation passed, with saved final-runtime missing-access/VM/rejected/storage explanations and deep Patrol history. Receipts: workspace tmp/patrol-planning-continuation/patrol-browser and docs-browser-r34. Initial history-locator and network-idle failures are retained separately. Only login, selected authorized API provider readiness and one explicit fresh explanation were submitted during these checks. No lab action was repeated. Independent customer environments and broader readiness remain unqualified."+ "notes": "Synthetic Desktop Chrome acceptance only, not touch/mobile-device, installed poller, FreeBSD reporter or alert-delivery proof. Base reproduced stale 100% after withdrawal; adapter repair passed final Chromium test without retries and pageerror assertion. Earlier fixture wrongly expected raw-facet total after withdrawal; useWorkloads maps canonical metrics only. Two selector/absent-section failures and first passing but bottom-nav-obscured screenshot run are retained, not counted as final visual acceptance. Final four transition screenshots show withdrawn section absent and recovered Total/Free in frame at both widths; initial 35% screenshot is table-only. Evidence: /var/lib/pulse-maintainer/queue/staging/20260907T215015Z-web-product/ (moves to completed): browser-base.log, browser-repair.log, browser-repair-selector.log, browser-canonical.log, browser-final.log, final-report/data/*.png. Browser command: pulse-heavy-run -- bash wrapper starting Vite 127.0.0.1:5187 then PLAYWRIGHT_BASE_URL=http://127.0.0.1:5187 playwright test tests/86-hybrid-memory-browser.spec.ts --project=chromium --retries=0; Vite stopped by wrapper trap."}diff --git a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.tsindex 797ee03f22..da7e9dbfba 100644--- a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts+++ b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts@@ -1181,6 +1181,58 @@ describe('resourceStateAdapters unavailable memory contract', () => {},} as unknown as Resource['proxmox'];+ it('clears a previous metric when a snapshot explicitly reports unavailable memory', () => {+ const previous = createNodeResource({});+ const incoming = { ...previous, proxmox: unavailableProxmoxMemory };+ delete incoming.memory; // JSON omitempty, not an explicit undefined property.+ const [merged] = mergeCanonicalResourceSnapshot([incoming], [previous]);+ expect(nodeFromResource(merged)?.memory.usageUnavailable).toBe(true);+ expect(merged.memory).toBeUndefined();+ });++ it('clears withdrawn memory through both delta paths and emits the store clear', () => {+ const previous = {+ ...createNodeResource({}),+ type: 'vm',+ proxmox: unavailableProxmoxMemory,+ } as Resource;+ const incoming = { ...previous };+ delete incoming.memory;+ for (const keys of [undefined, new Map([[previous.id, ['memory']]])]) {+ const [merged] = mergeCanonicalResourceDeltaSnapshot(+ [incoming],+ [previous],+ new Set([previous.id]),+ keys,+ );+ expect(merged.memory).toBeUndefined();+ expect(buildFastResourceStorePatchOps(merged, ['memory'])).toEqual([+ { key: 'memory', value: undefined, mode: 'set' },+ ]);+ expect(buildFastResourceStorePatchOps(merged, ['proxmox'])).toContainEqual({+ key: 'memory',+ value: undefined,+ mode: 'set',+ });+ }+ });++ it('retains richer memory on partial omission without unavailable evidence', () => {+ const previous = createNodeResource({});+ const incoming = { ...previous };+ delete incoming.memory;+ const [merged] = mergeCanonicalResourceSnapshot([incoming], [previous]);+ expect(merged.memory).toEqual(previous.memory);+ });++ it('accepts a newly trusted metric after an unavailable snapshot', () => {+ const previous = { ...createNodeResource({}), proxmox: unavailableProxmoxMemory };+ delete previous.memory;+ const incoming = { ...previous, memory: { current: 0, total: 8192, used: 0 } };+ const [merged] = mergeCanonicalResourceSnapshot([incoming], [previous]);+ expect(nodeFromResource(merged)?.memory).toMatchObject({ usage: 0, usageUnavailable: false });+ });+it('preserves explicit unavailable usage when no trusted metric exists', () => {const node = nodeFromResource({...createNodeResource({}),diff --git a/frontend-modern/src/utils/resourceStateAdapters.ts b/frontend-modern/src/utils/resourceStateAdapters.tsindex c9617893dd..8315e0e87f 100644--- a/frontend-modern/src/utils/resourceStateAdapters.ts+++ b/frontend-modern/src/utils/resourceStateAdapters.ts@@ -867,6 +867,13 @@ const mergeCanonicalSourceFacet = <T extends JsonRecord>(? mergeRecord(incomingFacet, existingFacet): incomingFacet;+// A missing field alone can be a partial snapshot. Explicit unavailable raw+// evidence plus no canonical metric means the producer has withdrawn memory;+// retaining the previous display metric would hide that state.+const hasWithdrawnProxmoxMemory = (incoming: Resource): boolean =>+ incoming.memory == null &&+ asBoolean(asRecord(asRecord(incoming.proxmox)?.memory)?.usageUnavailable) === true;+export const mergeCanonicalResource = (incoming: Resource, existing?: Resource): Resource => {if (!existing) {return canonicalizeRealtimeResource(incoming);@@ -876,6 +883,7 @@ export const mergeCanonicalResource = (incoming: Resource, existing?: Resource):return {...existingCanonical,...incoming,+ ...(hasWithdrawnProxmoxMemory(incoming) ? { memory: undefined } : {}),clusterId: incoming.clusterId ?? existingCanonical.clusterId,platformScopes: normalizeSourcePlatformScopes(incoming.platformScopes ?? existingCanonical.platformScopes,@@ -1105,8 +1113,8 @@ const applyFastResourceMergePatch = ((platformDataLeaves ??= []).push(key.slice(FAST_MERGE_PLATFORM_DATA_PREFIX.length));continue;}- // A merge-patch deletion removed the key from the raw row; the full merge's- // `...incoming` spread would keep the existing display value, so keep it.+ // A merge-patch deletion normally preserves the richer display value.+ // Explicitly withdrawn Proxmox memory is cleared below, as in the full merge.if (!(key in rawIncoming)) continue;const value = rawIncoming[key];if (key === 'proxmox') {@@ -1137,6 +1145,7 @@ const applyFastResourceMergePatch = (}next.platformData = nextPlatformData;}+ if (hasWithdrawnProxmoxMemory(incoming)) next.memory = undefined;return next as unknown as Resource;};@@ -1159,6 +1168,11 @@ export const buildFastResourceStorePatchOps = (): FastResourceStorePatchOp[] => {const record = rawStoreValue(row as unknown as JsonRecord);const ops: FastResourceStorePatchOp[] = [];+ // Unavailability can also arrive with a raw Proxmox facet change rather+ // than a memory key (the canonical metric may already be absent on wire).+ if (!keys.includes('memory') && hasWithdrawnProxmoxMemory(row)) {+ ops.push({ key: 'memory', value: undefined, mode: 'set' });+ }const platformData = asRecord(record.platformData);for (const key of keys) {if (key.startsWith(FAST_MERGE_PLATFORM_DATA_PREFIX)) {diff --git a/tests/integration/tests/86-hybrid-memory-browser.spec.ts b/tests/integration/tests/86-hybrid-memory-browser.spec.tsindex 7dda194ce0..c9b26c6644 100644--- a/tests/integration/tests/86-hybrid-memory-browser.spec.ts+++ b/tests/integration/tests/86-hybrid-memory-browser.spec.ts@@ -163,17 +163,73 @@ test("hybrid guest memory follows canonical snapshots in the browser", async ({page.locator(".workload-row").filter({ hasText: "cluster-b-vm" }),).toContainText("80%");}- resources = [vm("cluster-a", 0), vm("cluster-b", 80)];- send();- await expect(memoryCell).toContainText("0%");- await expect(memoryCell).not.toContainText("N/A");- await expect(drawer).toContainText("100 MB");- await expect(- page.locator(".workload-row").filter({ hasText: "cluster-b-vm" }),- ).toContainText("80%");- expect(errors).toEqual([]);- await testInfo.attach("hybrid-memory-measured-zero", {- body: await page.screenshot(),- contentType: "image/png",+ // Workload details use canonical metrics only: withdrawal removes the Memory+ // section; recovery restores it. Do not invent Usage UI or raw-facet totals.+ const memoryDetails = drawer.locator("tbody").filter({+ has: page.locator("th").filter({ hasText: /^Memory$/ }),});+ for (const viewport of [+ { width: 1280, height: 900 },+ { width: 390, height: 844 },+ ]) {+ await page.setViewportSize(viewport);+ resources = [+ {+ ...vm("cluster-a"),+ proxmox: {+ ...vm("cluster-a").proxmox,+ memory: {+ total: 100 * 1024 * 1024,+ used: 0,+ free: 0,+ usage: 0,+ usageUnavailable: true,+ },+ },+ } as ReturnType<typeof vm>,+ vm("cluster-b", 80),+ ];+ send();+ await expect(memoryCell).toContainText("N/A");+ await expect(memoryCell).not.toContainText("100%");+ await expect(memoryDetails).toHaveCount(0);+ await expect(drawer.getByText("Free", { exact: true })).toHaveCount(0);+ await drawer.scrollIntoViewIfNeeded();+ await expect(drawer).toBeInViewport();+ await expect(+ page.locator(".workload-row").filter({ hasText: "cluster-b-vm" }),+ ).toContainText("80%");+ await testInfo.attach(`withdrawn-memory-${viewport.width}`, {+ body: await page.screenshot(),+ contentType: "image/png",+ });++ resources = [vm("cluster-a", 0), vm("cluster-b", 80)];+ send();+ await expect(memoryCell).toContainText("0%");+ await expect(memoryCell).not.toContainText("N/A");+ // Centre the recovered details above the fixed narrow-screen navigation.+ await memoryDetails.evaluate((element) =>+ element.scrollIntoView({ block: "center", inline: "nearest" }),+ );+ await expect.poll(async () => {+ const box = await memoryDetails.boundingBox();+ return box ? box.y + box.height : Infinity;+ }).toBeLessThan(viewport.height - 64);+ await expect(memoryDetails).toBeInViewport({ ratio: 1 });+ await expect(memoryDetails).toContainText("100 MB");+ await expect(+ memoryDetails.locator("tr").filter({+ has: page.getByText("Free", { exact: true }),+ }),+ ).toContainText("100 MB");+ await expect(+ page.locator(".workload-row").filter({ hasText: "cluster-b-vm" }),+ ).toContainText("80%");+ await testInfo.attach(`recovered-memory-${viewport.width}`, {+ body: await page.screenshot(),+ contentType: "image/png",+ });+ }+ expect(errors).toEqual([]);});