Repository navigation
Conversation
POST /api/experimental/organizations/{organization}/chat-automations/{automation}/runs
publishes the saved prompt of an enabled schedule automation immediately,
through the same Publish path as a scheduled occurrence but without one,
so the schedule cursor and revision stay unchanged and the automation
row is not written.
Only the owner can run an automation; organization admins and site
owners get 403. Webhook automations get 400 and disabled ones 409.
Admission refusals reuse the webhook responses (409 busy with skip or
target/model unavailable, 429 queue or automation share full). Chats a
new_chat automation creates are titled with the run time in the
schedule's time zone and audited like webhook-created chats.
Adds ChatAutomationRunResponse and ExperimentalClient.RunChatAutomation.
Name the concrete status codes in the Run now error mapper comment, and document in ARCHITECTURE.md that a target chat with no usable model and no default model gets 400, as a person's message does.
Run now reused the webhook detail "The automation skips events while the chat is busy." A busy chat with skip now gets a run-specific detail. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…le and delete Replaces the CODAGT-1209 TODO in ARCHITECTURE.md with prose: disable bumps the queue generation in an automation-only transaction and then deletes older queued rows through DeleteQueuedMessage as chatd; delete removes the automation row first and then its queued rows; the queue promotion guard discards any row the cleanup leaves behind. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
CI evidence for the exact head 25b8907: Why workflow_dispatch: GitHub creates no pull_request runs for this pushed stacked PR, and its mergeable state stays UNKNOWN. Generated with |
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main d9c13dc: no content conflicts; make gen produced no diff
Generated with |
ibetitsmike
left a comment
There was a problem hiding this comment.
Xum (an AI coding agent) prepared and posted this review on behalf of Mike. Each finding came from automated review passes and was re-verified against the code; please push back on anything that looks wrong.
Run now is small and matches CODAGT-1211: RunAutomation checks the owner before anything else, refuses webhook and disabled automations, and publishes through the shared admission path without an occurrence, so the schedule cursor and revision are never written. After re-verifying the reviewer findings against the code, none was worth asking you to fix.
Verdict: no blocking issues
Severity: P0 0, P1 0, P2 0, P3 0
Review coverage
- code-review Standards: 2 findings raised, 0 kept (the ARCHITECTURE.md prose is the author's to own per AGENTS.md; the duplicate response type follows the codersdk pattern of one response type per endpoint, and the frontend already uses it later in the stack)
- code-review Spec: 0 findings; status mapping, owner-only check, and new_chat audit match CODAGT-1211, CODAGT-1226, and the PRD
- frontend-review plus coder-frontend-review (generated
typesGenerated.tsonly): FE2 PASS, FE1 and FE3 to FE10 N/A, generated type naming and consistency PASS
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main 35abc22: no content conflicts; make gen produced no diff
Generated with |
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main d11809f: merged #30160
Generated with |
ibetitsmike
left a comment
There was a problem hiding this comment.
Xum re-reviewed this PR on behalf of @ibetitsmike using GPT-6.1 Sol (high) Exec subagents.
The inherited audit lifetime/request-ID and scanner-plumbing fixes are intact; #30166 has no outstanding prior issue or unanswered thread. New findings: Standards 0, Spec 0, Frontend 0. Final fresh-head logs show Run now, experiment-gate, webhook and selected lifecycle/admission tests passing in coderd (1.483s), chatd (1.386s) and chatstate (0.692s), with the saved layer diff verified. Disconnect survival is source-verified rather than regression-tested; full/required CI is unavailable in the snapshot and Pixel is pending, so this is not an all-CI-green verdict.
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
sync with main a328bee: merged #30160
Generated with |
ibetitsmike
left a comment
There was a problem hiding this comment.
Xum validated this PR and approved it on behalf of @ibetitsmike.
Validated head c537251a3654. Revalidated the replacement head after withholding approval of the superseded pin. The introducing-layer payload and Run now contracts remain unchanged; scoped project/store integration is sound. Fresh Run now and caller-gate tests passed on this exact head, and current required CI passed. Generated-only frontend changes introduce no new visual behavior; no Pixel approval or full-stack merge-readiness claim is made.
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
merged #30160
Generated with |
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
merged #30160
Generated with |
…agt-1211b-automations-run-now No conflicts. make gen produced no diff. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Generated with |
…ations-run-now Brings main ff158c0 into this layer. No conflicts. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…ations-run-now Brings the new_chat automation title source fix from #30134. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Closes CODAGT-1211. Part of CODAGT-1135.
Adds Run now for schedule automations:
POST /api/experimental/organizations/{organization}/chat-automations/{automation}/runspublishes the saved prompt at once through the existingPublishpath, with no occurrence. It never writes the automation row, so the schedule cursor and revision stay unchanged.chatd.RunAutomation(ctx, actorID, id)compares the caller with the automation owner before anything else, so org admins and site owners get 403 even though dbauthz lets them read and write the row (CODAGT-1226). A user who cannot read the automation gets 404, and the route sits behind the experiment gate, so a caller withchat-automationsoff gets 404.Publishalso checks the owner's experiment again.input_idandchat_id; 400 for a non-schedule automation; 409 for a disabled schedule, a busy chat with When busyskip, or an unavailable target or model; 429 when the chat queue or the automations' share of it is full; hook denials use the same response as chat messages.Tests
coderd/exp_chat_automation_runs_test.goruns against a real coderdtest server: the owner's run saves one message with the returned input id and leaves the whole automation row byte-equal; org admin and site owner get 403 (also on a webhook automation, proving the owner check comes first) and a non-reader gets 404, with nothing saved; webhook 400, disabled 409, busyskip409, queue share 429; new_chat title, owner, and audit entry. The experiment gate test covers the new route.Dogfood UAT ran on a real dev instance through Coder Agents and passed: immediate publish with the cursor and revision unchanged, 409/429 refusals, 403 for an org admin and the site owner, 404 with the experiment off, and a one-minute schedule that kept one message per minute around a Run now.
Size
About 325 hand-written lines (about 190 of them tests). Generated:
coderd/apidoc/docs.go,coderd/apidoc/swagger.json,docs/reference/api/schemas.md,site/src/api/typesGenerated.ts(213 lines).ARCHITECTURE.md prose was drafted by an agent at the user's request; the user will review it.
Also replaces the CODAGT-1209 ARCHITECTURE.md TODO from #30117; the prose was drafted by an agent at the user's request, and the user will review it.
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high