Skip to content

test(todos): preserve runtime kwargs in downlevel projection stub - #4911

Merged
huangruiteng merged 2 commits into
loopx-project:mainfrom
Duang777:codex/fix-todo-projection-downlevel
Sep 23, 2026
Merged

huangruiteng merged 2 commits into
loopx-project:mainfrom
Duang777:codex/fix-todo-projection-downlevel

Conversation

@Duang777

@Duang777 Duang777 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • forward effect_runtime_result keyword arguments through the downlevel projection test wrapper
  • let the split-root missing-provider stub ignore transport options that are outside that test's assertion scope
  • preserve the newer canonical read timeout while restoring both original test scenarios

Root cause

Commit 071f5bb3f gave canonical Todo reads an explicit timeout=. Two test doubles still accepted only (method, payload), so they raised TypeError before their intended provider behavior ran. This caused two deterministic failures across shards 3 and 4 on main run 35762701336 and PR #4906 run 35767660869.

Validation

  • before: both reported tests fail with unexpected keyword argument 'timeout' or its caught projection symptom
  • uv run python -m pytest -q tests/control_plane/test_legacy_coordination_writer_fence.py tests/control_plane/test_todo_projection_concurrency.py: 25 passed
  • uv run python -m ruff check tests/control_plane/test_legacy_coordination_writer_fence.py tests/control_plane/test_todo_projection_concurrency.py: passed
  • git diff --check: passed

Scope

Test-only change. Production timeout and projection behavior are unchanged.

Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>
Signed-off-by: duanjialing.777 <duanjialing.777@bytedance.com>

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审阅对象:#4911 @ 73fa587ee7e69c394d32571458916edb0036bc3b。结论:APPROVE;合并权限与必要检查仍由维护者决定。

动机

生产 canonical Todo 读取已带显式 timeout=,两个旧测试替身仍只收 (method, payload),令测试在预期的缺失 provider / 缺失 readback 路径之前抛 TypeError。这是 main 与 #4906 的真实测试故障,不是要撤销生产超时。

改动思路

保持 local_authority.effect_runtime_result 的现有调用契约不动,只让测试替身接受传输选项:downlevel wrapper 把 **kwargs 原样传给真实调用后仍移除 projection_readback;split-root missing-provider stub 忽略与断言无关的传输选项,继续断言 method/params 和 fail-closed 响应。文件态与 SQLite 态的投影责任仍由生产代码承担。

具体改动

test_todo_projection_concurrency.pywithout_confirmation 从两参改成接收并转发关键字选项;test_legacy_coordination_writer_fence.pymissing_provider 接收 **_kwargs。两文件 +5/-3,没有删原断言或新增重复测试;production timeout、Todo 写入与 provider 都未改。

对主干的风险

风险局限于测试替身是否遮蔽真实错误。我在 immutable base d3dc4083 重跑两个目标测试,得到 3 个参数化失败(timeout TypeError 与其下游投影症状);在此 exact head 上运行两个完整目标文件 25/25 通过,ruff 与 git diff --check 通过。原 pending outbox、无文件回退、provider revision 等断言依旧执行。缺失 provider 的 stub 本来就不验证传输选项,但生产调用没有修改;按 Goal 配置未查询/等待远端 CI。

我的整体评价

这是针对现有持久测试的最小修复,保留了 canonical read 的超时及 fail-closed 语义。没有适合在此 PR 做的相邻生产重构;若将来增加传输参数,这个测试替身继续透传,另一替身仍专注 provider 缺失合同。现有证据支持 APPROVE,不代表我执行合并。

English verdict: APPROVE - 73fa587; the two mocks accept/forward transport kwargs while preserving their failure assertions. Three baseline failures become 25 passing exact-head tests; ruff and diff check pass.

@Duang777

Copy link
Copy Markdown
Contributor Author

Exact-head CI confirmed the fix itself: all four Python shards passed. The only primary failures were the independent main defects handled by #4906: nine Node 22.18 SQLite archive failures and the 30-minute kernel timeout.

To break that mutual CI dependency, commits b4b68d4ad and 73fa587ee are now also present on #4906 head 1fd379486. Keep this PR as the isolated root-cause record; once #4906 lands, this diff will be redundant and can close without a second merge.

@huangruiteng
huangruiteng merged commit be29847 into loopx-project:main Sep 23, 2026
17 of 22 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.

2 participants