feat: 跳过复用旧账号开关 + 直接注册与 OAuth 登录鲁棒性优化#60
Open
ef4tless wants to merge 4 commits into
Open
Conversation
Allow rotation to bypass standby reuse and register new accounts directly. Exposed as a toggle in the web inspection settings; persisted via AUTO_CHECK_SKIP_STANDBY_REUSE and applied in both the main rotate loop and seat=2 preswitch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Direct registration used to silently skip the verification code step when OpenAI's email-verification page presented anything other than a classic input[name="code"] field, leaving the account stuck on the verification URL until the 3-attempt retry exhausted and the browser visibly flashed open/close each cycle. Expand _DIRECT_CODE_SELECTORS to cover input[inputmode="numeric"] and input[autocomplete="one-time-code"], introduce _DIRECT_CODE_SLOT_SELECTORS for the split 6-digit form, poll up to 15s when current_step == "code", and abort with a clear warning + screenshot when no input shape matches. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three related improvements to make Codex OAuth login on freshly registered accounts more observable and more resilient: - codex_auth: emit phased progress logs through the ChatGPT login hand-off (page load, Cloudflare wait/pass, login button, email submit, password submit) so long sleeps no longer feel like hangs; classify "no_valid_organizations" (URL or body) as a retryable failure with a dedicated label. - manager: surface the new error type via _auth_repair_error_label, and add a 5s cool-off inside _login_codex_with_result before the next attempt when the previous attempt hit no_valid_organizations. - api: route /api/tasks/login through _login_codex_with_result so the manual login task picks up the same retry logic, and propagate the failure detail in the RuntimeError message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pure ruff check --fix + ruff format output covering the previous three commits (import ordering in api.py, line-wrap in config.py, single-line collapse in manager.py). No behavior change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
概述
本 PR 打包了针对自动轮转流程的四项相关改进:
新增跳过复用旧账号开关
在巡检设置里新增开关
AUTO_CHECK_SKIP_STANDBY_REUSE。开启后轮转跳过 standby 账号复用阶段,
直接注册新账号。覆盖主轮转循环和 seat=2 预切换两个路径。
修复直接注册的验证码录入检测
选择器扩充为现代 OpenAI 邮箱验证页的
input[autocomplete=\"one-time-code\"]、inputmode=\"numeric\"以及 6 格分离型表单。
在验证码阶段 polling 等到 15s,
找不到时输出明确 warning 加截图,
代替之前静默跳过后陷入 3 × 60s 重试与浏览器闪烁的问题。
OAuth 登录阶段进度日志
在 chatgpt.com 登录交接阶段(页面加载、
Cloudflare 等待/通过、点登录、提交邮箱、提交密码)
增加阶段日志,让原本静默的 60s+ 间隔可观察。
no_valid_organizations 识别与重试
URL/body 中出现该错误时归类为可重试失败,
_login_codex_with_result重试前睡 5s 让 server 侧准备;同时把
/api/tasks/login接口改为走该重试包装器,手动登录任务也能复用同一套逻辑。
测试计划
uv run ruff check .(本地已过)uv run ruff format --check .(本地已过)uv run python -m compileall -q src/autoteam(本地已过)🤖 Generated with Claude Code