GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(coderd): run chat automation schedules by ThomasK33 · Pull Request #30160 · coder/coder

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Part of CODAGT-1211. Part of CODAGT-1135.

Stack: PR 7a of "Automations for Coder Agents", on top of 1210 5b (#30134, tk/codagt-1210b-automations-new-chat). Run now (POST .../runs) is split into PR 7b (#30166) on top of this one, which closes CODAGT-1211.

Schedule automations now run. Every coderd instance scans for due schedules at start and every 30 seconds, and publishes each occurrence through the existing Publish paths (existing_chat SendMessage(queue) and new_chat Create, with their AdmitInTx callbacks). There is no second admission path.

How a scan works

  1. An unlocked read returns enabled schedule automations whose cursor (schedule_next_run_at) is due, in pages of 500 by (cursor, id) until a short page. It leaves out inactive or deleted owners and existing_chat targets that are gone or archived.
  2. The chat-automations experiment is evaluated once per owner per tick, outside any callback. Owners with it off are dropped without a cursor write. Publish checks the experiment for the owner again before the transaction (webhooks map that refusal to 404, like the handler's own check).
  3. A cursor more than 60 seconds (the grace window) old is missed: a guarded write moves it to the next future time, nothing is published, and nothing is replayed.
  4. Otherwise Publish runs (up to eight occurrences at once, so one slow hook or lock wait does not hold back the rest) with the observed revision and cursor. The pre-check refuses a stale or expired occurrence before any hook runs. Under the chat and automation locks, the callback requires the same revision and cursor, reads the clock after the locks, requires the occurrence to be due and within grace, and moves the cursor to the first cron time after that read in the same transaction.
  5. A busy chat with skip, a full queue or automation share, a hook denial, lost permission, or an occurrence that expired while waiting for a lock skips the occurrence with the same guarded write and an info log. A stale, disabled, or deleted automation is left alone. Other errors keep the cursor, so the next scan retries within grace. That includes an experiment-off refusal from Publish, because the evaluator also reports a failed read as off.

New chats created by a schedule are titled with the occurrence's scheduled time in the schedule's time zone, for example Tokyo digest 2026-09-30 08:14 JST (the ticket says acceptance time; the two differ by at most the grace window, and the scheduled time cannot drift across a minute while hooks or locks run). Webhook titles stay in UTC. Each such chat gets an audit entry as created by the automation owner, with the automation and input ids, like the chats the webhook endpoint creates.

Decisions reviewers should check

  • Clock (deviates from the ticket's "fresh database clock"). The callback reads the injected quartz clock after the chat and automation locks are held, not transaction-start now(). The ticket also requires fake-clock tests, and the lower layers already read the clock after locks. Exactly-once rests on the revision and cursor tuple, not on time. Inter-instance clock skew cannot cause a double acceptance or a replay: an acceptance commits only together with the conditional cursor write under the automation lock, and every cursor write moves the cursor strictly forward (advanceAutomationSchedule refuses a next run at or before the cursor). A clock that is off by d only shifts the acceptance window to [cursor-d, cursor+grace+d] in true time; a clock that runs ahead can skip occurrences within d. See the comment on checkAutomationOccurrence and the CursorOnlyMovesForward test. Swapping in clock_timestamp() later is a one-line change.
  • Authorization of the cursor write. AdvanceChatAutomationScheduleCursor follows the object pattern of ConsumeChatAutomationWebhookByID and UpdateChatAutomationByID: the dbauthz wrapper loads the automation and authorizes update on it. The scanner and the callback call it as chatd, so the chatd subject gains update on chat_automation (it already had read). This is the smallest grant; chatd still cannot create or delete automations (pinned in TestAsChatd), and owner-only changes stay in the chatd automation service. No 1207 migration is touched.
  • Narrow write. The query sets only schedule_next_run_at and updated_at, guarded by id, kind = 'schedule', enabled, the observed schedule_revision, and the observed cursor. It never touches owner-controlled fields or the revision.
  • Known limitation (CODAGT-1234). Two replicas that read the same due row can both reach the user_prompt_submit hook before one loses under the lock; only one message or chat commits. This matches the lower layer's best-effort unlocked pre-check for webhooks. A claim-first cursor move would break the ticket's retry-within-grace rule or the forward-only cursor, so a lease column is proposed as a follow-up.
  • The schedule tests run their servers through dbauthz, so they use the chatd subject's real permissions (they fail without the grant).

Tests

coderd/x/chatd/automation_schedules_internal_test.go uses a mock clock, real Postgres, and a second connection that holds row locks (waiting on pg_stat_activity): two instances accept one occurrence (existing_chat, and new_chat with no orphan chat); busy skip, automation share full, and queue full each advance the cursor once; a cron edit rolls back an in-flight acceptance; restart after missed intervals publishes nothing, restart within grace accepts once; previews match accepted runs; an occurrence that expires while waiting for a lock is not accepted; a DST change keeps 09:00 wall-clock time; the experiment off gets no run (scan and Publish); the cursor only moves forward; the loop scans at start.

Dogfood UAT ran on a real dev instance through Coder Agents and passed: a one-minute schedule delivered one message per minute with no browser open, a busy chat skipped its occurrence, disable stopped runs and re-enable did not replay, new_chat titles used Asia/Tokyo, two coderd instances produced no duplicates, and downtime was not replayed.

Size

About 994 hand-written lines (about 560 of them tests). Generated: queries.sql.go, querier.go, dbmetrics, dbmock (181 lines).

ARCHITECTURE.md prose was drafted by an agent at the user's request; the user will review it.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
ThomasK33 added 3 commits September 29, 2026 22:18
@ThomasK33
feat(coderd): run chat automation schedules
fefeee9
Every coderd instance now scans for due schedule automations at start
and every 30 seconds. The scan reads due rows without locks, decides
the chat-automations experiment once per owner, and treats occurrences
older than a 60 second grace window as missed: it moves the cursor to
the next cron time and publishes nothing. Other occurrences are
published with the observed schedule revision and cursor. The admission
callback rechecks both under the chat and automation locks, reads the
clock after the locks, and moves the cursor in the same transaction, so
exactly one instance accepts each occurrence.

Refusals (busy chat with skip, full queue or automation share, hook
denial, lost permission, experiment off, expired occurrence) skip the
occurrence with the same conditional cursor write; other errors retry
within the grace window. Publish now checks the experiment for every
publisher, and new chats of schedule automations are titled in the
schedule's time zone.

Part of CODAGT-1211.
@ThomasK33
fix(coderd): authorize chatd schedule cursor writes on the automation
dd1d9e9
The schedule loop's guarded cursor write is now authorized like other
object writes: the dbauthz wrapper loads the automation and requires
update on it. The chatd subject gains update on chat_automation (read
already existed); owner-only changes stay in the chatd automation
service, and chatd still cannot create or delete automations.

The cursor now only moves forward, and a comment explains why clock
skew between instances cannot accept an occurrence twice or replay one.
The schedule tests run their servers through dbauthz, so they exercise
the chatd subject's real permissions.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
Merge remote-tracking branch 'origin/tk/codagt-1210b-automations-new-…
0787d08
…chat' into tk/codagt-1211-automations-schedules

# Conflicts:
#	coderd/x/chatd/automations_publish.go
@linear-code

linear-code Bot commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CODAGT-1135

CODAGT-1211

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned ThomasK33 Sep 30, 2026
@ThomasK33
ThomasK33 added this pull request to stack #30097 September 30, 2026 00:48
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge remote-tracking branch 'origin/tk/codagt-1210b-automations-new-…
d4b00aa
…chat' into tk/codagt-1211-automations-schedules
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T01:58:29.423477Z 0514751 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
feat(coderd/x/chatd): audit chats that new_chat schedules create
84dd44b
A chat created through the chat API or by a webhook event records an
audit entry. A chat that a new_chat schedule creates now records one
too, as created by the automation owner, with the automation and input
ids in the additional fields.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0787d0896b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/x/chatd/automation_schedules.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/x/chatd/automation_schedules.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/x/chatd/automation_schedules.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/x/chatd/automation_schedules.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
fix(coderd/x/chatd): page through due schedules and retry experiment …
d355630
…refusals

The scan read one page of 500 due schedules per tick. Rows that stay
due, such as those of owners with the experiment off, stayed first in
every page and could hide all other schedules, and a large burst could
wait past the grace window. The scan now pages by (cursor, id) until a
page comes back short.

A Publish refusal because the experiment is off for the owner no longer
skips the occurrence: the evaluator also reports a failed read as off,
so the cursor stays for a retry within the grace window, and the next
scan drops an owner whose experiment really is off.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Sep 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d35563001a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/x/chatd/automation_schedules.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread coderd/x/chatd/automations_publish.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
fix(coderd/x/chatd): publish schedule occurrences concurrently
0514751
A scan published due occurrences one at a time, so an occurrence that
waited for a chat lock or a slow hook held back every later schedule,
which could then expire past the grace window. The scan now publishes
up to eight occurrences at once and returns when all are done.

A chat that a new_chat schedule creates is now titled with its
occurrence's scheduled time, which does not depend on how long hooks
and locks take before acceptance.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 05147512b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
chore(coderd/x/chatd): retrigger CI for the stacked PR
d483cd5
GitHub created no pull_request runs for the last two pushes while the
PR mergeability stayed unknown. This commit changes no files.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33 ThomasK33 closed this Sep 30, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 30, 2026
@ThomasK33 ThomasK33 reopened this Sep 30, 2026
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

CI note: GitHub has not created ci pull_request runs for this PR since 84dd44b. The GraphQL mergeable field stays UNKNOWN and refs/pull/30160/merge is stuck at the 84dd44b merge, although the base (78e128c) is an ancestor of the head. An empty commit (d483cd5, same tree as 0514751, which has the clean review verdict) did not help. With the stack coordinator's approval I closed and reopened this draft at 02:23Z; the stack still lists this PR, but after 12 minutes there is still no ci run and mergeability is still unknown. Waiting for the coordinator before trying anything else.

Local gates on every pushed head: make pre-commit (gen, fmt, lint) and the full make pre-push test suite passed.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 30, 2026
feat: add Run now for schedule chat automations #30166
Merged
feat: label automation messages in agent chats #30167
Merged
feat: add the Agents automations list page and chat-list automation filter #30171
Merged
@ThomasK33

ThomasK33 commented Sep 30, 2026

Copy link
Copy Markdown
Member Author

CI evidence for the exact head d483cd5: ci workflow_dispatch run https://github.com/coder/coder/actions/runs/36684157820 passed, including required.

Why workflow_dispatch: GitHub creates no pull_request runs for this pushed stacked PR, and its mergeable state stays UNKNOWN.

Attempt 1 failed only in test-go-pg (macos-latest): every test passed, but goleak found a leftover net/http keep-alive goroutine in the cli package, which this PR does not touch. The rerun of the failed jobs (attempt 2) passed.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main d9c13dc) into tk/cod…
f6d5075
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main d9c13dc: no content conflicts; make gen produced no diff

  • Head: f6d5075aedc215c70db0d336c02ec390d41fb3b1
  • CI run (workflow_dispatch): https://github.com/coder/coder/actions/runs/36829270042

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
ThomasK33 marked this pull request as ready for review October 1, 2026 09:38
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main 35abc22) into tk/cod…
e057356
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main 35abc22: no content conflicts; make gen produced no diff

  • Head: e057356f9a8b10776278f6bb90e05fdb98ef82d0
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36853248741

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coder coder unlocked this conversation Oct 1, 2026
ibetitsmike
ibetitsmike reviewed Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

The schedule scanner matches the CODAGT-1211 scan requirements for this layer: an unlocked keyset-paged due read, per-owner experiment evaluation, a guarded forward-only cursor write, the skip versus retry split, and fake-clock tests for every required check. go test ./coderd/x/chatd -run TestAutomationSchedule passes locally at this head (all 19 TestAutomationScheduleScan subtests, nested ones included, plus TestAutomationScheduleLoopScansAtStart). Only small nits remain.

Verdict: no blocking issues

Severity: P0 0, P1 0, P2 0, P3 2 (1 inline, 1 below)

Nits:

  • coderd/x/chatd/automation_schedules.go:135-137: scanAutomationSchedules only forwards automationScheduleBatchSize to scanAutomationSchedulePages so tests can pass a smaller page. The worker already handles this with an option and a default (ArchiveBatchSize, and this PR's AutomationScheduleInterval). An AutomationScheduleBatchSize option would remove the wrapper and follow that pattern.
Review coverage
  • code-review Standards: 3 findings. 1 kept (detached doc comment), 1 folded as a nit (batch size wrapper), 1 dropped (ARCHITECTURE.md section: AGENTS.md says reviewers treat changes to that document as the owner's work, and the PR body says the author asked for the prose)
  • code-review Spec: 1 finding, dropped (the same ARCHITECTURE.md point); all scan requirements and required checks for layer 7a are met, and Run now is in #30166
  • frontend-review: skipped, no files under site/
  • coder-frontend-review: skipped, no files under site/
  • Existing Codex threads (6, all resolved): fixes verified at this head; CODAGT-1234 tracks the deferred hook double-dispatch

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/x/chatd/automation_schedules.go Outdated
Comment on lines +72 to +73
// clock that runs ahead can skip the occurrences within d of true time.

@ibetitsmike ibetitsmike Oct 1, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Blank line detaches the doc comment from checkAutomationOccurrence

The blank line at 73 separates the 15-line comment from the function, so go/doc and editors do not treat it as the function's doc comment. Hovering checkAutomationOccurrence then hides the clock-skew argument that the PR body points reviewers to. This is still the case at the top of the stack (#30220).

Fix: Delete the blank line.

Suggested change
// clock that runs ahead can skip the occurrences within d of true time.
// clock that runs ahead can skip the occurrences within d of true time.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ThomasK33 ThomasK33 Oct 1, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 67db54f: the blank line is gone, so the comment documents checkAutomationOccurrence again. The same commit replaces the batch-size wrapper with an AutomationScheduleBatchSize worker option (default 500), matching AutomationScheduleInterval and ArchiveBatchSize.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ThomasK33 added 2 commits October 1, 2026 16:00
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main d11809f) into tk/cod…
7971eb5
…agt-1211-automations-schedules

Resolved two conflicts. ARCHITECTURE.md: kept main's new auto-archive
paragraphs under the Auto-archive loop heading and this layer's
Automation schedule loop section after them. options.go: kept this
layer's AutomationScheduleInterval and main's HeartbeatRenewalTimeout and
HeartbeatLockTimeout. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
refactor(coderd/x/chatd): make the automation schedule batch size an …
67db54f
…option

Replace the scanAutomationSchedules batch-size wrapper with a worker
option, AutomationScheduleBatchSize, defaulting to 500, and attach the
checkAutomationOccurrence doc comment to its function.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main d11809f: merged #30134 (resolved ARCHITECTURE.md and options.go next to main's heartbeat options); attached the checkAutomationOccurrence doc comment and made the schedule batch size a worker option (Mike's review)

  • Head: 67db54f805ea2e0ff9323d5a4e466c56875cccd6
  • CI run (workflow_dispatch): https://github.com/coder/coder/actions/runs/36889836514

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike
ibetitsmike reviewed Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xum re-reviewed this PR on behalf of @ibetitsmike using GPT-6.1 Sol (high) Exec subagents.

Both prior Mike nits are fixed; the doc thread is still marked open, and duplicate hooks remain acknowledged and deferred.
New findings: Standards 1 nonblocking P3, Spec 0, Frontend 0 (no own-layer site changes).
Verified fresh delta logs pass schedule/startup, cursor authorization, shared webhook, selected heartbeat/archive/chatstate, and three-repeat concurrency/paging tests.
No extra suites or race run were performed; custom worker/tick coverage remains source-only, and fresh required CI completion is not captured (Pixel pending).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread coderd/x/chatd/automation_schedules_internal_test.go Outdated
@@ -0,0 +1,699 @@
package chatd //nolint:testpackage // Runs the unexported schedule scan directly.

@ibetitsmike ibetitsmike Oct 1, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Remove the prohibited internal-test suppression

.claude/docs/TESTING.md:58-65 explicitly prohibits //nolint:testpackage; the existing _internal_test.go suffix already exempts this file. This adds a redundant per-file lint exception contrary to the documented convention, not a runtime defect. Keep package chatd and remove the directive and its justification.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ThomasK33 ThomasK33 Oct 1, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e31492f: the file now starts with plain package chatd; the _internal_test.go suffix already exempts it from testpackage. The same directive in automations_tool_internal_test.go (#30214) gets the same fix.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ThomasK33 added 2 commits October 1, 2026 19:00
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main a328bee) into tk/cod…
8b43e65
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
test(coderd/x/chatd): drop the testpackage suppression from the sched…
e31492f
…ule scan test

The _internal_test.go suffix already exempts the file from testpackage,
and .claude/docs/TESTING.md prohibits the per-file directive.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

sync with main a328bee: merged #30134; removed the testpackage suppression from the schedule scan test (Mike's review)

  • Head: e31492f376fb2d2f44595148742fdd5e9eb190cc
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36911427379

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ibetitsmike
ibetitsmike approved these changes Oct 1, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xum validated this PR and approved it on behalf of @ibetitsmike.

The reported test-package suppression is removed. The current layer preserves the earlier fixes and explicitly accepted follow-ups.

Validation: the previously completed, uncached schedule scan/startup and schedule authorization tests passed on this exact unchanged head. I rechecked the live layer diff and scope. The author-triggered CI rerun now passes, including test-go-race-pg and required.

This approval covers this layer at the pinned commit, not unresolved findings elsewhere in the stack. No new remote UAT or full local suite was run during this follow-up.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main 15382eb) into tk/cod…
4a18d06
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30134

  • Head: 4a18d064af032cc564004cc57adfb6b09e3b7ead
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36944917273

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main 15382eb) into tk/cod…
a7a510c
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30134

  • Head: a7a510c723142538fe1df9455534a231d7d2fd40
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36951954945

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ThomasK33
Merge tk/codagt-1210b-automations-new-chat (main dc07908) into tk/cod…
d72e1b9
…agt-1211-automations-schedules

