(t *testing.T)
| 197 | } |
| 198 | |
| 199 | func TestPiEngine_GetExecutionSteps_WithModel(t *testing.T) { |
| 200 | engine := NewPiEngine() |
| 201 | workflowData := &WorkflowData{ |
| 202 | Name: "test-workflow", |
| 203 | EngineConfig: &EngineConfig{ID: "pi", Model: "copilot/claude-sonnet-4"}, |
| 204 | ParsedTools: NewTools(map[string]any{}), |
| 205 | } |
| 206 | steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/agent-stdio.log") |
| 207 | require.NotEmpty(t, steps, "Steps should not be empty") |
| 208 | |
| 209 | stepText := strings.Join(steps[0], "\n") |
| 210 | // When firewall is not enabled, Pi is invoked with the --model flag using the |
| 211 | // native github-copilot provider (Pi's built-in provider for GitHub Copilot). |
| 212 | assert.Contains(t, stepText, "--model", "Step should pass --model flag to Pi CLI") |
| 213 | assert.Contains(t, stepText, "github-copilot", "Non-firewall copilot model should use github-copilot/ provider prefix") |
| 214 | assert.Contains(t, stepText, "claude-sonnet-4", "Step should include the model ID portion") |
| 215 | assert.Contains(t, stepText, "GH_AW_PI_MODEL", "Step should expose the original workflow model to Pi extensions") |
| 216 | assert.NotContains(t, stepText, "\n PI_MODEL:", "Step should not set PI_MODEL in the environment when the CLI model is passed via --model") |
| 217 | } |
| 218 | |
| 219 | func TestPiEngine_GetExecutionSteps_IgnoresRedundantYoloArg(t *testing.T) { |
| 220 | engine := NewPiEngine() |
nothing calls this directly
no test coverage detected