# PBL-RTX-0005 第3轮:交付前门禁回归取证(pytest + selftest + --verify + 实库装载) # 采集时间: 2026-09-22T16:59:22+08:00 # git HEAD(采集前): f91aa2e7c6b6eb7eab191eae4f4c8b2ac77b1e37 ## [1] python3 -m py_compile 本体自检 OK scripts/pbl_runtime_event_ddl.py OK tests/test_m11b1a_ddl_runtime.py OK tests/evidence/rtx0005_live_evidence.py rc=0 ## [2] scripts/pbl_runtime_event_ddl.py --verify PASS 任务书字段齐备: id,tenant_id,event_uid,event_code,idem_key,world_id,scene_id,session_id,entity_id,actor_id,event_type,payload,payload_json,causation_id,seq,seq_no,source,state,state_version,tx_group,broadcast,created_by,created_at,updated_at,occurred_at PASS 物理主键=id,created_at(逻辑主键 id + 分区键) PASS 唯一键均含分区键: uk_event_uid,uk_tenant_idem PASS 存在 (scene_id, created_at) 复合索引 ix_scene_created PASS 存在 event_uid 唯一索引 uk_event_uid PASS 预建 6 个月分区: p202609,p202610,p202611,p202612,p202701,p202702 + pmax(MAXVALUE) PASS 分区键类型 DATETIME(非 TIMESTAMP) PASS append-only: BEFORE UPDATE + BEFORE DELETE + pbl_assert_append_only() PASS 覆盖 M11a/M11b 写路径全部列名(23 个) PASS 幂等:IF NOT EXISTS + DROP ... IF EXISTS + 分区存在性判断 PASS DELIMITER 语句完整性: 4 个产物 DELIMITER 配对正确、27 个 $$ 段首关键字完整、无裸 CREATE$$/DROP$$ 残缺行 PASS 幂等关键字逐文件覆盖: 01 建表分区 / 02 过程+双触发器 / 03 双过程+EVENT PASS 过程体无非法 RETURN(PBL-RTX-0005 门禁): 4 个产物的过程/触发器体均为等价正向条件单语句 SIGNAL,append-only 守卫完整保留 PASS 非法 RETURN 门禁自检:坏样本(含 RETURN;)被检出 1 条、好样本(修复后守卫)零误报 VERIFY PASS EXIT_CODE=0 ## [3] 渲染产物 grep 非法 RETURN(应为 0 命中) grep -cE '^[[:space:]]*RETURN' = 0 grep -c 'SIGNAL SQLSTATE' = 0 grep -c 'DELIMITER' = 0 wc -lc = 46 3411 ## [4] .venv/bin/python -m pytest tests/ -v --tb=short ============================= test session starts ============================== platform linux -- Python 3.10.12, pytest-9.1.1, pluggy-1.6.0 -- /d/pipeline/workspaces/0/sdlc_general/modules/pbl_runtime_ext/.venv/bin/python cachedir: .pytest_cache rootdir: /d/pipeline/workspaces/0/sdlc_general/modules/pbl_runtime_ext configfile: pyproject.toml collecting ... collected 9 items tests/test_m11b2c_runtime_ext.py::test_t1_ddl_offline_harness_all_pass PASSED [ 11%] tests/test_m11b2c_runtime_ext.py::test_t1b_ddl_baseline_sha256_matches PASSED [ 22%] tests/test_m11b2c_runtime_ext.py::test_t2_selftest_offline_all_pass PASSED [ 33%] tests/test_m11b2c_runtime_ext.py::test_t2b_three_place_sync_for_m11b_contracts PASSED [ 44%] tests/test_m11b2c_runtime_ext.py::test_t3_selftest_memory_engine_end_to_end PASSED [ 55%] tests/test_m11b2c_runtime_ext.py::test_t3b_state_conflict_rolls_back_cleanly PASSED [ 66%] tests/test_m11b2c_runtime_ext.py::test_t4_p99_write_event_with_state_within_sla PASSED [ 77%] tests/test_m11b2c_runtime_ext.py::test_t4b_p99_read_entity_state_within_sla PASSED [ 88%] tests/test_m11b2c_runtime_ext.py::test_t4c_probe_runs_and_discloses_environment_limit PASSED [100%] ============================== 9 passed in 0.41s =============================== EXIT_CODE=0 ## [5] .venv/bin/python scripts/m11b_selftest.py B14[SLA打点] 三阶段均有样本 PASS adj=0.297 bcast=0.004 e2e=0.48 B14[SLA打点] 广播实测 ≤300ms PASS max=0.005ms B15[分区] 失败时如实降级(不谎报已建) PASS ok=False degraded=True err=PBL-RTX-0003: apppublic.DBPools 不可导入:Mod --- C. 真实库端到端(原子性/回滚/广播时序的权威证据)--- SKIP C:环境受限未验证 —— 本工作空间无 ahserver/apppublic 运行时('ModuleNotFoundError') B 层用可回滚内存事务引擎跑通同一份 tx_write 主链路代码替代; 连库跑法:在 pbls 应用环境执行 `python3 scripts/m11b_selftest.py --live` ================ 汇总 ================ 总计 110 项,PASS 110,FAIL 0 RESULT: PASS EXIT_CODE=0