(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func TestPiEngine_GetExecutionSteps_Basic(t *testing.T) { |
| 179 | engine := NewPiEngine() |
| 180 | workflowData := &WorkflowData{ |
| 181 | Name: "test-workflow", |
| 182 | EngineConfig: &EngineConfig{ID: "pi"}, |
| 183 | ParsedTools: NewTools(map[string]any{}), |
| 184 | } |
| 185 | steps := engine.GetExecutionSteps(workflowData, "/tmp/gh-aw/agent-stdio.log") |
| 186 | require.Len(t, steps, 1, "Should produce exactly one execution step") |
| 187 | |
| 188 | stepText := strings.Join(steps[0], "\n") |
| 189 | assert.Contains(t, stepText, "Execute Pi CLI", "Step should be named 'Execute Pi CLI'") |
| 190 | assert.Contains(t, stepText, "--print", "Step should use --print flag (non-interactive mode)") |
| 191 | assert.Contains(t, stepText, "--mode json", "Step should use --mode json for structured JSONL output") |
| 192 | assert.NotContains(t, stepText, "pi run", "Step should not use the removed 'pi run' subcommand") |
| 193 | assert.NotContains(t, stepText, "--json-log", "Step should not use the removed --json-log flag") |
| 194 | assert.Contains(t, stepText, "agentic_execution", "Step should have agentic_execution id") |
| 195 | assert.Contains(t, stepText, "pi_provider.cjs", "Step should load the provider extension") |
| 196 | assert.Contains(t, stepText, "pi_steering_extension.cjs", "Step should automatically load the steering extension") |
| 197 | } |
| 198 | |
| 199 | func TestPiEngine_GetExecutionSteps_WithModel(t *testing.T) { |
| 200 | engine := NewPiEngine() |
nothing calls this directly
no test coverage detected