From c0ceff669774cec9f3b71f0bade244133f9949bb Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Sun, 4 Oct 2026 06:09:49 +0100 Subject: [PATCH] Keep TrueNAS safety assertions independent of Markdown wrapping PR #2456 run 37175962472 rejected retained safety warnings only because of a line break and sentence capitalization. Normalize prose for these assertions without removing any required warning or diagnostic field. Contract-Neutral: Documentation test presentation normalization only; no runtime, API or safety-guidance change. Change-source: pulse-maintainer --- scripts/tests/test_truenas_docs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tests/test_truenas_docs.py b/scripts/tests/test_truenas_docs.py index 385edb1a19..0b24f1f62f 100644 --- a/scripts/tests/test_truenas_docs.py +++ b/scripts/tests/test_truenas_docs.py @@ -91,6 +91,9 @@ class TrueNASDocsTest(unittest.TestCase): def test_polling_guidance_preserves_evidence_before_a_manual_test(self): text = DOC.read_text().split("### Stale TrueNAS data", 1)[1].split("### Disabling", 1)[0] + # Markdown wrapping and sentence capitalization do not change the + # safety guidance. Still require every complete warning and field. + prose = " ".join(text.split()).casefold() for required in ( "Record the existing state before testing or restarting", "signed-in Pulse admin browser session", @@ -107,7 +110,7 @@ class TrueNASDocsTest(unittest.TestCase): "Do not post the full connection response", ): with self.subTest(required=required): - self.assertIn(required, text) + self.assertIn(" ".join(required.split()).casefold(), prose) self.assertNotIn("```", text) self.assertNotIn("Check TrueNAS connectivity and API key validity", text) # Every suggested field belongs to the existing read-only projection,