feat: Enhance Step 9 diagnostics and error handling

- Refactor getStatusBadgeEntries to use createStep9Entry for better encapsulation.
- Introduce error visual signals detection in createStep9Entry.
- Add functions to identify OAuth callback timeout failures and step 9 failure texts.
- Update buildStep9StatusDiagnostics to include error visual summaries and handle conflicts between success and failure states.
- Implement new tests for step 9 diagnostics, ensuring correct behavior with success badges and error banners.
- Remove outdated tests related to step 5 onboarding and redirect race conditions.
- Add new tests for auto-run behavior in step 6 restart scenarios.
This commit is contained in:
QLHazyCoder
2026-04-17 04:33:14 +08:00
parent 1a5f569d16
commit c745405f90
17 changed files with 772 additions and 691 deletions
+12 -5
View File
@@ -206,7 +206,9 @@
1. 解析本轮应使用的邮箱
2. 打开或复用注册页
3. 点击注册入口并提交邮箱
4. 等待跳转到密码
4. 等待邮箱提交后的真实落地
5. 如果进入密码页,则继续执行 Step 3
6. 如果直接进入邮箱验证码页,则自动跳过 Step 3 并进入 Step 4
### Step 3
@@ -254,7 +256,7 @@
1. 生成随机姓名和生日
2. 内容脚本填写资料并点击“完成帐户创建”
3. 点击后立即上报 Step 5 完成,不再等待页面结果
4. 如果提交瞬间页面跳转导致响应通道中断,后台仅在未收到完成信号时兜底判断是否跳到 ChatGPT
4. 自动运行在进入 Step 6 前仅额外等待当前页面加载完成,不再在 Step 5 阶段接管 ChatGPT 跳转或 onboarding 跳过
### Step 6
@@ -270,6 +272,7 @@
4. 登录
5. 确保真正进入验证码页
6. 如果未进入验证码页,则按可恢复逻辑最多重试 3 次
7. 自动运行一旦进入步骤 6 之后的链路,若后续步骤报错且认证页未进入 `https://auth.openai.com/add-phone`,则统一回到步骤 6 重新开始授权流程
### Step 8
@@ -296,9 +299,11 @@
2. 判断是 CPA 还是 SUB2API
3. 打开相应后台
4. 提交回调地址
5. 完成平台侧验证
6. 追加账号运行历史成功记录
7. 做成功后的清理与标记
5. 仅当出现精确成功徽标,且该徽标不是红色/错误态、页面上也没有同时可见的失败提示时,才判定成功
6. 识别 `认证失败:*``认证失败: timeout of 30000ms exceeded``回调 URL 提交失败: oauth flow is not pending` 等失败提示并立即报错
7. 完成平台侧验证
8. 追加账号运行历史成功记录
9. 做成功后的清理与标记
## 7. 邮箱与 provider 链路
@@ -359,6 +364,8 @@
2. 计算是否从中断点继续
3. 每轮执行前重置必要运行态
4. 执行 `runAutoSequenceFromStep`
- 步骤 6 内部仍保留登录态恢复的有限重试
- 一旦进入步骤 6~9,遇到报错且认证流程未进入 `add-phone`,则自动回到步骤 6 无限重开,直到成功、手动停止或命中 `add-phone`
5. 如果失败,根据设置决定:
- 立即停止
- 当前轮重试