Skip to content

test(coderd): run the TestPostChats workspace, input, and MCP rejections on one server - #30976

Draft
ibetitsmike wants to merge 2 commits into
mike/coderd-post-chats-shared-fixturefrom
mike/coderd-post-chats-input-rejects
Draft

ibetitsmike wants to merge 2 commits into
mike/coderd-post-chats-shared-fixturefrom
mike/coderd-post-chats-input-rejects

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

This PR moves the remaining 9 isolated rejection subtests of TestPostChats into the shared Rejects table from the previous PR: the 4 workspace cases, EmptyText, UnsupportedPartType, RejectsInvalidReasoningEffort, and the cross-org and third-org MCP server cases. Each one no longer starts its own coderd and AI Bridge daemon.

MCPServerIDsDisabledConfigRejected keeps its own server: after the create rejection it sends a message on a chat it creates, which a single-request case cannot express.

Why it is safe

  • Cases keep the old subtest names, callers, status, and message checks, and now also check the exact Detail. The reasoning-effort case compares the full detail instead of two substrings.
  • I mutated 12 lines in postChats and its workspace, input, effort, and MCP helpers and ran the old and new test files against each one. The old file caught 10 and the new file catches the same 10, each in the case that owns it, plus a detail-text mutant the old file missed. The one mutant both survive (reading the workspace as system) returns the same response from the SSH check.

Review focus

The workspace and input cases now run with the shared default model present. postChats rejects them before it resolves a model, so the model does not change their result. The MCP cases add their configs to orgs that no other case reads, or to the default org with default_off, where no other case passes MCP IDs.

Timing

From 5 alternating runs, the moved subtests took 2.83 s summed (median); their 9 cases take 0.27 s on the shared server. For the whole stack, go test reports 1.96 s instead of 3.19 s for the package.

Validation

  • go test ./coderd -run '^TestPostChats$' -count=3: pass
  • the same run with -race: pass
  • go test -overlay mutant runs against the old and new test files: results above
  • go vet ./coderd and golangci-lint run ./coderd/...: clean; the pre-commit hook passed

Stack

The stack runs every isolated TestPostChats rejection case on one shared server instead of one server per case.

  1. test(coderd): run the TestPostChats model and org rejections on one server #30975 Model and organization rejection cases
  2. test(coderd): run the TestPostChats workspace, input, and MCP rejections on one server #30976 Workspace, request input, and MCP server rejection cases (this PR)

Xum, an AI agent, opened this PR for @ibetitsmike and wrote this description.

…ons on one server

Move the remaining isolated rejection subtests of TestPostChats into the
shared Rejects table: the four workspace cases, the empty-text and
unsupported-part cases, the invalid reasoning effort, and the cross-org
and third-org MCP server IDs. Each case still creates its own state.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

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-18T17:10:31.692336Z 971e403 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 20f399417b

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

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum, an AI agent, posted this comment for @ibetitsmike.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 971e403f6e

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

This branch has not been deployed

No deployments
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