From 35399389a91c3c2d4081e2cb58c8562687b4e9e7 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 20 May 2026 16:13:49 +0100 Subject: [PATCH] Handle Discovery missing-config diagnostics --- .../v6/internal/subsystems/frontend-primitives.md | 3 ++- .../src/components/Discovery/__tests__/DiscoveryTab.test.tsx | 4 ++-- .../__tests__/ResourceDetailDrawer.discovery.test.ts | 4 ++-- frontend-modern/src/components/Workloads/GuestDrawer.test.tsx | 4 ++-- .../src/utils/__tests__/discoveryPresentation.test.ts | 4 ++-- frontend-modern/src/utils/discoveryPresentation.ts | 2 ++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index 0e1490319..d73076fca 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -1399,7 +1399,8 @@ AI runtime. identified-service summary when the service name, category, version, paths, ports, facts, and suggested URL are all absent or placeholders, including generic workload types such as `service` or `container` and - diagnostic facts such as metadata-only status or missing-config errors. + diagnostic facts such as metadata-only status, config-availability + failures, or missing-config errors. Discovery is an opt-in observed-context layer, not an automatic row-link owner. The reducer must carry provenance, observed time, service version, endpoint candidates, and URL-source copy so drawer surfaces can show diff --git a/frontend-modern/src/components/Discovery/__tests__/DiscoveryTab.test.tsx b/frontend-modern/src/components/Discovery/__tests__/DiscoveryTab.test.tsx index 02158ad9d..bc6e07fcb 100644 --- a/frontend-modern/src/components/Discovery/__tests__/DiscoveryTab.test.tsx +++ b/frontend-modern/src/components/Discovery/__tests__/DiscoveryTab.test.tsx @@ -62,8 +62,8 @@ describe('DiscoveryTab', () => { }, { category: 'config', - key: 'missing_config', - value: 'nodes/delly/lxc/152.conf not found on host', + key: 'config_availability', + value: 'missing_node_config', source: 'all_commands', confidence: 1, discovered_at: '2026-05-19T00:00:00Z', diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.discovery.test.ts b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.discovery.test.ts index 48a03cb34..bc1ab76d9 100644 --- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.discovery.test.ts +++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.discovery.test.ts @@ -317,8 +317,8 @@ describe('resource drawer discovery promotion', () => { }, { category: 'config', - key: 'missing_config', - value: 'nodes/delly/lxc/152.conf not found on host', + key: 'config_availability', + value: 'missing_node_config', source: 'all_commands', confidence: 1, discovered_at: '2026-05-19T00:00:00Z', diff --git a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx index 129c74e12..dbc3d1e7d 100644 --- a/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx +++ b/frontend-modern/src/components/Workloads/GuestDrawer.test.tsx @@ -267,8 +267,8 @@ describe('GuestDrawer', () => { }, { category: 'config', - key: 'missing_config', - value: 'nodes/delly/lxc/152.conf not found on host', + key: 'config_availability', + value: 'missing_node_config', source: 'all_commands', confidence: 1, discovered_at: '2026-05-19T00:00:00Z', diff --git a/frontend-modern/src/utils/__tests__/discoveryPresentation.test.ts b/frontend-modern/src/utils/__tests__/discoveryPresentation.test.ts index 4f73b0af9..4f679e8d7 100644 --- a/frontend-modern/src/utils/__tests__/discoveryPresentation.test.ts +++ b/frontend-modern/src/utils/__tests__/discoveryPresentation.test.ts @@ -246,8 +246,8 @@ describe('discoveryPresentation', () => { }, { category: 'config', - key: 'missing_config', - value: 'nodes/delly/lxc/152.conf not found on host', + key: 'config_availability', + value: 'missing_node_config', source: 'all_commands', confidence: 1, discovered_at: '2026-05-19T00:00:00Z', diff --git a/frontend-modern/src/utils/discoveryPresentation.ts b/frontend-modern/src/utils/discoveryPresentation.ts index b12251889..0fc4a4cf1 100644 --- a/frontend-modern/src/utils/discoveryPresentation.ts +++ b/frontend-modern/src/utils/discoveryPresentation.ts @@ -79,7 +79,9 @@ const isMeaningfulDiscoveryFact = (fact: DiscoveryFact): boolean => { const source = normalizeDiscoveryToken(fact.source); if (!isMeaningfulDiscoveryText(fact.value)) return false; if (key === 'status' && source === 'metadata') return false; + if (key.includes('availability') && value.includes('missing')) return false; if (key.startsWith('missing') || key.endsWith('missing')) return false; + if (value.startsWith('missing ') || value.includes(' missing ')) return false; if ( value.includes('does not exist') || value.includes('not found') ||