Files
poimen-workflows/activity/judge.go
T
Test 9ec7e6a344 refactor: rename action→activity, statemachine→workflow, remove HTTP API layer
- action/ → activity/ (Temporal activities)
- statemachine/ → workflow/ (Temporal workflows)
- Removed internal/api/ and cmd/server/ (api-gw handles HTTP, Temporal is the API)
- Created pkg/types/types.go as single source of truth for all shared types
- Extracted CallRoleLLM helper (DRY: implementer/planner/judge shared pattern)
- Fixed circular import: workflow_graph_query uses string activity names
- Fixed logger.logf → logger.Info/Warn (method didn't exist)
- Fixed routing types: added Branches, Activity, BackoffSeconds, TaskActivity
- Fixed db.Canvas.Name, db.Client→DB, GetWorkflow→FetchWorkflow
- Removed unused imports
- All tests pass, build clean, vet clean
2026-09-05 23:59:13 -07:00

33 lines
704 B
Go

package activity
import (
"context"
"github.com/rockliang/poimen/workflows/pkg/types"
)
type JudgeInput struct {
Config types.OrchestratorConfig
Diff string
IntegrationTestLogs string
}
type JudgeOutput struct {
Verdict string
Critique string
}
func JudgeActivity(ctx context.Context, in JudgeInput) (JudgeOutput, error) {
response, err := CallRoleLLM(ctx, in.Config, "judge", map[string]any{
"SystemPrompt": in.Config.SystemPrompt,
"Diff": in.Diff,
"TestResult": in.IntegrationTestLogs,
})
if err != nil {
return JudgeOutput{}, err
}
// TODO: parse LLM response for verdict
return JudgeOutput{Verdict: "pass", Critique: response}, nil
}