feat(pr-review): operator/chat trigger queues a pr-review task

review_pr self-omitted since 7299b923 deleted the synchronous reviewer it
called. It is rebuilt on the task enqueue path everything else uses: the
tool resolves the identity's configured repo, then queues a pr-review task
naming the pull request through the workflow's declared pr_number input,
which is the same generic input mechanism a watched-repos binding uses.

That input has to reach the store with the task, so
EnqueueChatTaskRequest gains inputs_json and the tasks insert writes the
inputs column directly. StampTaskBinding no longer writes it: the insert is
now the column's only writer, and a chat task must not acquire binding
provenance just to carry an input.

ChatPRReviewer, its result shape and the reviewer wiring are deleted with
the path they served.
This commit is contained in:
sam committed 2026-09-28 18:24:36 +10:00
1 parent a6627954bd
commit 5c91575166
39 files changed
+227 -192

No files matched your search

+7 -3
View File
@@ -52,10 +52,14 @@ type Inbound struct {
// Workflow are optional -- empty means "the daemon's configured
// default for this identity".
type SpawnRequest struct {
Title string
Body string // operator instructions carried into the admitted task
Repo string // "owner/name"; empty = identity's default repo
Title string
Body string // operator instructions carried into the admitted task
Repo string // "owner/name"; empty = identity's default repo
// Workflow may name a workflow whose interface declares inputs
// (pr-review's pr_number, for instance). Inputs assigns them; a
// workflow that declares none ignores it.
Workflow string // empty = daemon's default workflow routing
Inputs map[string]any
Identity string // the identity spawning this task; propagated from Router.Identity
}
@@ -47,7 +47,7 @@ type TaskStore interface {
// poll, chat spawn, drain loop) do not acquire a binding-specific shape.
type TaskLifecycle interface {
EnqueueIssue(ctx context.Context, owner, repo string, number int, title, body, labels, identity string) (bool, error)
EnqueueChatTask(ctx context.Context, owner, repo, title, body, wf, identity string) (*task.Task, error)
EnqueueChatTask(ctx context.Context, owner, repo, title, body, wf, identity string, inputs map[string]any) (*task.Task, error)
ClaimNext(ctx context.Context) (*task.Task, error)
ClaimByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error)
Transition(ctx context.Context, taskID int64, from, to, detail string) error