# 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:30:05+08:00 # INTERPRETER: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync/.venv/bin/python # PYTEST_VERSION: pytest 9.1.1 # 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 ============================== 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 rootdir: /d/pipeline/workspaces/0/sdlc_general/modules/world_sync configfile: pyproject.toml collecting ... collected 48 items tests/test_m11b2_single_tx.py::TestNormalWrite::test_broadcast_happens_only_after_commit PASSED [ 2%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_and_state_written_in_one_transaction PASSED [ 4%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_event_row_is_append_only_without_version_backfill PASSED [ 6%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_multi_entity_state_updates PASSED [ 8%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_payload_serialised_into_payload_json_column PASSED [ 10%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_snapshot_written_in_same_transaction PASSED [ 12%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_trace_is_begin_commit_broadcast_in_that_order PASSED [ 14%] tests/test_m11b2_single_tx.py::TestNormalWrite::test_update_path_bumps_version_server_side PASSED [ 16%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_append_only_guard_rejects_event_update_and_base_write PASSED [ 18%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_errors_are_never_swallowed PASSED [ 20%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_failed_write_leaves_no_event_row PASSED [ 22%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_immutable_column_in_set_guard PASSED [ 25%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_missing_not_null_column_guard PASSED [ 27%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_multi_entity_partial_failure_rolls_back_first_write PASSED [ 29%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_optimistic_lock_conflict_rolls_back_everything PASSED [ 31%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_unknown_column_guard PASSED [ 33%] tests/test_m11b2_single_tx.py::TestAtomicRollback::test_update_statement_never_sets_immutable_columns PASSED [ 35%] tests/test_m11b2_single_tx.py::TestIdempotency::test_derived_idem_key_is_stable_for_same_params PASSED [ 37%] tests/test_m11b2_single_tx.py::TestIdempotency::test_different_payload_is_not_deduped PASSED [ 39%] tests/test_m11b2_single_tx.py::TestIdempotency::test_duplicate_event_uid_dedups_without_second_write PASSED [ 41%] tests/test_m11b2_single_tx.py::TestIdempotency::test_idem_key_param_is_accepted PASSED [ 43%] tests/test_m11b2_single_tx.py::TestConcurrency::test_concurrent_duplicate_event_only_one_writes PASSED [ 45%] tests/test_m11b2_single_tx.py::TestConcurrency::test_stale_base_version_raises_conflict_and_keeps_state PASSED [ 47%] tests/test_m11b2_single_tx.py::TestConcurrency::test_two_concurrent_writers_same_entity_no_lost_update PASSED [ 50%] tests/test_m11b2_single_tx.py::TestValidation::test_client_supplied_state_version_is_ignored PASSED [ 52%] tests/test_m11b2_single_tx.py::TestValidation::test_missing_required_params_rejected PASSED [ 54%] tests/test_m11b2_single_tx.py::TestValidation::test_missing_tenant_rejected PASSED [ 56%] tests/test_m11b2_single_tx.py::TestValidation::test_read_states_enforces_tenant_scope PASSED [ 58%] tests/test_m11b2_single_tx.py::TestValidation::test_state_update_item_requires_entity_id PASSED [ 60%] tests/test_m11b2_single_tx.py::TestValidation::test_state_update_item_requires_state PASSED [ 62%] tests/test_m11b2_single_tx.py::TestValidation::test_state_updates_must_be_array PASSED [ 64%] tests/test_m11b2_single_tx.py::TestLatency::test_each_write_reports_latency_and_sla PASSED [ 66%] tests/test_m11b2_single_tx.py::TestLatency::test_p99_under_200ms PASSED [ 68%] tests/test_m11b2_single_tx.py::TestLatency::test_percentile_helper_contract PASSED [ 70%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_column_contract_is_single_sourced_from_models PASSED [ 72%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_ddl_available_for_both_dialects PASSED [ 75%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_for_update_clause_degrades_by_dialect PASSED [ 77%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_no_broadcast_or_polling_in_write_sources PASSED [ 79%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_placeholder_style_per_dialect PASSED [ 81%] tests/test_m11b2_single_tx.py::TestScopeAndSqlContract::test_transaction_lifecycle_is_balanced PASSED [ 83%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_before_commit_hook_failure_rolls_back_everything XFAIL [ 85%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_duplicate_event_raises_event_write_error XFAIL [ 87%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_event_row_state_version_aligned_with_written_state XFAIL [ 89%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_failure_raises_world_sync_exception_family XFAIL [ 91%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_key_mismatch_between_event_and_state_rejected XFAIL [ 93%] tests/test_m11b2_single_tx.py::TestRetiredContractCases::test_module_level_helper_uses_configured_writer XFAIL [ 95%] 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%] ======================== 40 passed, 8 xfailed in 0.34s ========================= # RC=0