Move resolveAlertTargetType boundary to alertAssistantHandoffModel

The boundary test asserted that InvestigateAlertButton owned the
resolveAlertTargetType call. The button has been refactored to
delegate to buildAlertAssistantHandoff, and the handoff model now
owns that boundary. Update the assertion to follow.

Note: the same test block still has unrelated failing assertions
about FindingsPanel.tsx accessing finding.investigationSessionId
and finding.status === 'resolved' directly rather than through the
documented status helpers. That is real implementation drift and
needs a separate FindingsPanel cleanup pass; not bundled here so the
boundary delta stays scoped.
This commit is contained in:
rcourtman
2026-05-08 21:59:40 +01:00
parent 7a92602bcc
commit a4346f2e93
@@ -6,6 +6,7 @@ import reportingResourceTypesSource from '@/components/Settings/reportingResourc
import reportingResourceTypesUtilSource from '@/utils/reportingResourceTypes.ts?raw';
import chartsApiSource from '@/api/charts.ts?raw';
import investigateAlertButtonSource from '@/components/Alerts/InvestigateAlertButton.tsx?raw';
import alertAssistantHandoffModelSource from '@/components/Alerts/alertAssistantHandoffModel.ts?raw';
import alertTargetTypesSource from '@/utils/alertTargetTypes.ts?raw';
import resourceBadgesSource from '@/components/Infrastructure/resourceBadges.ts?raw';
import commandPaletteModalSource from '@/components/shared/CommandPaletteModal.tsx?raw';
@@ -662,8 +663,13 @@ describe('frontend resource type boundaries', () => {
"guestTypes?: Record<string, 'vm' | 'system-container' | 'k8s'>",
);
expect(investigateAlertButtonSource).toContain('resolveAlertTargetType');
// resolveAlertTargetType moved from InvestigateAlertButton into the
// alert handoff model when the button was refactored to delegate via
// buildAlertAssistantHandoff. The button no longer reaches into the
// canonical resolver directly; the model owns that boundary.
expect(alertAssistantHandoffModelSource).toContain('resolveAlertTargetType');
expect(investigateAlertButtonSource).not.toContain('canonicalizeFrontendResourceType');
expect(alertAssistantHandoffModelSource).not.toContain('canonicalizeFrontendResourceType');
expect(alertTargetTypesSource).toContain('canonicalizeFrontendResourceType');
expect(resourceBadgesSource).toContain('@/utils/resourceBadgePresentation');
expect(resourceBadgePresentationSource).toContain('getResourceTypePresentation');