test: protect planning readiness gate

This commit is contained in:
2026-09-02 14:58:53 +00:00
parent 5cc95e0ce9
commit 08dd1996e6
+3
View File
@@ -21,6 +21,7 @@ def policy_failures(section: str, approval_rule: str) -> list[str]:
"dependencies": r"(?m)^4\. encode acyclic within-Feature sequencing and require every entry Task to depend on all terminal Tasks of every prerequisite Feature;$",
"contract": r"(?m)^5\. give each Task one specific outcome, repository/component owner, canonical/display identity, task-specific implementation artifacts, concrete inputs and outputs, failure boundaries, exclusions, verification steps, and future acceptance-evidence requirements;$",
"separate-gates": r"(?m)^6\. keep draft Tasks separate from implementation approval and Kanban Focus admission\.$",
"planning-readiness": r"(?m)^Architecture must not report planning readiness while any Feature allocated to the release lacks this complete Task breakdown\. A Feature-shaped placeholder Task, a generated empty Task group, or requirement coverage without executable Tasks does not satisfy the gate\.$",
"protected-history": r"(?m)^Approved, Kanban-admitted, in-progress, or completed Tasks must not be deleted or silently rewritten\. Retain an obsolete Task with a terminal Superseded or Cancelled status, its prior evidence and history, and explicit replacement links\.$",
"approval-invalidation": approval_rule,
}
@@ -44,6 +45,8 @@ class TaskBreakdownPolicyTest(unittest.TestCase):
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"),
"planning-readiness": ("must not report planning readiness", "may report planning readiness"),
"placeholder-rejection": ("A Feature-shaped placeholder Task, a generated empty Task group, or requirement coverage without executable Tasks does not satisfy the gate.", ""),
"cardinality": ("between two and six", "at least two"),
"mapping": ("exactly, and reciprocally", "loosely"),
"dependencies": ("all terminal Tasks", "some Tasks"),