diff --git a/skills/kvb-org-operator/scripts/operator.py b/skills/kvb-org-operator/scripts/operator.py index 314a258..e38bf4b 100755 --- a/skills/kvb-org-operator/scripts/operator.py +++ b/skills/kvb-org-operator/scripts/operator.py @@ -193,7 +193,7 @@ META = re.compile(r"[\s|&;()<>$`\\\"'*?\[\]{}~!#]") NAME = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._+-]*$") COMMIT = re.compile(r"\bcommit\b") ASSIGNMENT = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=") -SLOT = re.compile(r"<[A-Za-z][^<>]*>") +SLOT = re.compile(r"<[A-Za-z][^<>@:/]*>") TEE = re.compile(r"\|&?\s*(?:\S*/)?tee\b") QUEUE_HOLD = re.compile(r"\bqueue\.py\s+hold\b") SENT = re.compile(r"^sent (call|post) to (.+)$") diff --git a/tests/test_operator.py b/tests/test_operator.py index 5dc83a7..099068b 100644 --- a/tests/test_operator.py +++ b/tests/test_operator.py @@ -687,6 +687,15 @@ class TestOperator(unittest.TestCase): self.assertIn(" M one", result.stdout) self.assertNotIn("(nothing to compare)", result.stdout) + def test_a_slot_to_fill_in_refuses_a_row_and_a_mail_address_or_link_in_angle_brackets_does_not(self): + for command in ("git push origin ", "make -C test"): + self.assertEqual(operator_script.unrunnable(command, "/"), "holds a <...> slot to fill in", command) + for command in ( + "git commit --no-verify -m 'fix: x' --trailer 'Co-Authored-By: Claude Opus 5.5 '", + "git commit --no-verify -m 'docs: see '", + ): + self.assertIsNone(operator_script.unrunnable(command, "/"), command) + def test_run_preview_stays_off_when_git_cannot_name_the_scope_of_a_filter(self): marker = self.base / "ran" git = self.bin / "git"