From 8f69d81756713d9d57ab74b3fbc295008c2b2c92 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 13 Aug 2025 15:56:14 +0000 Subject: [PATCH 1/4] update action version in GetExecutionConfig to v0.0.56 --- pkg/workflow/claude_engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/workflow/claude_engine.go b/pkg/workflow/claude_engine.go index a7802e29e0..0b085a6986 100644 --- a/pkg/workflow/claude_engine.go +++ b/pkg/workflow/claude_engine.go @@ -31,7 +31,7 @@ func (e *ClaudeEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHub func (e *ClaudeEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig) ExecutionConfig { config := ExecutionConfig{ StepName: "Execute Claude Code Action", - Action: "anthropics/claude-code-base-action@beta", + Action: "anthropics/claude-code-base-action@v0.0.56", Inputs: map[string]string{ "prompt_file": "/tmp/aw-prompts/prompt.txt", "anthropic_api_key": "${{ secrets.ANTHROPIC_API_KEY }}", From 8270e41f78f2f233183abe2d394daa89e60256f8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 13 Aug 2025 16:03:26 +0000 Subject: [PATCH 2/4] Add support for custom action versions in ClaudeEngine execution config --- pkg/workflow/claude_engine.go | 13 ++++++++- pkg/workflow/claude_engine_test.go | 42 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/pkg/workflow/claude_engine.go b/pkg/workflow/claude_engine.go index 0b085a6986..20c506868e 100644 --- a/pkg/workflow/claude_engine.go +++ b/pkg/workflow/claude_engine.go @@ -5,6 +5,11 @@ import ( "strings" ) +const ( + // DefaultClaudeActionVersion is the default version of the Claude Code base action + DefaultClaudeActionVersion = "v0.0.56" +) + // ClaudeEngine represents the Claude Code agentic engine type ClaudeEngine struct { BaseEngine @@ -29,9 +34,15 @@ func (e *ClaudeEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHub } func (e *ClaudeEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig) ExecutionConfig { + // Determine the action version to use + actionVersion := "beta" // Default version + if engineConfig != nil && engineConfig.Version != "" { + actionVersion = engineConfig.Version + } + config := ExecutionConfig{ StepName: "Execute Claude Code Action", - Action: "anthropics/claude-code-base-action@v0.0.56", + Action: fmt.Sprintf("anthropics/claude-code-base-action@%s", actionVersion), Inputs: map[string]string{ "prompt_file": "/tmp/aw-prompts/prompt.txt", "anthropic_api_key": "${{ secrets.ANTHROPIC_API_KEY }}", diff --git a/pkg/workflow/claude_engine_test.go b/pkg/workflow/claude_engine_test.go index c4b5a930ec..f46abaae0f 100644 --- a/pkg/workflow/claude_engine_test.go +++ b/pkg/workflow/claude_engine_test.go @@ -115,3 +115,45 @@ func TestClaudeEngineConfiguration(t *testing.T) { }) } } + +func TestClaudeEngineWithVersion(t *testing.T) { + engine := NewClaudeEngine() + + // Test with custom version + engineConfig := &EngineConfig{ + ID: "claude", + Version: "v1.2.3", + Model: "claude-3-5-sonnet-20241022", + } + + config := engine.GetExecutionConfig("test-workflow", "test-log", engineConfig) + + // Check that the version is correctly used in the action + expectedAction := "anthropics/claude-code-base-action@v1.2.3" + if config.Action != expectedAction { + t.Errorf("Expected action '%s', got '%s'", expectedAction, config.Action) + } + + // Check that model is set + if config.Inputs["model"] != "claude-3-5-sonnet-20241022" { + t.Errorf("Expected model 'claude-3-5-sonnet-20241022', got '%s'", config.Inputs["model"]) + } +} + +func TestClaudeEngineWithoutVersion(t *testing.T) { + engine := NewClaudeEngine() + + // Test without version (should use default) + engineConfig := &EngineConfig{ + ID: "claude", + Model: "claude-3-5-sonnet-20241022", + } + + config := engine.GetExecutionConfig("test-workflow", "test-log", engineConfig) + + // Check that default version is used + expectedAction := "anthropics/claude-code-base-action@beta" + if config.Action != expectedAction { + t.Errorf("Expected action '%s', got '%s'", expectedAction, config.Action) + } +} From a5ab0b2617bba1c5936dd0e082eb7a85a2c78e99 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 13 Aug 2025 16:08:41 +0000 Subject: [PATCH 3/4] Update ClaudeEngine to use DefaultClaudeActionVersion in execution config --- pkg/workflow/claude_engine.go | 2 +- pkg/workflow/claude_engine_test.go | 15 +++++++++------ pkg/workflow/codex_test.go | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkg/workflow/claude_engine.go b/pkg/workflow/claude_engine.go index 20c506868e..78769b6a9c 100644 --- a/pkg/workflow/claude_engine.go +++ b/pkg/workflow/claude_engine.go @@ -35,7 +35,7 @@ func (e *ClaudeEngine) GetInstallationSteps(engineConfig *EngineConfig) []GitHub func (e *ClaudeEngine) GetExecutionConfig(workflowName string, logFile string, engineConfig *EngineConfig) ExecutionConfig { // Determine the action version to use - actionVersion := "beta" // Default version + actionVersion := DefaultClaudeActionVersion // Default version if engineConfig != nil && engineConfig.Version != "" { actionVersion = engineConfig.Version } diff --git a/pkg/workflow/claude_engine_test.go b/pkg/workflow/claude_engine_test.go index f46abaae0f..261af2458f 100644 --- a/pkg/workflow/claude_engine_test.go +++ b/pkg/workflow/claude_engine_test.go @@ -1,6 +1,9 @@ package workflow -import "testing" +import ( + "fmt" + "testing" +) func TestClaudeEngine(t *testing.T) { engine := NewClaudeEngine() @@ -38,8 +41,8 @@ func TestClaudeEngine(t *testing.T) { t.Errorf("Expected step name 'Execute Claude Code Action', got '%s'", config.StepName) } - if config.Action != "anthropics/claude-code-base-action@beta" { - t.Errorf("Expected action 'anthropics/claude-code-base-action@beta', got '%s'", config.Action) + if config.Action != fmt.Sprintf("anthropics/claude-code-base-action@%s", DefaultClaudeActionVersion) { + t.Errorf("Expected action 'anthropics/claude-code-base-action@%s', got '%s'", DefaultClaudeActionVersion, config.Action) } if config.Command != "" { @@ -101,8 +104,8 @@ func TestClaudeEngineConfiguration(t *testing.T) { t.Errorf("Expected step name 'Execute Claude Code Action', got '%s'", config.StepName) } - if config.Action != "anthropics/claude-code-base-action@beta" { - t.Errorf("Expected action 'anthropics/claude-code-base-action@beta', got '%s'", config.Action) + if config.Action != fmt.Sprintf("anthropics/claude-code-base-action@%s", DefaultClaudeActionVersion) { + t.Errorf("Expected action 'anthropics/claude-code-base-action@%s', got '%s'", DefaultClaudeActionVersion, config.Action) } // Verify all required inputs are present @@ -152,7 +155,7 @@ func TestClaudeEngineWithoutVersion(t *testing.T) { config := engine.GetExecutionConfig("test-workflow", "test-log", engineConfig) // Check that default version is used - expectedAction := "anthropics/claude-code-base-action@beta" + expectedAction := fmt.Sprintf("anthropics/claude-code-base-action@%s", DefaultClaudeActionVersion) if config.Action != expectedAction { t.Errorf("Expected action '%s', got '%s'", expectedAction, config.Action) } diff --git a/pkg/workflow/codex_test.go b/pkg/workflow/codex_test.go index 45ac0b3f77..1a23a01d9b 100644 --- a/pkg/workflow/codex_test.go +++ b/pkg/workflow/codex_test.go @@ -1,6 +1,7 @@ package workflow import ( + "fmt" "os" "path/filepath" "strings" @@ -166,7 +167,7 @@ This is a test workflow. if !strings.Contains(lockContent, "Execute Claude Code Action") { t.Errorf("Expected lock file to contain 'Execute Claude Code Action' step but it didn't.\nContent:\n%s", lockContent) } - if !strings.Contains(lockContent, "anthropics/claude-code-base-action@beta") { + if !strings.Contains(lockContent, fmt.Sprintf("anthropics/claude-code-base-action@%s", DefaultClaudeActionVersion)) { t.Errorf("Expected lock file to contain Claude Code action but it didn't.\nContent:\n%s", lockContent) } // Check that prompt printing step is present From 1cb376604cbe51781e58e4e1ebd124763fe0e3dc Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 13 Aug 2025 16:08:57 +0000 Subject: [PATCH 4/4] Update Claude Code Action version to v0.0.56 in workflows --- .github/workflows/issue-triage.lock.yml | 2 +- .github/workflows/test-claude.lock.yml | 2 +- .github/workflows/weekly-research.lock.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue-triage.lock.yml b/.github/workflows/issue-triage.lock.yml index ef2b972bca..2830e312b8 100644 --- a/.github/workflows/issue-triage.lock.yml +++ b/.github/workflows/issue-triage.lock.yml @@ -212,7 +212,7 @@ jobs: echo '``````' >> $GITHUB_STEP_SUMMARY - name: Execute Claude Code Action id: agentic_execution - uses: anthropics/claude-code-base-action@beta + uses: anthropics/claude-code-base-action@v0.0.56 with: # Allowed tools (sorted): # - Bash(echo:*) diff --git a/.github/workflows/test-claude.lock.yml b/.github/workflows/test-claude.lock.yml index bc079df360..635c240c7d 100644 --- a/.github/workflows/test-claude.lock.yml +++ b/.github/workflows/test-claude.lock.yml @@ -226,7 +226,7 @@ jobs: echo '``````' >> $GITHUB_STEP_SUMMARY - name: Execute Claude Code Action id: agentic_execution - uses: anthropics/claude-code-base-action@beta + uses: anthropics/claude-code-base-action@v0.0.56 with: # Allowed tools (sorted): # - Glob diff --git a/.github/workflows/weekly-research.lock.yml b/.github/workflows/weekly-research.lock.yml index 39a1a3f554..d25ea6e088 100644 --- a/.github/workflows/weekly-research.lock.yml +++ b/.github/workflows/weekly-research.lock.yml @@ -182,7 +182,7 @@ jobs: echo '``````' >> $GITHUB_STEP_SUMMARY - name: Execute Claude Code Action id: agentic_execution - uses: anthropics/claude-code-base-action@beta + uses: anthropics/claude-code-base-action@v0.0.56 with: # Allowed tools (sorted): # - Bash(echo:*)