from scripts.build_owner_review_packet import render def test_review_packet_distinguishes_held_drafts_from_corrections() -> None: items = [ { "source_stage": "satie", "storage_state": "evaluated; needs-review; not submitted", "proposal": { "proposal_id": "held-one", "revision": 1, "base_commit": "a" * 40, "operations": [ { "node": { "node_id": "node-one", "node_type": "finding", "title": "Held finding", "summary": "Summary", "claims": [], } } ], }, }, { "source_stage": "supersession", "storage_state": "durably staged; needs-review; no owner receipt", "proposal": { "proposal_id": "correction-one", "revision": 1, "base_commit": "b" * 40, "operations": [ { "node": { "node_id": "node-two", "node_type": "finding", "title": "Correction finding", "summary": "Corrected summary", "claims": [], } } ], }, }, ] packet = render(items) assert "Keep held; do not create an exception" in packet assert "Approve this replacement for the owner workflow" in packet assert "Proposal base commits may be stale" in packet assert "does not alter GEWU state" in packet