Red once on ubuntu CI (909d76747's run, about 1 in 60): StartPluginSignIn
returned State "waiting" with the plugin's URL, not "installing". The
fake installer finished at once, so the goroutine StartPluginSignIn
starts could install, ask the plugin to authorize (which only answers
once FAKE_GROK exists) and move the state on before StartPluginSignIn
read its own state back. The product is right: the state is whatever the
sign-in has reached. The test now holds the fake installer until it has
seen "installing", as the Devin siblings (install_test.go,
plugin_moved_test.go) already do; the hold is let go in a cleanup too, so
an early failure leaves no installer waiting. The uv_cwd error in the
same log is the plugin host outliving the test's removed TempDir, after
the failure, not its cause.
Ran: a 2s sleep injected before StartPluginSignIn's return: the old test
red ("started {... State:done ...}"), the new one green; plain -count=20
and -race -count=5 green; go test ./internal/provider; go vet and
GOOS=linux go vet; gofmt -l clean.