Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Validate release notes by their exact first title
pulse-triage[bot]35914abab7c3
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.pyindex e27d53e1b9..1bb4a84c2d 100644--- a/scripts/release_control/release_promotion_policy_test.py+++ b/scripts/release_control/release_promotion_policy_test.py@@ -45,6 +45,16 @@ def normalize_ws(text: str) -> str:return " ".join(text.split())+def release_notes_have_exact_title(notes: str, version: str) -> bool:+ """Match the first title, as the reader-facing Go notes contract does.++ The optional legacy suffix is presentation, not version identity. Neither+ a later heading nor a version repeated in prose establishes that identity.+ """+ first = notes.strip().split("\n", 1)[0].strip()+ return re.fullmatch(r"# Pulse v" + re.escape(version) + r"(?: Release Notes)?", first) is not None++_MATERIAL_APPROVAL_RE = re.compile(r"(?i)(?:"r"\brichard[- ]approved\b|"@@ -1590,6 +1600,24 @@ class ReleasePromotionPolicyTest(unittest.TestCase):)self.assertNotIn("Limits are applied to canonical top-level monitored systems", changelog)+ def test_release_notes_title_uses_exact_first_heading(self) -> None:+ for version in ("6.4.5", "6.5.0", "6.5.0-rc.1"):+ for suffix in ("", " Release Notes"):+ with self.subTest(version=version, suffix=suffix):+ self.assertTrue(release_notes_have_exact_title(+ f"\n# Pulse v{version}{suffix}\n\nUser-facing changes.\n", version))+ for title in (+ "# Pulse v6.5.1", "# Pulse v6.5.0-rc.1", "# Pulse v6.5.00",+ "# Pulse v6.5.0-beta.1", "## Pulse v6.5.0", "# Other Pulse v6.5.0",+ "# Pulse v6x5x0", "# Pulse v6.5.0 Release Notes extra",+ "# Pulse v6.5.0extra", "",+ ):+ with self.subTest(title=title):+ self.assertFalse(release_notes_have_exact_title(+ title + "\n\n# Pulse v6.5.0 Release Notes\n\n`v6.5.0`\n", "6.5.0"))+ authored = read("scripts/installtests/testdata/release-notes-v6.4.5-authored.md")+ self.assertTrue(release_notes_have_exact_title(authored, "6.4.5"))+def test_version_file_matches_current_rc_packet(self) -> None:current_version = read("VERSION").strip()release_index = read("docs/RELEASE_NOTES.md")@@ -1600,8 +1628,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):changelog = read(changelog_path)self.assertIn(release_notes_path, release_index)self.assertIn(changelog_path, release_index)- self.assertIn(f"Pulse v{current_version} Release Notes", release_notes)- self.assertIn(f"`v{current_version}`", release_notes)+ self.assertTrue(release_notes_have_exact_title(release_notes, current_version))self.assertIn(f"Pulse v{current_version}", changelog)else:packet_paths = rc_packet_paths_for_version(current_version)@@ -1636,7 +1663,7 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("current v6 release candidate packet", release_index)self.assertIn(release_notes_path, release_index)self.assertIn(changelog_path, release_index)- self.assertIn(f"Pulse v{current_version} Release Notes", release_notes)+ self.assertTrue(release_notes_have_exact_title(release_notes, current_version))self.assertIn(f"Pulse v{current_version}", changelog)def test_v611_packet_records_proxmox_backup_posture_identity_fix(self) -> None: