Skip to content

[codex] issue #115 old frontend release merge branch - #117

Merged
cursor[bot] merged 11 commits into
mainfrom
codex/issue115-old-frontend-release
Jul 18, 2026
Merged

[codex] issue #115 old frontend release merge branch#117
cursor[bot] merged 11 commits into
mainfrom
codex/issue115-old-frontend-release

Conversation

@ZeroPointSix

Copy link
Copy Markdown
Owner

Summary

Scope

Included:

Excluded/deferred:

Refs #115

Validation

  • git diff --check
  • black --check on touched Python files
  • isort --check-only on touched Python files
  • flake8 --select=E9,F63,F7,F82 outlook_web tests
  • python -m compileall outlook_web tests
  • Focused regression tests: 138 tests OK
  • Full python -m unittest discover -s tests -v: exit 0

hongdongjian3839 and others added 6 commits May 19, 2026 20:52
规则分支与 AI 回退不再强制 .upper(),verification_code 与 formatted
保持邮件原文大小写;补充回归测试。

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Copy link
Copy Markdown
Owner Author

已完成本 PR 的独立 VPS 测试部署,供旧前端紧急版本验证使用。

部署信息:

验证:

  • /healthz 200
  • /login 200
  • 跨 VPS 公网访问 /healthz 200
  • 跨 VPS 公网访问 /login 200
  • 登录 API 使用测试密码返回 success,登录后首页可访问

本部署未复用 do-nyc-001 上已有的 outlook-email-plus 容器;azure-in-001 当前 SSH 握手超时,故改用 do-us-001 新端口新目录部署。

Copy link
Copy Markdown
Owner Author

本 PR 已补入 PR #114 的核心 x.ai 连字符验证码识别修复,提交为 4d05d2c

合并边界:

验证结果:

  • MCP 工作区格式/静态基础检查通过:black --checkisort --check-onlyflake8 --select=E9,F63,F7,F82compileall
  • 重点 unittest 套件通过:Ran 184 tests ... OK
  • 全量 python -m unittest discover -s tests -v 通过,最终 exit code 0。
  • 测试部署已更新到 http://157.245.217.164:5115/,服务运行 commit 4d05d2c/healthz=200/login=200,登录 POST 返回 200。

@ZeroPointSix

Copy link
Copy Markdown
Owner Author

用户要求把 #114(x.ai 连字符验证码) 纳入 issue #115 紧急临时发版。

核对结果:本分支已有 4d05d2c fix: support x.ai hyphenated verification codes,功能与 #114 对齐,且与 #103 大小写保持兼容。

本地相关单测 81 passed。临时环境 157.245.217.164:5115 将按此 HEAD 部署/对齐(VPS MCP 恢复后执行)。

Copy link
Copy Markdown
Owner Author

ZER-89 follow-up design noted in Linear: https://linear.app/zerodotsix/issue/ZER-89/垃圾箱邮件会导致验证码提取未走最新邮件

Root cause from code inspection: extract_verification_for_outlook currently returns as soon as the first channel extracts successfully (graph_inbox -> graph_junk -> imap_new -> imap_old). That means an older inbox code can win before a newer junk-mail code is considered. IMAP routing also hardcodes folder="inbox", so IMAP fallback does not include junk candidates.

Recommended fix: change Outlook verification routing from channel-first early return to candidate-pool arbitration. Collect recent candidates from Inbox + Junk, normalize/filter them once, sort globally by received time, then fetch/extract from the winning latest message. Add regressions for inbox-old vs junk-new, Graph unavailable + IMAP junk, and the existing #67 detail/latest mismatch case.

Copy link
Copy Markdown
Owner Author

ZER-89 已修复并推到本 PR 分支。

变更:

  • 验证码提取不再按 graph_inbox -> graph_junk -> imap_new -> imap_old 的顺序抢先返回,而是先汇总候选邮件,再按接收时间选最新一封。
  • Graph Inbox/Junk 都会参与候选;IMAP fallback 也会同时检查 inbox 和 junkemail。
  • 如果最新匹配邮件没有验证码/链接,会返回未找到,不再回退到旧 Inbox 验证码。
  • 保留已记忆 IMAP 通道的短路径,避免已稳定的 IMAP 账号继续探测 Graph。

测试:

  • .venv/bin/python -m unittest tests.test_verification_channel_memory_v1 tests.test_verification_extract_log -v -> 24 passed
  • .venv/bin/python -m unittest discover -s tests -v -> 1572 discovered tests passed, exit code 0

提交:9d6b73d (fix: select latest verification email across folders)

关联:Linear ZER-89

Copy link
Copy Markdown
Owner Author

已按 review 里提到的后续问题补修并推送。

提交:16be23563b10d00ab7ab519a9a41f4af8d1e51fa

处理内容:

  • 将验证码提取的渠道执行改成 provider phase:Graph Inbox/Junk 先作为同一阶段比较最新候选;Graph 阶段只要有候选,就不再继续触发 IMAP,减少无必要的上游调用。
  • Graph 阶段没有候选时才进入 IMAP 阶段;IMAP 阶段同时覆盖 inbox/junkemail。
  • IMAP 重新走 fetch_emails_and_detail_for_channel,缓存 list+detail 返回的详情,恢复连接复用;兼容回退仍保留旧 list + detail 路径。
  • 补齐反向 case:Inbox 比 Junk 更新时应选 Inbox,并确认 Graph 命中时跳过 IMAP。
  • 同步调整 channel memory 相关测试,让它覆盖新的 IMAP 复用入口。

验证:

  • .venv/bin/python -m py_compile outlook_web/services/verification_channel_routing.py 通过
  • .venv/bin/python -m unittest tests.test_verification_extract_log tests.test_verification_channel_memory_v1 -v:25 tests OK
  • .venv/bin/python -m unittest discover -s tests -v:1573 tests,exit 0

cursoragent and others added 2 commits July 15, 2026 06:34
…ch (PR #117)

Merges main's ZER-90 work (PR #119) into the old-frontend release branch
without requiring a direct main deploy. Preserves release-branch improvements:
detail_cache, folder-aware fetch, and _message_sort_key, combined with
multi-email expected_field iteration from ZER-90.

Co-authored-by: ZeroPointSix <ZeroPointSix@users.noreply.github.com>
When expected_field is verification_code, only skip to older emails if
the newest message is link-only; otherwise return VERIFICATION_NOT_FOUND
from the latest channel (ZER-89). Also patch graph inbox fetch mock and
run Black on routing/test files for #117.

Co-authored-by: ZeroPointSix <ZeroPointSix@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review July 18, 2026 09:39
@cursor
cursor Bot merged commit ee8d769 into main Jul 18, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants