Skip to content

feat(webui): wire run-on-this-issue dispatch (#1595)#1598

Merged
nextlevelshit merged 4 commits into
mainfrom
1595-dispatch-wiring
Apr 30, 2026
Merged

feat(webui): wire run-on-this-issue dispatch (#1595)#1598
nextlevelshit merged 4 commits into
mainfrom
1595-dispatch-wiring

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • Add POST /work/{forge}/{owner}/{repo}/{number}/dispatch handler that closes the work-item → run loop
  • Resolve matching worksource.Service bindings; 409 when none match, 400 when ambiguous (explicit pipeline form value disambiguates)
  • Serialize work_item_ref shared schema as run input so the persona has issue context
  • Launch via existing launchPipelineExecution path (no bypass of runner.BuildExecutorOptions)
  • Wire worksource.Service onto serverRuntime; ship round-trip tests asserting state-store run creation and schema-conformant input

Related to #1595

Changes

  • internal/webui/handlers_work_dispatch.go — new dispatch handler with binding lookup, pipeline disambiguation, work_item_ref injection
  • internal/webui/handlers_work_dispatch_test.go — round-trip tests covering happy path, 409 (no binding), 400 (ambiguous), explicit pipeline override
  • internal/webui/routes.go — register dispatch route
  • internal/webui/server.go — wire worksource.Service onto serverRuntime
  • specs/1595-dispatch-wiring/{spec,plan,tasks}.md — planning artifacts

Test Plan

  • go test ./internal/webui/... round-trip tests pass
  • State store records run with correct work_item_ref input
  • 409 returned when no binding matches
  • 400 returned when multiple bindings match without explicit pipeline param

nextlevelshit and others added 4 commits April 30, 2026 02:29
Add POST /work/{forge}/{owner}/{repo}/{number}/dispatch handler that resolves
matching worksource bindings, picks a pipeline (409 on zero, 400 on ambiguous,
explicit pipeline form value disambiguates), serializes the work_item_ref
shared schema as run input, and launches via the existing
launchPipelineExecution path.

Wires worksource.Service onto serverRuntime; ships round-trip tests asserting
state-store run creation and schema-conformant input.
@nextlevelshit nextlevelshit merged commit 828f28b into main Apr 30, 2026
9 checks passed
@nextlevelshit nextlevelshit deleted the 1595-dispatch-wiring branch April 30, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant