π OpenHands: AI-Driven Development
fix(ci): stop treating markdown as frontend evidence-bearing code (#16693)
MarMar Labs48038afbcc74
diff --git a/.github/scripts/check_pr_description.py b/.github/scripts/check_pr_description.pyindex 93f91ff38f..185eef34e2 100644--- a/.github/scripts/check_pr_description.py+++ b/.github/scripts/check_pr_description.py@@ -57,6 +57,8 @@ FRONTEND_FILE_EXTENSIONS: tuple[str, ...] = (".sass",".less",)+# Docs carry no visual state, so a screenshot can't evidence a change to them.+DOCUMENTATION_FILE_EXTENSIONS: tuple[str, ...] = (".md", ".mdx")FRONTEND_CONFIG_GLOBS: tuple[str, ...] = ("tailwind.config.*","vite.config.*",@@ -155,9 +157,11 @@ def extract_human_note(body: str) -> str:def is_frontend_file(path: str) -> bool:"""Return True if a changed file should be treated as frontend code."""normalized = path.lstrip("./")+ lower = normalized.lower()+ if lower.endswith(DOCUMENTATION_FILE_EXTENSIONS):+ return Falseif any(normalized.startswith(prefix) for prefix in FRONTEND_PATH_PREFIXES):return True- lower = normalized.lower()if any(lower.endswith(ext) for ext in FRONTEND_FILE_EXTENSIONS):return Truename = normalized.split("/")[-1]diff --git a/.github/scripts/tests/test_pr_description.py b/.github/scripts/tests/test_pr_description.pyindex dcb4cda38e..8fe26393af 100644--- a/.github/scripts/tests/test_pr_description.py+++ b/.github/scripts/tests/test_pr_description.py@@ -8,6 +8,8 @@ from unittest.mock import patchsys.path.insert(0, str(Path(__file__).resolve().parent.parent))from check_pr_description import (+ is_frontend_file,+ touches_frontend,extract_linked_issue_numbers,extract_pr_type,validate_linked_issue_ready,@@ -222,3 +224,23 @@ https://youtube.com/watch?v=abc123"""errors = validate_bug_fix_evidence(body)assert errors == []+++def test_markdown_under_frontend_prefix_is_not_frontend():+ assert not is_frontend_file("__tests__/router.md")+ assert not is_frontend_file("src/notes.md")+ assert not is_frontend_file("public/README.mdx")++def test_markdown_outside_frontend_prefix_still_not_frontend():+ assert not is_frontend_file("docs/README.md")++def test_frontend_code_under_prefix_still_frontend():+ assert is_frontend_file("src/app.tsx")+ assert is_frontend_file("__tests__/routes/launch.test.tsx")+ assert is_frontend_file("src/styles/main.css")++def test_docs_only_change_does_not_require_frontend_evidence():+ assert not touches_frontend(["__tests__/router.md", "docs/README.md"])++def test_mixed_change_still_requires_frontend_evidence():+ assert touches_frontend(["__tests__/router.md", "src/app.tsx"])