From 14f653dd664ea0c68f53392bd49823573964bedc Mon Sep 17 00:00:00 2001 From: Sunil Srivatsa Date: Tue, 17 Nov 2026 04:55:45 -0800 Subject: [PATCH] fix(tests): count rehearsal-authored provenance statements in the guide - The carry-all rehearsal replaces copied provenance claims in the predecessor guide with the generated statement. - A predecessor guide without such claims (v0.20.0 onward) needs none, so assert the guide holds exactly as many generated statements as the rehearsal authored. --- tests/test_release_rehearsal.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_release_rehearsal.py b/tests/test_release_rehearsal.py index e56158ab..9b9e5d8c 100644 --- a/tests/test_release_rehearsal.py +++ b/tests/test_release_rehearsal.py @@ -68,7 +68,12 @@ def test_real_carry_all_tail_and_refusal_probes(self) -> None: staged_notes.read_text(encoding="utf-8")) from verify_release import component_provenance statement = component_provenance(clone, release, manifest)["statement"] - self.assertIn(statement, (clone / "docs/QUICKSTART.md").read_text(encoding="utf-8")) + # The rehearsal replaces copied provenance claims with the generated statement; a + # predecessor guide without such claims (v0.20.0 onward) needs no authored statement. + authored = re.search(r"^rehearsal: guide: replaced (\d+) copied provenance claims", + transcript, re.MULTILINE) + self.assertEqual((clone / "docs/QUICKSTART.md").read_text(encoding="utf-8").count(statement), + int(authored[1]) if authored else 0, transcript) summary = clone / "releases" / release / manifest["qualification"]["summary"] self.assertEqual(hashlib.sha256(summary.read_bytes()).hexdigest(), manifest["qualification"]["summary_sha256"])