[codex] add domain claim endpoint#105
Open
ZeroPointSix wants to merge 2 commits into
Open
Conversation
ZeroPointSix
marked this pull request as ready for review
July 5, 2026 16:21
ZeroPointSix
commented
Jul 5, 2026
ZeroPointSix
left a comment
Owner
Author
There was a problem hiding this comment.
审查结论:当前不建议合并,需先修复 CI 阻塞。
阻塞点:新增 api_external_pool_claim_domain handler 后,没有同步更新既有的 CSRF 豁免覆盖测试 tests/test_external_pool.py::ExternalPoolApiTests.test_external_pool_blueprint_applies_csrf_exempt_to_all_handlers。当前测试期望的 handler 集合仍只有 claim-random / claim-release / claim-complete / stats,因此完整 CI 在 Python 3.11/3.12/3.13 全部失败,SonarCloud 也因覆盖率测试步骤失败而跳过扫描。
我在 MCP 远程沙箱复现了同一问题:
tests.test_pool_flow_suite.PoolFlowSuiteTests.test_claim_domain_requires_email_domain通过tests.test_pool_flow_suite.PoolFlowSuiteTests.test_claim_domain_filters_to_requested_domain通过tests.test_external_pool.ExternalPoolApiTests.test_external_pool_blueprint_applies_csrf_exempt_to_all_handlers失败,报错为Items in the first set but not the second: 'api_external_pool_claim_domain'
建议修复:把 api_external_pool_claim_domain 加入该测试的 expected handler 集合,然后重新跑完整 Python Tests。实现方向本身符合本期最小化范围:显式 claim-domain 入口复用现有 claim 流程,并要求 email_domain 必填,没有引入指定完整邮箱、重试历史或额外调度逻辑。
备注:原本尝试提交 REQUEST_CHANGES,但 GitHub 返回“Can not request changes on your own pull request”,所以这里改以普通 review comment 留痕。
This was referenced Jul 7, 2026
Owner
Author
This was referenced Jul 12, 2026
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.
Summary
POST /api/external/pool/claim-domainas the explicit domain-filtered claim endpointclaim-randombackward compatible while documenting its optionalemail_domainfilterScope
This intentionally does not add specific mailbox claiming, retry history, one-click retry, failed-first scheduling, or additional resource guarantee logic. The endpoint only makes domain-filtered claiming a clear API contract.
Refs #104.
Validation
do-us-002requirements.txtpython -m unittest tests.test_pool_flow_suite tests.test_pool_temp_mailbox tests.test_pool