From b0a278cc33cfdee48e8f3f3515ab9bd57b1adcb6 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Mon, 22 Dec 2025 20:09:56 +0000 Subject: [PATCH] Fix demo mode detection to use PULSE_MOCK_MODE env var The AI demo/mock findings were using a non-existent MOCK_ENABLED env var. Changed to PULSE_MOCK_MODE which is the actual env var used by the mock data system. --- internal/ai/demo.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/ai/demo.go b/internal/ai/demo.go index fc309e356..acd5c063b 100644 --- a/internal/ai/demo.go +++ b/internal/ai/demo.go @@ -2,17 +2,19 @@ package ai import ( "os" + "strings" "time" "github.com/rs/zerolog/log" ) // IsDemoMode returns true if mock/demo mode is enabled -// This checks the same MOCK_ENABLED env var used by the mock data system +// This checks the PULSE_MOCK_MODE env var used by the mock data system func IsDemoMode() bool { - return os.Getenv("MOCK_ENABLED") == "true" || os.Getenv("MOCK_ENABLED") == "1" + return strings.EqualFold(os.Getenv("PULSE_MOCK_MODE"), "true") } + // InjectDemoFindings populates the patrol service with realistic mock findings // This is used for demo instances to showcase AI features without actual AI API calls func (p *PatrolService) InjectDemoFindings() {