Commit Graph
2 Commits
Author SHA1 Message Date
Admin Bot 731e19cf26 fix: use query params for workflow_id in Poimen endpoints
CI / CI (pull_request) Successful in 2m17s
Root cause: ServiceAdapter dispatcher sets X-Upstream-Path to template
strings like /v1/poimen/executions/{id}/stream with literal {id}.
extractWorkflowID() returned '{id}' instead of the actual workflow ID.

Fix:
- All handlers read workflow_id from ?workflow_id=xxx query param
- Remove path param extraction (extractWorkflowID)
- Update spec paths: remove {id} segments, use flat resource paths
  /v1/poimen/executions/detail?workflow_id=xxx
  /v1/poimen/executions/stream?workflow_id=xxx
  /v1/poimen/executions/history?workflow_id=xxx
  /v1/poimen/executions/signal?workflow_id=xxx
- Exact path matching in ServeHTTP (no prefix/suffix matching)

API contract:
  GET  /v1/poimen/executions                         — list all
  GET  /v1/poimen/executions/detail?workflow_id=xxx   — describe one
  GET  /v1/poimen/executions/history?workflow_id=xxx  — event history
  GET  /v1/poimen/executions/stream?workflow_id=xxx   — SSE events
  POST /v1/poimen/executions/signal?workflow_id=xxx   — signal
  DELETE /v1/poimen/executions/detail?workflow_id=xxx  — terminate
2026-09-26 20:46:27 +08:00
Admin Bot 4487ac99b4 feat: add typed Poimen REST endpoints and wire workflow types (#32, #34)
CI / CI (pull_request) Canceled after 0s
- New internal/temporal/poimen.go: PoimenHandler with typed REST endpoints
  POST /v1/poimen/plan — call PlannerActivity (stub until workflows#23)
  POST /v1/poimen/execute — start DAG/Orchestrator/Routing workflows
  GET  /v1/poimen/executions — list Poimen workflow executions
  GET  /v1/poimen/executions/:id — describe execution
  GET  /v1/poimen/executions/:id/history — activity event history
  GET  /v1/poimen/executions/:id/stream — SSE events (delegates to sse.go)
  POST /v1/poimen/executions/:id/signal — pause/resume/cancel
  DELETE /v1/poimen/executions/:id — terminate workflow
- New internal/serviceadapter/poimen_adapter.go: ServiceAdapter spec + factory
- Wire PoimenHandler in cmd/gateway/main.go via ServiceAdapter registry
- Workflow type registry: dag->DAGWorkflow, orchestrator->OrchestratorWorkflow,
  routing->RoutingWorkflow (all on poimen-worker task queue)

Closes #32
Closes #34
2026-09-26 18:50:49 +08:00