Skip to content

feat(coderd/database): add the chatd.chat_todos node and its fork queries - #32

Merged
ibetitsmike merged 2 commits into
mainfrom
mike/todo-transcripts-1-todo-table
Nov 9, 2026
Merged

ibetitsmike merged 2 commits into
mainfrom
mike/todo-transcripts-1-todo-table

Conversation

@ibetitsmike

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Part of #10.

Adds the storage for the chat todo list (PRD R6.1, R6.2). The tools that write it come in the next PR of the stack.

  • New chatdmig node chat_todos after chat_subagents: one row per chat, items is the whole list as a JSON array, version starts at 1 and grows on every write so readers can order events. The row goes away with its chat.
  • forkdb queries GetChatTodosByChatID and UpsertChatTodos, generated by forkdb/generate.sh.
  • dbauthz: the read authorizes as a read of the owning chat, the upsert as an update of it, like chat_subagents. dbmetrics measures both.
  • Tests: a forkdb test (no row, versions 1 and 2, replace, cascade on chat delete) and two TestForkQuerier cases.

No upstream file changes. dump.sql, queries.sql.go, querier.go and dbmock are untouched. Nothing reads or writes the table until the experiment fork-chat-todos (next PR) is on.

Validation: chatdmig check lists the node after chat_subagents, chatdmig tests, a second generate.sh run leaves no drift, forkdb and dbauthz tests pass against Postgres 17.

…ries

Adds the chat_todos chatdmig node, the GetChatTodosByChatID and
UpsertChatTodos fork queries, and their dbauthz and dbmetrics wrappers.
The todo list authorizes through its chat like chat_subagents.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T07:29:33.186776Z ebb62e6 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.

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

Copy link
Copy Markdown

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: bc50e8d710

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

chatd.chat_todos adds chat-associated data that the state taxonomy in ARCHITECTURE.md does not list yet. The architecture owner decides where it belongs.
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

Addressed the Codex P1 in ebb62e6: ARCHITECTURE.md now has a TODO in the state taxonomy section for the architecture owner to classify chatd.chat_todos. Prose left to the owner per the chatd rule.

@codex review

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

Copy link
Copy Markdown

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: ebb62e647d

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

Comment thread coderd/x/chatd/ARCHITECTURE.md Resolved
@ibetitsmike
ibetitsmike merged commit d7d3cf3 into main Nov 9, 2026
9 checks passed
@ibetitsmike
ibetitsmike deleted the mike/todo-transcripts-1-todo-table branch November 9, 2026 07:43
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merged as d7d3cf3 after checking the exact head ebb62e6: fork-ci green (run 42579375416), Codex reviewed with 0 unresolved threads, and UAT passed on bc50e8d, which differs from the head only by the ARCHITECTURE.md TODO. Open owner item for @ibetitsmike: classify chatd.chat_todos as execution state or metadata in coderd/x/chatd/ARCHITECTURE.md (TODO(fork-chat-todos)).

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