From f9fff031a9b2f5c5b838c77de0f603d0e9154754 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 07:16:26 +0000 Subject: [PATCH 1/2] Initial plan From 6339d830a453a7f06fb688fe36676aec6ff4d8ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Feb 2026 07:24:10 +0000 Subject: [PATCH 2/2] Fix error wrapping in compiler files - return errors instead of only logging Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/compiler_activation_jobs.go | 5 +++-- pkg/workflow/compiler_yaml_main_job.go | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/workflow/compiler_activation_jobs.go b/pkg/workflow/compiler_activation_jobs.go index 6d6d7a3b14e..fa68aaa9e43 100644 --- a/pkg/workflow/compiler_activation_jobs.go +++ b/pkg/workflow/compiler_activation_jobs.go @@ -434,8 +434,9 @@ func (c *Compiler) buildActivationJob(data *WorkflowData, preActivationJobCreate if data.SafeOutputs != nil && data.SafeOutputs.Messages != nil { messagesJSON, err := serializeMessagesConfig(data.SafeOutputs.Messages) if err != nil { - compilerActivationJobsLog.Printf("Warning: failed to serialize messages config for activation job: %v", err) - } else if messagesJSON != "" { + return nil, fmt.Errorf("failed to serialize messages config for activation job: %w", err) + } + if messagesJSON != "" { steps = append(steps, fmt.Sprintf(" GH_AW_SAFE_OUTPUT_MESSAGES: %q\n", messagesJSON)) } } diff --git a/pkg/workflow/compiler_yaml_main_job.go b/pkg/workflow/compiler_yaml_main_job.go index e21cdeb1d6a..961e1bb03df 100644 --- a/pkg/workflow/compiler_yaml_main_job.go +++ b/pkg/workflow/compiler_yaml_main_job.go @@ -76,10 +76,9 @@ func (c *Compiler) generateMainJobSteps(yaml *strings.Builder, data *WorkflowDat // Convert to JSON array for the script repoImportsJSON, err := json.Marshal(data.RepositoryImports) if err != nil { - compilerYamlLog.Printf("Warning: failed to marshal repository imports: %v", err) - } else { - fmt.Fprintf(yaml, " GH_AW_REPOSITORY_IMPORTS: '%s'\n", string(repoImportsJSON)) + return fmt.Errorf("failed to marshal repository imports for merge step: %w", err) } + fmt.Fprintf(yaml, " GH_AW_REPOSITORY_IMPORTS: '%s'\n", string(repoImportsJSON)) } // Set agent import spec if present (legacy path)