descrip length check and fix

This commit is contained in:
jason
2026-06-23 07:18:23 -05:00
parent d34fbf7626
commit 5529771ec8
5 changed files with 20 additions and 2 deletions
@@ -61,6 +61,15 @@ def test_read_many_tolerates_unreadable_file_as_none() -> None:
echo.get_text = orig
def test_plugin_description_under_500_chars() -> None:
# Marketplace cap — the description has silently regressed past it before (a 525-char
# relapse + an earlier "fix description length" commit). build.py fails the build on this;
# this guards it in CI so it's caught before packaging.
manifest = Path(__file__).resolve().parents[3] / ".claude-plugin" / "plugin.json"
desc = json.loads(manifest.read_text(encoding="utf-8")).get("description", "")
assert 0 < len(desc) < 500, f"plugin description is {len(desc)} chars (must be under 500)"
def test_stem_extracts_literal_directory_prefix() -> None:
assert check_routing.stem(r"^projects/active/[^/]+\.md$") == "projects/active/"
assert check_routing.stem(r"^areas/(business|personal)/[^/]+\.md$") == "areas/"