Implement Rec - Phase 2
Quality Gate / gate (push) Successful in 2m36s

This commit is contained in:
Jim Lancaster
2026-09-02 16:05:18 -05:00
parent d5e798825d
commit 4410d23f5c
3 changed files with 117 additions and 36 deletions
+5 -7
View File
@@ -64,7 +64,10 @@ BASELINE_SCAN_EXCLUSIONS = frozenset(
)
_BASELINE_DECLARATION = re.compile(r"Current Baseline:\s*V(\d+\.\d+)")
_CURRENT_VERSION_CLAIM = re.compile(r"\b(?:current|active)\s+V(\d+\.\d+)", re.IGNORECASE)
_BASELINE_CLAIM = re.compile(
r"\b(?:Current Baseline:\s*|current\s+|active\s+|canonical\s+)V(\d+(?:\.\d+)?)",
re.IGNORECASE,
)
def _declared_baseline() -> str:
@@ -98,12 +101,7 @@ def test_canonical_docs_declare_one_consistent_baseline():
for path in _baseline_scanned_docs():
relative = path.relative_to(PROJECT_ROOT).as_posix()
text = path.read_text(encoding="utf-8")
stale = {
version
for pattern in (_BASELINE_DECLARATION, _CURRENT_VERSION_CLAIM)
for version in pattern.findall(text)
if version != baseline
}
stale = {version for version in _BASELINE_CLAIM.findall(text) if version != baseline}
if stale:
violations[relative] = sorted(stale)