Test composite evidence rollback identity

This commit is contained in:
twentyOne2x 2026-07-15 05:25:19 +02:00
parent 000bda06c2
commit 8ee04f1cda

View file

@ -585,10 +585,9 @@ def test_fresh_apply_receipt_uses_composite_claim_evidence_key_without_id():
assert "id" not in evidence assert "id" not in evidence
assert lifecycle.canonical_row_key("claim_evidence", evidence) == f"{CLAIM_A}|{SOURCE_ID}|grounds" assert lifecycle.canonical_row_key("claim_evidence", evidence) == f"{CLAIM_A}|{SOURCE_ID}|grounds"
changed_rows = copy.deepcopy(receipt["canonical_rows"]) changed_receipt = copy.deepcopy(receipt)
changed_rows["claim_evidence"].append(copy.deepcopy(evidence)) changed_receipt["canonical_rows"]["claim_evidence"].append(copy.deepcopy(evidence))
changed_receipt = _apply_receipt(proposal, changed_rows, preflight) with pytest.raises(ValueError, match="unique canonical keys"):
with pytest.raises(ValueError, match=r"unique canonical keys|replay-contract validation"):
lifecycle.build_compensating_rollback_sql( lifecycle.build_compensating_rollback_sql(
proposal, proposal,
approval, approval,