process: enforce issue-status consistency for completion marks (#390) #391
@@ -35,7 +35,7 @@ ALLOWED_PLAN_TARGETS = {
|
|||||||
}
|
}
|
||||||
ISSUE_REF_PATTERN = re.compile(r"#(?P<issue>\d+)")
|
ISSUE_REF_PATTERN = re.compile(r"#(?P<issue>\d+)")
|
||||||
ISSUE_DONE_PATTERN = re.compile(r"(?:✅|머지|해소|완료)")
|
ISSUE_DONE_PATTERN = re.compile(r"(?:✅|머지|해소|완료)")
|
||||||
ISSUE_PENDING_PATTERN = re.compile(r"(?:잔여|오픈 상태|추적)")
|
ISSUE_PENDING_PATTERN = re.compile(r"(?:잔여|오픈 상태|추적 이슈)")
|
||||||
|
|
||||||
|
|
||||||
def iter_docs() -> list[Path]:
|
def iter_docs() -> list[Path]:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ def test_validate_issue_status_consistency_reports_conflicts() -> None:
|
|||||||
path = Path("docs/ouroboros/80_implementation_audit.md").resolve()
|
path = Path("docs/ouroboros/80_implementation_audit.md").resolve()
|
||||||
text = "\n".join(
|
text = "\n".join(
|
||||||
[
|
[
|
||||||
"| REQ-V3-004 | 상태 | 부분 | `#328` 추적 |",
|
"| REQ-V3-004 | 상태 | 부분 | `#328` 잔여 |",
|
||||||
"| 항목 | 상태 | ✅ 완료 | `#328` 머지 |",
|
"| 항목 | 상태 | ✅ 완료 | `#328` 머지 |",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@@ -107,3 +107,14 @@ def test_validate_issue_status_consistency_allows_done_only() -> None:
|
|||||||
module.validate_issue_status_consistency(path, text, errors)
|
module.validate_issue_status_consistency(path, text, errors)
|
||||||
|
|
||||||
assert errors == []
|
assert errors == []
|
||||||
|
|
||||||
|
|
||||||
|
def test_validate_issue_status_consistency_allows_pending_only() -> None:
|
||||||
|
module = _load_module()
|
||||||
|
errors: list[str] = []
|
||||||
|
path = Path("docs/ouroboros/80_implementation_audit.md").resolve()
|
||||||
|
text = "| 항목 | 상태 | 부분 | `#390` 추적 이슈 |"
|
||||||
|
|
||||||
|
module.validate_issue_status_consistency(path, text, errors)
|
||||||
|
|
||||||
|
assert errors == []
|
||||||
|
|||||||
Reference in New Issue
Block a user