test(contract): 按 Codex 审查改掉五条说明型测试的名字

它们函数体是空的,名字却承诺了一个行为,读起来像「这条已经验过了」——而契约套件是新适配器
的准入标准,下游跑一遍看见绿的会以为自己那一条被验过。名字改成说清楚断言在哪一层,
函数体那段解释保持不动。

Codex 另报「测试 docstring 里出现 GovDoc 是业务词汇」,不采纳:§1.1 那道扫描挡的是领域词
(公文、超声、招标),说明一条测试被哪个消费者的需求逼出来不构成业务假设,仓库里这类引用
本来就有十几处。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-10 22:56:02 -04:00
parent e71dca7c35
commit 8c642e7881
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ async def test_emit_accepts_an_event(event_sink, records):
await event_sink.emit(records.event())
def test_a_sink_is_allowed_to_raise_on_delivery_failure():
def test_a_raising_sink_is_compliant_so_this_layer_asserts_nothing():
"""**这一层不断言「emit 不抛」——一个后端连不上时抛异常的出口是合规实现。**
契约写的是「投递失败由**库**捕获、记日志、把失败计数加一,然后继续跑」,所以要断言的
@@ -33,7 +33,7 @@ def test_a_sink_is_allowed_to_raise_on_delivery_failure():
"""
def test_failure_is_not_re_emitted_through_the_same_sink():
def test_the_no_re_emission_guarantee_is_asserted_in_the_library_not_here():
"""投递失败不再转成一条事件从同一个出口发出去(`design/0013` 决策七)。
那会自我喂食:一个持续失败的出口会让失败处理路径变成递归,而递归的表现是进程卡住或
@@ -45,7 +45,7 @@ def test_failure_is_not_re_emitted_through_the_same_sink():
"""
def test_audit_events_do_not_carry_the_model_output_the_store_does():
def test_the_audit_trail_is_asserted_against_the_log_not_here():
"""审计纪律由存储承担,不由事件流承担(`design/0013` 决策二)。
GovDoc 有一条硬纪律:agent 的原始输出、修复后的输出、恢复来源全程留痕,禁止静默修复。