generated from coulomb/repo-seed
Add renormalization rule guide
This commit is contained in:
@@ -24,6 +24,7 @@ from consistency_check import (
|
||||
ConsistencyReport,
|
||||
Issue,
|
||||
FILE_TO_DB_WORKSTREAM_STATUS,
|
||||
RENORMALIZATION_RULES,
|
||||
STATUS_ORDER,
|
||||
_BACKGROUND_CHECKS,
|
||||
_detect_behind_remote,
|
||||
@@ -41,6 +42,7 @@ from consistency_check import (
|
||||
parse_frontmatter,
|
||||
parse_task_blocks,
|
||||
render_text,
|
||||
render_renormalization_guide,
|
||||
report_to_dict,
|
||||
)
|
||||
from api.workplan_status import ready_review_status
|
||||
@@ -377,6 +379,20 @@ class TestRenderText:
|
||||
assert "C-08" not in text
|
||||
|
||||
|
||||
class TestRenormalizationGuide:
|
||||
def test_registry_contains_c23_rule(self):
|
||||
rule = next(rule for rule in RENORMALIZATION_RULES if rule.check_id == "C-23")
|
||||
assert "Planning-state" in rule.invariant
|
||||
assert "TestLifecycleRenormalization" in rule.test_anchor
|
||||
|
||||
def test_guide_points_to_next_guard_pattern(self):
|
||||
text = render_renormalization_guide()
|
||||
assert "C-23" in text
|
||||
assert "Add The Next Guard" in text
|
||||
assert "Add detection in check_repo" in text
|
||||
assert "Add the repair branch in fix_repo" in text
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# report_to_dict
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user