test: reject weakened draft protections

This commit is contained in:
2026-09-02 14:55:22 +00:00
parent e324610416
commit 5cc95e0ce9
+2 -1
View File
@@ -15,7 +15,7 @@ def policy_failures(section: str, approval_rule: str) -> list[str]:
section = COMMENT.sub("", section)
patterns = {
"ownership": r"(?m)^Architecture owns complete Task decomposition for every Feature allocated to the release\.$",
"lifecycle": r"(?m)^1\. Architecture creates missing Tasks, reviews existing Tasks, and retains, revises, supersedes, or removes them .+ may freely revise or remove only draft Tasks .+;$",
"lifecycle": r"(?m)^1\. Architecture creates missing Tasks, reviews existing Tasks, and retains, revises, supersedes, or removes them according to the current Feature outcomes and Architecture boundaries\. Architecture may freely revise or remove only draft Tasks with no implementation approval, Kanban admission, execution, or completion evidence;$",
"cardinality": r"(?m)^2\. define between two and six independently executable Tasks per Feature; permit one Task only when a recorded Architecture rationale proves it is the smallest atomic, independently verifiable boundary;$",
"mapping": r"(?m)^3\. map the Feature's Tasks collectively, exactly, and reciprocally to every acceptance-outcome ID and every applicable active `FR-\*` and `NFR-\*` record;$",
"dependencies": r"(?m)^4\. encode acyclic within-Feature sequencing and require every entry Task to depend on all terminal Tasks of every prerequisite Feature;$",
@@ -43,6 +43,7 @@ class TaskBreakdownPolicyTest(unittest.TestCase):
def test_comments_and_weakened_rules_cannot_satisfy_policy(self):
self.assertTrue(policy_failures(f"<!--{self.task_section}-->", self.approval_rule))
mutations = {
"draft-protection": ("with no implementation approval, Kanban admission, execution, or completion evidence", "even with implementation approval, Kanban admission, execution, or completion evidence"),
"cardinality": ("between two and six", "at least two"),
"mapping": ("exactly, and reciprocally", "loosely"),
"dependencies": ("all terminal Tasks", "some Tasks"),