From f1c008e35e46df5321d351288dad56bdcf6f7ca2 Mon Sep 17 00:00:00 2001 From: haliaeetusvocifer Date: Sat, 18 Apr 2026 02:16:37 +0100 Subject: [PATCH 1/2] fix: make log messages more AI-friendly Reword log messages that AI tools commonly misinterpret as errors when analyzing test failures and logs: - IDE runner unavailability: Clarify that missing IDE environment variables are expected in non-IDE environments (CI, tests), not errors - Runtime status: Add context that non-installed runtimes (e.g. Podman when only Docker is available) are expected and can be ignored - Executable runner fallback: Downgrade from Error to Info log level since progressing through startup stages is normal behavior - IDE notification handler: Clarify that disposed endpoint is expected during shutdown Fixes #20 --- controllers/executable_controller.go | 3 ++- internal/containers/runtimes/runtime.go | 5 ++++- internal/exerunners/ide_connection_info.go | 4 ++-- internal/exerunners/ide_notification_handler.go | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/controllers/executable_controller.go b/controllers/executable_controller.go index bb35ccfd..660684b9 100644 --- a/controllers/executable_controller.go +++ b/controllers/executable_controller.go @@ -452,7 +452,8 @@ func (r *ExecutableReconciler) startExecutable( runner, runnerNotFoundErr := r.getExecutableRunner(exe, ri.startupStage) if runnerNotFoundErr != nil { - log.Error(runnerNotFoundErr, "The Executable runner is not available", "StartupStage", ri.startupStage) + log.V(1).Info("Executable runner is not available for current startup stage, will try next stage if available", + "StartupStage", ri.startupStage, "reason", runnerNotFoundErr.Error()) continue } diff --git a/internal/containers/runtimes/runtime.go b/internal/containers/runtimes/runtime.go index 23bdc26c..f5b06d40 100644 --- a/internal/containers/runtimes/runtime.go +++ b/internal/containers/runtimes/runtime.go @@ -83,7 +83,10 @@ func FindAvailableContainerRuntime(ctx context.Context, log logr.Logger, executo return nil, errNoRuntimeFound } - log.V(1).Info("Runtime status", "Runtime", availableRuntime.orchestrator.Name(), "Status", availableRuntime.status) + log.V(1).Info("Container runtime selected (non-installed runtimes are expected and can be ignored)", + "SelectedRuntime", availableRuntime.orchestrator.Name(), + "Installed", availableRuntime.status.Installed, + "Running", availableRuntime.status.Running) return availableRuntime.orchestrator, nil } diff --git a/internal/exerunners/ide_connection_info.go b/internal/exerunners/ide_connection_info.go index 91c4c27c..41353f48 100644 --- a/internal/exerunners/ide_connection_info.go +++ b/internal/exerunners/ide_connection_info.go @@ -44,8 +44,8 @@ type ideConnectionInfo struct { } func NewIdeConnectionInfo(lifetimeCtx context.Context, log logr.Logger) (*ideConnectionInfo, error) { - const runnerNotAvailable = "Executables cannot be started via IDE: " - const missingRequiredEnvVar = "missing required environment variable '%s'" + const runnerNotAvailable = "IDE execution is not configured (this is expected in non-IDE environments): " + const missingRequiredEnvVar = "environment variable '%s' is not set" createAndLogError := func(format string, a ...any) error { err := fmt.Errorf(format, a...) diff --git a/internal/exerunners/ide_notification_handler.go b/internal/exerunners/ide_notification_handler.go index 81c7c1b4..c4fadbd6 100644 --- a/internal/exerunners/ide_notification_handler.go +++ b/internal/exerunners/ide_notification_handler.go @@ -109,7 +109,7 @@ func NewIdeNotificationHandler( } func (nh *ideNotificationHandler) WaitConnected(ctx context.Context) error { - const errDisposed = "the IDE session endpoint is not available" + const errDisposed = "IDE session endpoint has been disposed (this is expected during shutdown)" nhState := nh.getState() switch nhState { From e27ae3d4bf69dca9b77462be3b3b4eb405b98ef0 Mon Sep 17 00:00:00 2001 From: Karol Zadora-Przylecki Date: Mon, 20 Apr 2026 13:17:39 -0700 Subject: [PATCH 2/2] Use uppercase for log properties Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- controllers/executable_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/executable_controller.go b/controllers/executable_controller.go index 660684b9..6f9d15eb 100644 --- a/controllers/executable_controller.go +++ b/controllers/executable_controller.go @@ -453,7 +453,7 @@ func (r *ExecutableReconciler) startExecutable( runner, runnerNotFoundErr := r.getExecutableRunner(exe, ri.startupStage) if runnerNotFoundErr != nil { log.V(1).Info("Executable runner is not available for current startup stage, will try next stage if available", - "StartupStage", ri.startupStage, "reason", runnerNotFoundErr.Error()) + "StartupStage", ri.startupStage, "Error", runnerNotFoundErr) continue }