test(M11b-2d-A1): test_m11b2_single_tx.py 迁移函数式夹具消 collection error(48 条可收集,pytest 留证)

[M11b-2d-A1a] 收口提交内容:仅刷新 3 份 pytest 留证件(响应 QC 退回项 #1/#9 可复核性)。
- m11b2d_a1_pytest.txt / m11b2d_a1_collect_only.txt:头部补 INTERPRETER 绝对路径 + PYTEST_VERSION + PYTHON_VERSION + WORKDIR + GIT_HEAD,输出为 modules/world_sync 工作目录内实测原样全量输出。
- m11b2d_a1_pytest_ref_11aac66.txt:按 QC 改法 (b) 在 modules/world_sync 工作目录内以临时改写方式重跑对照实验,rootdir 与 CMD 一致(原件 rootdir 指向已删除的 tmp_diag/wsdiag 副本),并补 NOTE/PYTHON_VERSION;跑完测试文件按 HEAD 字节流还原(md5 d17cf7d68e3bfbef70c4f6b38a5bb643 一致,git status 归零)。
- tests/test_m11b2_single_tx.py 与 tests/_m11b2_compat.py 本任务零改动(git diff 为空),故未 add。
This commit is contained in:
agent.develop 2026-09-22 23:31:47 +08:00
parent 932bcd8072
commit 91ea85cd81
3 changed files with 26 additions and 18 deletions

View File

@ -1,10 +1,12 @@
# CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py --collect-only -q # CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py --collect-only -q
# DATE: 2026-09-22T23:03:04+08:00 # DATE: 2026-09-22T23:30:05+08:00
# INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python # INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python
# PYTEST_VERSION: pytest 9.1.1 # PYTEST_VERSION: pytest 9.1.1
# PYTHON_VERSION: Python 3.10.12 # PYTHON_VERSION: Python 3.10.12
# WORKDIR: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync
# GIT_HEAD: 932bcd80724380098b2a545d00ed75e31fbd75d8 (932bcd8)
# TASK: M11b-2d-A1a 留证刷新(collect-only 可收集性证明,响应 QC #9) # TASK: M11b-2d-A1a 留证刷新(collect-only 可收集性证明,响应 QC #9)
# NOTE: 以下为上述命令完整原样输出。48 items collected / 0 collection error 是本项验收点,与用例是否 PASSED 无关。 # NOTE: 以下为上述命令完整原样输出。48 items collected / 0 collection error 是本项验收点,与用例是否 PASSED 无关;rootdir 与 # CMD/# WORKDIR 一致。
tests/test_m11b2_single_tx.py::TestNormalWrite::test_broadcast_happens_only_after_commit tests/test_m11b2_single_tx.py::TestNormalWrite::test_broadcast_happens_only_after_commit
tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_and_state_written_in_one_transaction tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_and_state_written_in_one_transaction
tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_row_is_append_only_without_version_backfill tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_row_is_append_only_without_version_backfill
@ -54,5 +56,5 @@ tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_module_level_helpe
tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_plan_assembly_is_side_effect_free tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_plan_assembly_is_side_effect_free
tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_unserialisable_payload_rejected tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_unserialisable_payload_rejected
48 tests collected in 0.04s 48 tests collected in 0.05s
# RC=0 # RC=0

View File

@ -1,16 +1,14 @@
# CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py -v --tb=short # CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py -v --tb=short
# DATE: 2026-09-22T23:03:04+08:00 # DATE: 2026-09-22T23:30:05+08:00
# INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python # INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python
# PYTEST_VERSION: pytest 9.1.1 # PYTEST_VERSION: pytest 9.1.1
# PYTHON_VERSION: Python 3.10.12 # PYTHON_VERSION: Python 3.10.12
# TASK: M11b-2d-A1a 留证刷新(补解释器绝对路径 + PYTEST_VERSION,响应 QC #9 可复核性) # WORKDIR: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync
# NOTE: 以下为上述命令的 pytest 完整原样输出(未截断、未摘要、未修饰) # GIT_HEAD: 932bcd80724380098b2a545d00ed75e31fbd75d8 (932bcd8)
# FINDING: 本文件为 HEAD(b5c4467) 实测结果——8 failed / 32 passed / 8 xfailed / RC=1。 # TASK: M11b-2d-A1a 留证刷新(响应 QC #9 可复核性:补 INTERPRETER 绝对路径 / PYTEST_VERSION / PYTHON_VERSION)
# FINDING: 失败根因不在本任务范围:并行任务 M11b-2d-A1c 的引擎代收口提交 b5c4467 把 tests/test_m11b2_single_tx.py # NOTE: 以下为上述命令在 modules/world_sync 工作目录内的 pytest 完整原样输出(未截断、未摘要、未修饰);pytest 自报 rootdir 与 # CMD/# WORKDIR 记录的工作目录一致。
# FINDING: 的 apply() helper 由 "state_updates": [su()] if states is None else states 改成 su()(少了一层数组), # ROOT_CAUSE(分析注记,非命令输出): 8 条失败全部源自 tests/test_m11b2_single_tx.py:163 `"state_updates": su() if states is None else states` —— 应为 `[su()]`(数组)。该行由 b5c4467『deliver: 交付收口(引擎代为提交)』在携带 M11b-2d-A1c 外观债清理时误改(11aac66 原行为 `[su()]`,git diff 11aac66 HEAD 可见)。报错分布:5x RtxError[PBL-PARAM-0001] state_updates 必须是数组 + 3x 连带断言失败;夹具层(_m11b2_compat.py)与真源(pbl_runtime_ext/tx_write.py)无缺陷——真源按契约正确拒绝非数组入参。本任务禁改 test 文件,故仅登记并建议由后续任务恢复该行。
# FINDING: 真源 tx_write.py:359 校验 state_updates 必须是数组 -> 直接抛 [PBL-PARAM-0001],连带 5 条;另 3 条为同笔提交弱化的断言。 # FINDING: HEAD(932bcd8) 实测 8 failed / 32 passed / 8 xfailed / RC=1。8 条失败不在本任务范围内(本任务禁改 test 文件),由同目录 m11b2d_a1_pytest_ref_11aac66.txt 对照实验定位为 tests/test_m11b2_single_tx.py 在 11aac66..HEAD 之间的改动引入(见该件 # REGRESSION_SUSPECT 行)。
# FINDING: 对照实验:同一解释器、同一 _m11b2_compat.py 下,把 test 文件还原到 11aac66 版本 -> 40 passed / 8 xfailed / RC=0
# FINDING: (见 m11b2d_a1_pytest_ref_11aac66.txt)。本任务按范围边界第 2 条禁改 test 文件,故不自行修复,已冒泡 PM 裁决。
============================= test session starts ============================== ============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0 -- /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0 -- /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python
cachedir: .pytest_cache cachedir: .pytest_cache
@ -159,5 +157,5 @@ FAILED tests/test_m11b2_single_tx.py::TestNormalWrite::test_update_path_bumps_ve
FAILED tests/test_m11b2_single_tx.py::TestAtomicRollback::test_append_only_guard_rejects_event_update_and_base_write FAILED tests/test_m11b2_single_tx.py::TestAtomicRollback::test_append_only_guard_rejects_event_update_and_base_write
FAILED tests/test_m11b2_single_tx.py::TestAtomicRollback::test_failed_write_leaves_no_event_row FAILED tests/test_m11b2_single_tx.py::TestAtomicRollback::test_failed_write_leaves_no_event_row
FAILED tests/test_m11b2_single_tx.py::TestIdempotency::test_duplicate_event_uid_dedups_without_second_write FAILED tests/test_m11b2_single_tx.py::TestIdempotency::test_duplicate_event_uid_dedups_without_second_write
=================== 8 failed, 32 passed, 8 xfailed in 0.68s ==================== =================== 8 failed, 32 passed, 8 xfailed in 0.66s ====================
# RC=1 # RC=1

View File

@ -1,12 +1,20 @@
# CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py -v --tb=short # 对照实验:仅把 tests/test_m11b2_single_tx.py 还原到 11aac66(其余文件与 HEAD 相同) # CMD: cd modules/world_sync && /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python -m pytest tests/test_m11b2_single_tx.py -v --tb=short
# DATE: 2026-09-22T23:03:19+08:00 # DATE: 2026-09-22T23:30:05+08:00
# INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python # INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python
# PYTEST_VERSION: pytest 9.1.1 # PYTEST_VERSION: pytest 9.1.1
# TASK: M11b-2d-A1a 对照证据(证明 8 failed 由 b5c4467 引入,非本任务/非夹具层/非真源缺陷) # PYTHON_VERSION: Python 3.10.12
# WORKDIR: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync
# GIT_HEAD: 932bcd80724380098b2a545d00ed75e31fbd75d8 (932bcd8)
# TASK: M11b-2d-A1a 对照证据(证明 HEAD 的 8 failed 由 11aac66..HEAD 之间对 tests/test_m11b2_single_tx.py 的改动引入,非夹具层/非真源缺陷)
# NOTE: 对照实验在 modules/world_sync 工作目录内以「临时改写该测试文件」方式执行(QC 退回项 #1 改法 (b)),故本件 rootdir 与 # CMD/# WORKDIR 一致;仅 tests/test_m11b2_single_tx.py 取自 `git show 11aac66:tests/test_m11b2_single_tx.py`(md5 875801823f997f2fbad61dcd2cb216e7),其余文件与 HEAD 相同;跑完立即按 HEAD 字节流还原(还原后 md5 d17cf7d68e3bfbef70c4f6b38a5bb643,与 HEAD 原 md5 d17cf7d68e3bfbef70c4f6b38a5bb643 相同),`git status --porcelain` 归零,`git diff --stat HEAD -- tests/test_m11b2_single_tx.py` 为空。
# ROOT_CAUSE(分析注记,非命令输出): 8 条失败全部源自 tests/test_m11b2_single_tx.py:163 `"state_updates": su() if states is None else states` —— 应为 `[su()]`(数组)。该行由 b5c4467『deliver: 交付收口(引擎代为提交)』在携带 M11b-2d-A1c 外观债清理时误改(11aac66 原行为 `[su()]`,git diff 11aac66 HEAD 可见)。报错分布:5x RtxError[PBL-PARAM-0001] state_updates 必须是数组 + 3x 连带断言失败;夹具层(_m11b2_compat.py)与真源(pbl_runtime_ext/tx_write.py)无缺陷——真源按契约正确拒绝非数组入参。本任务禁改 test 文件,故仅登记并建议由后续任务恢复该行。
# REGRESSION_SUSPECT: b5c4467 deliver: 交付收口(引擎代为提交)
# DIFF_REF_TO_HEAD: tests/test_m11b2_single_tx.py | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
============================= test session starts ============================== ============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0 -- /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0 -- /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python
cachedir: .pytest_cache cachedir: .pytest_cache
rootdir: /d/pipeline/workspaces/0/sdlc_general/tmp_diag/wsdiag/world_sync rootdir: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync
configfile: pyproject.toml configfile: pyproject.toml
collecting ... collected 48 items collecting ... collected 48 items
@ -59,5 +67,5 @@ tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_module_level_helpe
tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_plan_assembly_is_side_effect_free XFAIL [ 97%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_plan_assembly_is_side_effect_free XFAIL [ 97%]
tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_unserialisable_payload_rejected XFAIL [100%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_unserialisable_payload_rejected XFAIL [100%]
======================== 40 passed, 8 xfailed in 0.49s ========================= ======================== 40 passed, 8 xfailed in 0.34s =========================
# RC=0 # RC=0