Repository navigation
test(coderd/x/chatd): move the Anthropic guard unit test into its own file - #30968
ibetitsmike wants to merge 2 commits into
Conversation
|
@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. Hooray! 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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
Moves
TestAnthropicProviderToolPreRequestGuardout ofcoderd/x/chatd/chatd_test.gointo a newcoderd/x/chatd/anthropic_guard_test.goin the same package. The test callschatsanitize.ApplyAnthropicProviderToolGuardon in-memory messages and builds no server or database. Giving it its own file lets the next PR move it intochatsanitizeas a git rename. The end-to-endTestActiveServer_AnthropicProviderToolPreRequestGuardstays inchatd_test.go.Why it is safe
This is a pure move, with no edits. The helpers the test uses stay in
chatd_test.gofor now; the next PR moves them.diff <(git diff B H | grep '^-[^-]' | cut -c2- | sort) <(git diff B H | grep '^+[^+]' | cut -c2- | sort)prints only the new file's package clause,import (,)and import paths.git diff --color-moved=plainmarks all 137 removed lines as moved; the only 12 added lines it leaves unmarked are that package clause and import block.non_Anthropic_providers_are_unchanged,orphan_provider_result_is_textified,valid_provider_history_is_unchanged,logs_removals.Review focus
Nothing changed outside the new file's header.
git diff --color-moved=plainshows this at a glance.Validation
go test ./coderd/x/chatd/ -run '^TestAnthropicProviderToolPreRequestGuard$' -count=1 -v: 4 of 4 subtests pass.go vet ./coderd/x/chatd/: clean.make pre-commit: gen, fmt,lint/go,lint/go/new-code, slim build): passed.Stack
This stack moves the Anthropic guard unit test into
chatsanitize, then deletes the guard escalation that can never repair a prompt.chatsanitize