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 — refactor(coderd): share chat updates with in-process callers by ethanndickson · Pull Request #30731 · coder/coder

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Oct 14, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

An in-process caller (say, a Slack bot) also needs to unarchive a chat before it sends to it, so this adds api.UpdateChatAsUser next to the send and interrupt functions from #30730. Like those, it's a Go method rather than an endpoint, and nothing calls it yet. It runs with the given user's own roles, so it can only do what that user could already do with PATCH /api/v2/chats/{chat}.

Rather than a narrow unarchive helper, it shares the whole PATCH handler body. The handler validates every field before it applies any of them, so a narrow copy would just duplicate that logic. It writes the same audit entry as the endpoint, and the endpoint's behaviour doesn't change.

Sorry, something went wrong.

Uh oh!

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

All reactions
@ethanndickson
ethanndickson added this pull request to stack #30732 October 14, 2026 01:32
@github-actions github-actions Bot assigned ethanndickson Oct 14, 2026
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-update-as-user branch from a80d0a5 to bde53ec Compare October 14, 2026 03:00
@ethanndickson

ethanndickson commented Oct 14, 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.

@ethanndickson

ethanndickson commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

@codex security 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 Oct 14, 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-10-16T06:40:02.868542Z bde53ec Draft marked ready
🔒 Security Review ✅ Completed 2026-10-14T03:13:19.501399Z bde53ec 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: bde53ec68c

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: bde53ec68c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ethanndickson
ethanndickson marked this pull request as ready for review October 16, 2026 06:36
@pr-queue-manager
pr-queue-manager Bot requested a review from jakehwll October 16, 2026 06:47
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-update-as-user branch from bde53ec to 88d55e2 Compare October 19, 2026 03:37
@pr-queue-manager
pr-queue-manager Bot requested review from ibetitsmike and removed request for jakehwll October 19, 2026 07:43
ibetitsmike
ibetitsmike approved these changes Oct 19, 2026
View reviewed changes
@ethanndickson ethanndickson mentioned this pull request Oct 19, 2026
feat: serve internal MCP servers to chats in process #29828
Merged
@linear-code

linear-code Bot commented Oct 21, 2026

Copy link
Copy Markdown

CODAGT-1098

All reactions

Sorry, something went wrong.

Uh oh!

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

@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-update-as-user branch 2 times, most recently from 0291dc8 to affbb23 Compare October 23, 2026 00:25
ethanndickson and others added 4 commits October 23, 2026 00:54
@ethanndickson
refactor(coderd): move the patchChat body into updateChat
757c2a7
Split patchChat like the send handler: checkUpdateChat runs the checks
that come before the body is read, and updateChat validates and applies
the request for a given caller. Both return response errors, so an
in-process caller can share them. The HTTP responses and audit entries
do not change.
@ethanndickson
feat(coderd): add UpdateChatAsUser
a6d4fda
UpdateChatAsUser updates a chat as a given user with the checks, errors,
and audit entry of PATCH /api/v2/chats/{chat}. An in-process caller can
then unarchive a chat before it sends a message, as the send endpoint
refuses an archived chat.
@ethanndickson
test(coderd): drop in-process update rows that replay shared checks
6569409
UnarchiveChatNotArchived replays TestUnarchiveChat/NotArchived through
the shared update body, and UpdateAuditOnFailure already makes the same
call. UnarchiveReadOnlyMember proves more than UnarchiveOtherUsersChat:
it fails when checkUpdateChat is skipped and when the call runs as the
system.
@ethanndickson
chore(coderd): trim comments on the in-process chat update path
5fd333a
@ethanndickson
ethanndickson force-pushed the ethanndickson/chat-update-as-user branch from affbb23 to 5fd333a Compare October 23, 2026 00:57
@ethanndickson
ethanndickson merged commit 9d5f0cd into main Oct 23, 2026
36 of 56 checks passed

Uh oh!

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

@ethanndickson
ethanndickson deleted the ethanndickson/chat-update-as-user branch October 23, 2026 01:53
ethanndickson added a commit that referenced this pull request Oct 23, 2026
@ethanndickson
feat: serve internal MCP servers to chats in process (#29828)
15a160a
This lets coderd give a chat MCP tools that it serves itself, in
process. The first user will be an in-process integration, say a Slack
bot. Nothing uses it yet.

coderd now takes a list of internal MCP servers when it's built, each
with a slug and a `ServerForChat` function. At every step, chatd asks
each one for a server for the chat and connects to it over an in-memory
transport, so the server knows which chat it's serving without any
headers. Nothing is stored on the chat, so the public API doesn't
change, and the chat owner can't remove an internal server.

As only coderd can add one, internal servers ignore the
`chat-inline-mcp-servers` experiment and the
`--disable-chat-caller-supplied-tools` kill switch. Their tools come
straight after the built-in tools, so they win any name clash with
admin, workspace or caller tools. Admin and workspace tools now follow
the same first-wins rule, so the model never sees two tools with the
same name. If `ServerForChat` returns an error, we fail the turn, as we
do when any other read during turn setup fails.

I've put this on top of #30730 and #30731 in the stack. It doesn't need
anything from them, but the Slack bot needs all three.
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@ibetitsmike ibetitsmike ibetitsmike approved these changes

Uh oh!

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

Assignees

@ethanndickson ethanndickson

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

@ethanndickson @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.