Magic_zero's international (minimax-code-global) account failed the daily
check-in with "check-in: the sign-in was refused (HTTP 401)" while the same
account chatted through magpie and checked in by hand on agent.minimax.io.
Cause, from MiniMax Code's own bundle (@minimax-ai/code 0.6.12, read from
npm): its /checkin client (signin/status and signin/claim, chunk-5ADYFF2U)
signs the request as the account, with user_id = the account's
realUserID, and refuses to ask at all without one ("MiniMax Code sign-in
is required"). Every other minimax-cloud call it makes (desktop error
reports, feedback, connectors, plugin cloud) names the user too; the error
report sends nothing but user_id beside the Bearer token. The plugin's
check-in went through signed() with no userID, so user_id=0. The chat path
(/mavis) and user/info don't go through minimax-cloud, which is why the
token works there. The same client also sends device_platform web,
is_desktop 1 and desktop_version, where the plugin's account API sends
device_platform mcode. The host and signature already matched
(agent.minimax.io; x-signature/yy as before).
This is read from the client's source; the server's rule (a check-in as
user 0 is a 401 on the international site) is inferred, not observed. The
web page (agent.minimax.io, prod-web-va-0.1.220) sends its own web
token in a `token` header, so it isn't the reference for this token kind.
What changed:
- signed() takes query overrides; the check-in passes user_id (the
saved realUserID, or user/info's answer when the sign-in didn't keep
it) and MiniMax Code's device_platform web, is_desktop 1,
desktop_version 0.6.12. A user id that can't be read fails the
check-in without asking the panel.
- The China site gets the same request (MiniMax Code sends it on both).
Its host stays agent.minimax.cn.
- README says how the check-in is asked. 0.1.3 -> 0.1.4.
Tests (checkin.test.mjs):
- "the international check-in is asked as the account, not as user 0":
a fake that 401s any user_id but the account's. On origin/main's
index.mjs it fails with the reporter's exact message, "check-in: the
sign-in was refused (HTTP 401)".
- an account saved without its user id has it looked up first; one
whose id can't be read fails without a check-in.
- the signing test now checks user_id, device_platform web, is_desktop
and desktop_version.
Against origin/main 7fdc07f's index.mjs: 4 of 21 check-in tests fail.
(origin/main has since moved to 26ddabe, a qoder change only.)
Run at this commit, rebased on origin/main 26ddabe:
- packages/minimax, HOME=$(mktemp -d) bun test: 54 pass, 0 fail.
- repo root, HOME=$(mktemp -d) bun test: 2117 pass, 0 fail.
- bun scripts/check.mjs (all packages): ok.
Not tried: a real MiniMax account on either site (the owner's magpie has
none signed in, and no one's credentials were used). Whether the China
site now answers the same is not seen either; MiniMax Code sends these
params there too. If the 401 stays, the next evidence is the failing
request's reply body (`{"error": ...}`) from the user.