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

+2 -2
View File
@@ -355,7 +355,7 @@ func TestStateStoreRealProcessSmoke(t *testing.T) {
// Combined task/event/capture view: a task, an event on that task, and an
// unrelated capture written through one consumer, read back across all
// three surfaces in a single pass (the dashboard/observability read path).
task, err := cl.EnqueueChatTask(ctx, "acme", "widget", "verify state store", "body", "implement", "")
task, err := cl.EnqueueChatTask(ctx, "acme", "widget", "verify state store", "body", "implement", "", nil)
if err != nil || task == nil {
t.Fatalf("EnqueueChatTask = %+v, %v", task, err)
}
@@ -485,7 +485,7 @@ func TestStateStoreRealProcessRestartRecovery(t *testing.T) {
first := startStateStoreProcess(t, bin, cfg)
s1 := dial(t, first.addr)
task, err := s1.EnqueueChatTask(t.Context(), "acme", "widget", "survive restart", "body", "implement", "")
task, err := s1.EnqueueChatTask(t.Context(), "acme", "widget", "survive restart", "body", "implement", "", nil)
if err != nil || task == nil {
t.Fatalf("first EnqueueChatTask = %+v, %v", task, err)
}
+1 -1
View File
@@ -52,7 +52,7 @@ func recoveryFixture(t *testing.T) (string, *pgstore.TaskDB) {
// seedTask writes one task so the database holds more than its settings.
func seedTask(t *testing.T, st *pgstore.TaskDB, title string) {
t.Helper()
if _, err := st.EnqueueChatTask(t.Context(), "acme", "widget", title, "body", "implement", ""); err != nil {
if _, err := st.EnqueueChatTask(t.Context(), "acme", "widget", title, "body", "implement", "", nil); err != nil {
t.Fatalf("seed task %q: %v", title, err)
}
}