provider: Qoder CN mover min 0.2.53, enterprise dedicated domain sign-in
Milktea (Discord) signs in to Qoder CN on a dedicated domain (https://<corp>.rdc.aliyuncs.com) through the IDE's 「企业版专属域登录」; the plugin's VPC sign-in failed for it. opencode-qoder-auth 0.2.53 (plugins 7312770) adds "Sign in with Qoder CN Enterprise dedicated domain", read from Qoder IDE 1.38.0's bundle: it probes <domain>/algo/api/v1/version (404 = Lingma 1.0, refused with what it is; anything else = Qoder CN 2.0), then runs the VPC device flow against the -openapi host with the dedicated client id, and chats on the -gateway host (the origin when that host doesn't answer). npm has 0.2.53. This raises the mover's min so moved users get it. Run: - plugins: bun test packages/qoder (355 pass, 0 fail, 10 new dedicated tests on a fake server), bun scripts/check.mjs ok. - magpie: go vet + go test -count=1 ./internal/provider on mote: ok (125s). gofmt -l clean. Broken by hand: - TestQoderCNMoverHasTheDedicatedDomainSignIn red with min 0.2.52. - plugin: disabling the dedicated branch, the 404 check and the origin fallback turned 4 of the 10 dedicated tests red. Not tried: any real dedicated-domain account; the chat host (-gateway) is inferred from the IDE's experts-center rule, not seen in a capture. The Lingma 1.0 dedicated path (cosy's login flow) is not implemented. Thanks to Milktea on Discord for the report.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,18 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/yetone/magpie/internal/update"
|
||||
)
|
||||
|
||||
// Qoder's plugin before 0.2.53 took a Qoder CN enterprise's own domain only
|
||||
// as a VPC instance (<instance>.vpc.qoder.com.cn), so an enterprise whose
|
||||
// Qoder IDE signs in to a dedicated domain such as <corp>.rdc.aliyuncs.com
|
||||
// (企业版专属域) had no way in. 0.2.53 adds that sign-in. The mover keeps
|
||||
// every moved Qoder CN user on a version that has it.
|
||||
func TestQoderCNMoverHasTheDedicatedDomainSignIn(t *testing.T) {
|
||||
if update.Newer("0.2.53", movers[QoderCNID].min) {
|
||||
t.Fatalf("the %s mover installs opencode-qoder-auth %s, which has no enterprise dedicated domain sign-in", QoderCNID, movers[QoderCNID].min)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user