ci / test (push) Failing after 1m2s
Rewrite OrchestratorWorkflow as true reconciliation loop: - PlanningActivity decides what tasks to dispatch - Fan-out TaskUnit workflows for parallel execution - Each TaskUnit runs Implementer → Test → Judge → Commit - Judge reviews code quality, retries on failure with lessons - Fan-in waits for all TaskUnits - Board update and squash merge on success - continue-as-new for long-running workflows - Proper error handling and signal support Key changes: - statemachine/orchestrator.go: Reconciliation loop (Plan → Dispatch → Review → Repeat) - statemachine/taskunit.go: Task execution with retry loop & judge review - statemachine/types.go: Updated TaskUnitInput/Output for new workflow - cmd/worker/main.go: Register RunIntegrationTestActivity - action/integration.go: Renamed from integration_test.go (fix Go build issue) Models: - Planner: reasoning (OpenAI-compatible from local LLM API) - Judge: reasoning (reviews diff + tests, gates success) - Implementer: ornith:35b (executes tasks) Verification: go build ./cmd/worker ./cmd/starter ✓
44 lines
1.0 KiB
Go
44 lines
1.0 KiB
Go
package action
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
)
|
|
|
|
// RunIntegrationTestInput is input to RunIntegrationTestActivity.
|
|
type RunIntegrationTestInput struct {
|
|
WorktreePath string
|
|
TestCmd string
|
|
}
|
|
|
|
// RunIntegrationTestOutput is the output of RunIntegrationTestActivity.
|
|
type RunIntegrationTestOutput struct {
|
|
Passed bool
|
|
Logs string
|
|
}
|
|
|
|
// RunIntegrationTestActivity runs integration tests in the worktree.
|
|
func RunIntegrationTestActivity(ctx context.Context, in RunIntegrationTestInput) (RunIntegrationTestOutput, error) {
|
|
if in.TestCmd == "" {
|
|
// No test command, assume pass
|
|
return RunIntegrationTestOutput{Passed: true, Logs: "No test command provided"}, nil
|
|
}
|
|
|
|
// Run test command
|
|
cmd := exec.CommandContext(ctx, "sh", "-c", in.TestCmd)
|
|
cmd.Dir = in.WorktreePath
|
|
|
|
output, err := cmd.CombinedOutput()
|
|
if err != nil {
|
|
return RunIntegrationTestOutput{
|
|
Passed: false,
|
|
Logs: string(output) + "\nError: " + err.Error(),
|
|
}, nil
|
|
}
|
|
|
|
return RunIntegrationTestOutput{
|
|
Passed: true,
|
|
Logs: string(output),
|
|
}, nil
|
|
}
|