Document route policy validation coverage
This commit is contained in:
@@ -77,6 +77,21 @@ ENTRY_ROUTE_SNIPPETS: tuple[str, ...] = (
|
||||
"`naturalize_caption` -> `caption_format_route.py`",
|
||||
)
|
||||
|
||||
AUDIT_DOC_SNIPPETS: tuple[tuple[str, str], ...] = (
|
||||
(
|
||||
"docs/prompt-pool-routing-map.md",
|
||||
"registered route families have SDXL tags",
|
||||
),
|
||||
(
|
||||
"docs/prompt-pool-routing-map.md",
|
||||
"caption labels, and valid incompatibility filters",
|
||||
),
|
||||
(
|
||||
"docs/prompt-pool-routing-map.md",
|
||||
"route-family coverage for registered action and position families",
|
||||
),
|
||||
)
|
||||
|
||||
PROMPT_ROW_READ_SCAN_GLOBS: tuple[str, ...] = (
|
||||
"krea_*.py",
|
||||
"sdxl_*.py",
|
||||
@@ -683,6 +698,11 @@ def _routing_doc_errors() -> list[tuple[str, str, str]]:
|
||||
for snippet in ENTRY_ROUTE_SNIPPETS:
|
||||
if snippet not in route_map_text:
|
||||
errors.append(("(entry route)", "docs/prompt-pool-routing-map.md", f"missing entry snippet: {snippet}"))
|
||||
for doc_name, snippet in AUDIT_DOC_SNIPPETS:
|
||||
doc_path = ROOT / doc_name
|
||||
doc_text = doc_path.read_text(encoding="utf-8") if doc_path.exists() else ""
|
||||
if snippet not in doc_text:
|
||||
errors.append(("(audit doc)", doc_name, f"missing audit snippet: {snippet}"))
|
||||
return errors
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user