Normalize mobile login numbers, skip completion flow for session-only account tests, and add tests#72
Merged
CJackHwang merged 1 commit intodevfrom Mar 2, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
CJackHwang
added a commit
that referenced
this pull request
Mar 2, 2026
Merge pull request #72 from CJackHwang/codex/review-changes-to-test-account-logic Normalize mobile login numbers, skip completion flow for session-only account tests, and add tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
normalizeMobileForLoginininternal/deepseek/client_auth.goto strip non-digit characters and normalize+86/86Chinese mobile prefixes before sending login payloads and wire the returnedarea_codeinto the login payload.Loginpayload construction to usenormalizeMobileForLoginand includearea_codeappropriately.testAccountininternal/admin/handler_accounts_testing.goto short-circuit and mark the test as successful whenmessageis empty (session-only test), avoidingGetPow/CallCompletioncalls and returning a clear messageAPI 测试成功(仅会话创建).internal/deepseek/client_auth_mobile_test.goto verify mobile normalization behavior andinternal/admin/handler_accounts_testing_test.goto verify session-only account testing only creates a session, refreshes token, persists status, and does not call completion-related flows.Testing
go test ./internal/admin -run TestTestAccount_BatchModeOnlyCreatesSession, which passed.go test ./internal/deepseek -run TestNormalizeMobileForLogin_*, which passed.Codex Task