Commit d487453
Serve /copilot_internal/user before proxy init guard
The CLI authenticates and calls /copilot_internal/user at startup, which can race ahead of the per-test POST /config. The Go e2e harness spawns the CLI (ctx.NewClient) at the parent-test level, before any subtest's ConfigureForTest posts /config, so the user call reached the proxy while state was still nil and hit the 'not yet initialized' guard. That blocked the CLI's MCP enablement check and caused the macOS MCP e2e subtests to time out at 60s.
Move the /copilot_internal/user read handler above the state guard, mirroring its write-side counterpart (/copilot-user-config). The handler only depends on the copilotUserByToken map, which is populated at NewTestContext independently of state, so this is safe and consistent.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 9d696d2 commit d487453
1 file changed
Lines changed: 33 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
272 | 250 | | |
273 | 251 | | |
274 | 252 | | |
| |||
310 | 288 | | |
311 | 289 | | |
312 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
313 | 318 | | |
314 | 319 | | |
315 | 320 | | |
| |||
0 commit comments