Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/cli/mcp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Note: Output can be filtered using the jq parameter.`,
cmdArgs = append(cmdArgs, args.Pattern)
}

mcpLog.Printf("Executing status tool: pattern=%s, jqFilter=%s", args.Pattern, args.JqFilter)
// Execute the CLI command
cmd := execCmd(ctx, cmdArgs...)
output, err := cmd.CombinedOutput()
Expand Down Expand Up @@ -308,6 +309,8 @@ Note: Output can be filtered using the jq parameter.`,

cmdArgs = append(cmdArgs, args.Workflows...)

mcpLog.Printf("Executing compile tool: workflows=%v, strict=%v, fix=%v, zizmor=%v, poutine=%v, actionlint=%v",
args.Workflows, args.Strict, args.Fix, args.Zizmor, args.Poutine, args.Actionlint)
// Execute the CLI command
cmd := execCmd(ctx, cmdArgs...)
output, err := cmd.CombinedOutput()
Expand Down
6 changes: 6 additions & 0 deletions pkg/cli/run_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, engineOverride st
workflowID = wf.ID
if wf.State == "disabled_manually" {
wasDisabled = true
runLog.Printf("Workflow %s is disabled, temporarily enabling for this run (id=%d)", workflowIdOrName, wf.ID)
if verbose {
fmt.Println(console.FormatInfoMessage(fmt.Sprintf("Workflow '%s' is disabled, enabling it temporarily...", workflowIdOrName)))
}
Expand All @@ -130,9 +131,12 @@ func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, engineOverride st
}
cmd := workflow.ExecGH(enableArgs...)
if err := cmd.Run(); err != nil {
runLog.Printf("Failed to enable workflow %s: %v", workflowIdOrName, err)
return fmt.Errorf("failed to enable workflow '%s': %w", workflowIdOrName, err)
}
fmt.Println(console.FormatSuccessMessage(fmt.Sprintf("Enabled workflow: %s", workflowIdOrName)))
} else {
runLog.Printf("Workflow %s is already enabled (state=%s)", workflowIdOrName, wf.State)
}
}
}
Expand Down Expand Up @@ -161,6 +165,7 @@ func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, engineOverride st
// Check if the lock file exists in .github/workflows
lockFilePath = filepath.Join(".github/workflows", lockFileName)
if _, err := os.Stat(lockFilePath); os.IsNotExist(err) {
runLog.Printf("Lock file not found: %s (workflow must be compiled first)", lockFilePath)
suggestions := []string{
fmt.Sprintf("Run '%s compile' to compile all workflows", string(constants.CLIExtensionPrefix)),
fmt.Sprintf("Run '%s compile %s' to compile this specific workflow", string(constants.CLIExtensionPrefix), filename),
Expand All @@ -170,6 +175,7 @@ func RunWorkflowOnGitHub(workflowIdOrName string, enable bool, engineOverride st
suggestions,
))
}
runLog.Printf("Found lock file: %s", lockFilePath)
}

// Recompile workflow if engine override is provided (only for local workflows)
Expand Down
3 changes: 2 additions & 1 deletion pkg/workflow/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func generateMCPGatewaySteps(workflowData *WorkflowData, mcpServersConfig map[st
return nil
}

gatewayLog.Print("Generating MCP gateway steps")
gatewayLog.Printf("Generating MCP gateway steps: port=%d, container=%s, command=%s, servers=%d",
config.Port, config.Container, config.Command, len(mcpServersConfig))

var steps []GitHubActionStep

Expand Down
5 changes: 5 additions & 0 deletions pkg/workflow/repo_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (c *Compiler) extractRepoMemoryConfig(toolsConfig *ToolsConfig) (*RepoMemor

// Handle nil value (simple enable with defaults) - same as true
if repoMemoryValue == nil {
repoMemoryLog.Print("Using default repo-memory configuration (nil value)")
config.Memories = []RepoMemoryEntry{
{
ID: "default",
Expand All @@ -85,6 +86,7 @@ func (c *Compiler) extractRepoMemoryConfig(toolsConfig *ToolsConfig) (*RepoMemor
// Handle boolean value (simple enable/disable)
if boolValue, ok := repoMemoryValue.(bool); ok {
if boolValue {
repoMemoryLog.Print("Using default repo-memory configuration (boolean true)")
// Create a single default memory entry
config.Memories = []RepoMemoryEntry{
{
Expand All @@ -95,6 +97,8 @@ func (c *Compiler) extractRepoMemoryConfig(toolsConfig *ToolsConfig) (*RepoMemor
CreateOrphan: true,
},
}
} else {
repoMemoryLog.Print("Repo-memory disabled (boolean false)")
}
// If false, return empty config (empty array means disabled)
return config, nil
Expand Down Expand Up @@ -215,6 +219,7 @@ func (c *Compiler) extractRepoMemoryConfig(toolsConfig *ToolsConfig) (*RepoMemor
// Handle object configuration (single memory, backward compatible)
// Convert to array with single entry
if configMap, ok := repoMemoryValue.(map[string]any); ok {
repoMemoryLog.Print("Processing object-style repo-memory configuration (backward compatible)")
entry := RepoMemoryEntry{
ID: "default",
BranchName: generateDefaultBranchName("default"),
Expand Down
2 changes: 2 additions & 0 deletions pkg/workflow/runtime_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func DetectRuntimeRequirements(workflowData *WorkflowData) []RuntimeRequirement
// Add Python as dependency when uv is detected (uv requires Python)
if _, hasUV := requirements["uv"]; hasUV {
if _, hasPython := requirements["python"]; !hasPython {
runtimeSetupLog.Print("UV detected without Python, automatically adding Python runtime")
pythonRuntime := findRuntimeByID("python")
if pythonRuntime != nil {
updateRequiredRuntime(pythonRuntime, "", requirements)
Expand Down Expand Up @@ -405,6 +406,7 @@ func updateRequiredRuntime(runtime *Runtime, newVersion string, requirements map
existing, exists := requirements[runtime.ID]

if !exists {
runtimeSetupLog.Printf("Adding new runtime requirement: %s (version=%s)", runtime.ID, newVersion)
requirements[runtime.ID] = &RuntimeRequirement{
Runtime: runtime,
Version: newVersion,
Expand Down