守住觀測台點陣終端層
All checks were successful
CD Pipeline / deploy (push) Successful in 58s

This commit is contained in:
OoO
2026-05-13 19:07:44 +08:00
parent 46e819a020
commit c5cbc12b13
4 changed files with 28 additions and 337 deletions

View File

@@ -77,6 +77,8 @@ TEMPLATE_RULES = [
REQUIRED_CSS_SNIPPETS = [
"--obs-title-size",
"--obs-value-size",
"--obs-matrix-dot",
"v3.10 terminal dot-matrix layer",
".momo-observability-mode",
".obs-chart-frame",
".obs-chart-frame-tall",
@@ -168,6 +170,31 @@ def scan_css() -> list[str]:
if snippet not in text:
findings.append(f"{CSS_PATH}: missing required token/class `{snippet}`")
terminal_marker = (
"/* v3.10 terminal dot-matrix layer: this must stay at EOF to win the cascade. */"
)
marker_count = text.count(terminal_marker)
if marker_count != 1:
findings.append(
f"{CSS_PATH}: expected exactly one terminal dot-matrix layer, found {marker_count}"
)
else:
marker_pos = text.rfind(terminal_marker)
tail = text[marker_pos:]
if len(tail) > 4200:
findings.append(
f"{CSS_PATH}: terminal dot-matrix layer must remain near EOF so later rules cannot override it"
)
for legacy_marker in (
"v3.8 dot-matrix integration",
"v3.9 final dot-matrix layer",
):
if legacy_marker in text:
findings.append(
f"{CSS_PATH}: remove obsolete `{legacy_marker}`; keep only the v3.10 terminal layer"
)
web_path = ROOT / WEB_CSS_PATH
if not web_path.exists():
findings.append(