Commit 9b5d09e
authored
test(coderd/x/chatd): seed anthropic provider for computer_use tests (#24611)
`TestSubagentLifecycleToolsIncludePersistedSubagentTypeAcrossVariants/ComputerUse`
and two adjacent positive tests passed a static Anthropic key into
`newInternalTestServer`, but `seedInternalChatDeps` only inserts an
OpenAI
provider. At runtime, `Server.resolveUserProviderAPIKeys` calls
`chatprovider.PruneDisabledProviderKeys`, which clears `keys.Anthropic`
because Anthropic is not in the enabled DB provider set, so the
`computer_use` execution path loses its key.
Add a focused test helper `seedEnabledAnthropicProvider` and use it only
in
the positive tests that actually drive a `computer_use` spawn through
the
runtime key-resolution path (the `computer_use` branch of
`TestSubagentLifecycleToolsIncludePersistedSubagentTypeAcrossVariants`,
`TestSpawnAgent_ComputerUseUsesComputerUseModelNotParent`, and
`TestSpawnAgent_ComputerUseInheritsMCPServerIDs`).
`seedInternalChatDeps`
stays unchanged, so the negative availability tests continue to model
the
"Anthropic unavailable" fixture. No production code is modified.
Closes coder/internal#1486
> This PR was opened by Mux working on Mike's behalf.1 parent 5c316d4 commit 9b5d09e
2 files changed
Lines changed: 74 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
476 | | - | |
477 | | - | |
| 475 | + | |
478 | 476 | | |
479 | 477 | | |
480 | 478 | | |
| 479 | + | |
481 | 480 | | |
482 | 481 | | |
483 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
150 | 214 | | |
151 | 215 | | |
152 | 216 | | |
| |||
983 | 1047 | | |
984 | 1048 | | |
985 | 1049 | | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
| 1050 | + | |
991 | 1051 | | |
992 | 1052 | | |
993 | 1053 | | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
994 | 1057 | | |
995 | 1058 | | |
996 | 1059 | | |
| |||
1121 | 1184 | | |
1122 | 1185 | | |
1123 | 1186 | | |
1124 | | - | |
1125 | | - | |
1126 | | - | |
| 1187 | + | |
1127 | 1188 | | |
1128 | 1189 | | |
1129 | 1190 | | |
| 1191 | + | |
1130 | 1192 | | |
1131 | 1193 | | |
1132 | 1194 | | |
| |||
1179 | 1241 | | |
1180 | 1242 | | |
1181 | 1243 | | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
| 1244 | + | |
1185 | 1245 | | |
1186 | 1246 | | |
1187 | 1247 | | |
| 1248 | + | |
1188 | 1249 | | |
1189 | 1250 | | |
1190 | 1251 | | |
| |||
0 commit comments