No conflicts. make gen produced no diff.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33

ThomasK33 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

merged #30134 (main dc07908)

  • Head: d72e1b9d5c757f654b7da4b7d4abbeb53145e9a9
  • CI run (pull_request): https://github.com/coder/coder/actions/runs/36969706858

Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ThomasK33 added 2 commits October 2, 2026 14:06
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat into tk/codagt-1211-automa…
21bc13e
…tions-schedules

Brings main ff158c0 into this layer. No conflicts.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
@ThomasK33
Merge tk/codagt-1210b-automations-new-chat into tk/codagt-1211-automa…
549f506
…tions-schedules

Brings the new_chat automation title source fix from #30134. Resolved
automations_publish.go: this layer's automationNewChatTitle call keeps
the new TitleSource line.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
ibetitsmike
ibetitsmike approved these changes Oct 2, 2026
View reviewed changes

@ibetitsmike ibetitsmike left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xum validated this PR and approved it on behalf of @ibetitsmike.

Revalidated head 549f50621744 against base 7f5d2aa18e6b. Independent Standards and Spec renewal found no new blockers; the original accepted exclusions remain unchanged.

Re-reviewed scheduler contracts and the inherited title-source change. Schedule, scheduler-grant and authorization checks passed; the concurrency regression passed under race with count=3.

Approval is scoped to this layer and the reviewed inherited interactions. No full-repository suite, fresh Pixel screenshots or remote UAT claimed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ThomasK33
ThomasK33 merged commit 8620361 into main Oct 2, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 2026
@ThomasK33
ThomasK33 deleted the tk/codagt-1211-automations-schedules branch October 2, 2026 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@ibetitsmike ibetitsmike ibetitsmike approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ThomasK33 ThomasK33

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ThomasK33 @ibetitsmike
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.