jia2's GitHub device page said "Congratulations, you're all set! Your
device is now connected." and magpie never finished adding the account.
Two paths in startCopilotSignIn could do exactly that, silently, for
the whole 10-minute signInTimeout:
- A poll of the token endpoint that failed (no answer, a non-200 from a
proxy, a body that isn't JSON) was `continue`d without a word, forever.
Now 5 failures in a row (copilotPollMisses) fail the sign-in with the
last one's error; a miss between answers still counts as a hiccup.
- After the token, copilotUser (api.github.com/user and
copilot_internal/user) and copilotProbeEditor ran on a context with no
deadline over http.DefaultClient, which has no timeout: a proxy holding
api.github.com held the sign-in at "waiting". They are now bounded by
copilotFinishWait (1 min) and the sign-in fails saying GitHub didn't
answer whose account it is.
Each step is logged ("copilot sign-in on github.com: ..."), and
copilotUser's "GitHub didn't say whose account this is" now carries the
error that caused it. Which of these jia2 hit isn't known yet; their
magpie version, OS and log lines are asked for on the issue.
Run: TestCopilotSignInPollKeepsFailing and TestCopilotSignInUserHangs
were red (the sign-in still waiting at 15s / 10s) with the miss limit
and the deadline broken by hand, green now; TestCopilotSignInPollHiccup
green; all with -race.