website: the dashboard shown — 4 real screenshots per language on the home page, 2 on the technology page (controller 0.303.0, demo-hp household guest, privacy-scanned); site gate 19 (pictures in the page's language) + decoy; R-906, R-907 (dashboard defects seen); 129 -> 131
gates / gates (push) Successful in 4m12s
gates / gates (push) Successful in 4m12s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
## gates — site gate 19: dashboard pictures in the page's own language (2026-10-08)
|
||||
|
||||
- `site_gates.py` gate 19: every `/assets/dashboard-*-(hu|en).webp` on a page must match the page's language set.
|
||||
Decoy `site/dashboard-picture-wrong-language` (the English home page given `dashboard-start-hu.webp`) convicts with
|
||||
„en/index.html: a hu dashboard picture … on a en page".
|
||||
|
||||
## gates — the decoy suite runs one at a time (2026-10-08, fixed without a row)
|
||||
|
||||
- `test_gate_decoys.py` takes an exclusive `fcntl.flock` on `.git/decoy-suite.lock` before planting anything. Two runs at
|
||||
|
||||
+14
-1
@@ -28,6 +28,7 @@ Gates (all must pass; non-zero exit on any failure):
|
||||
retrieval promise beyond what the Hungarian twin makes
|
||||
17. faq-ld — each FAQ page's FAQPage JSON-LD carries exactly its visible questions and answers
|
||||
18. tail — nothing after </html> (a stray file-dump summary sat visible below technologiak.html)
|
||||
19. dash-lang — a page shows dashboard pictures only in its own language (`dashboard-*-hu.webp` / `-en.webp`)
|
||||
"""
|
||||
import html as _html, io, json, os, re, sys, unicodedata
|
||||
|
||||
@@ -439,8 +440,20 @@ for p, s in pages.items():
|
||||
if i < 0 or s[i + len("</html>"):].strip():
|
||||
fail("%s: text after </html> (%r) — it renders on the page" % (p, s[i + 7:i + 87] if i >= 0 else "no </html>"))
|
||||
|
||||
# gate 19: dashboard pictures in the page's own language (2026-10-08). The dashboard speaks both languages and the
|
||||
# site shows it in each: an English page may not carry a `dashboard-*-hu.webp`, a Hungarian page a `-en.webp`.
|
||||
_DASH_RE = re.compile(r"/assets/dashboard-[a-z0-9-]+?-(hu|en)\.webp")
|
||||
_dash_n = 0
|
||||
for p, s in pages.items():
|
||||
want = lang_of(p)
|
||||
for m in _DASH_RE.finditer(s):
|
||||
_dash_n += 1
|
||||
if m.group(1) != want:
|
||||
fail("%s: a %s dashboard picture (%s) on a %s page — use the page's own language" % (p, m.group(1), m.group(0), want))
|
||||
print(" dashboard pictures: %d references, each in its page's language" % _dash_n)
|
||||
|
||||
if fails:
|
||||
print("\nSITE GATES FAILED: %d problem(s)" % len(fails))
|
||||
sys.exit(1)
|
||||
print("site gates OK — BOM, emoji=0, nav/footer per language, analytics, no CDN, no legacy tokens, no <style>, "
|
||||
"cache-busted assets, twins + hreflang + globe, lang, same apps, no Hungarian in English, FAQ JSON-LD, clean tail")
|
||||
"cache-busted assets, twins + hreflang + globe, lang, same apps, no Hungarian in English, FAQ JSON-LD, clean tail, dashboard pictures per language")
|
||||
|
||||
@@ -82,7 +82,7 @@ COVERS = {
|
||||
"switch at the wrong twin, lang=\"hu\" on an English page, an app missing from one apps page, "
|
||||
"ASCII-only Hungarian in English text and in a script message, a 'please', an English "
|
||||
"retrieval promise the Hungarian does not make, a FAQ JSON-LD drifting from the visible "
|
||||
"answer, and text after </html> — each must convict WITH its own failure line"),
|
||||
"answer, text after </html>, and a Hungarian dashboard picture on an English page — each must convict WITH its own failure line"),
|
||||
"script-tests": ("R-885: FIVE cases in scripts/test_script_tests_gate.py, run from here: a suite that PRINTS "
|
||||
"OK and exits 1 (label without fact), a failing suite three levels deep (scope is a walk), "
|
||||
"an empty scripts/ tree (checked nothing), the genuine article (must pass), the nested mark"),
|
||||
@@ -540,6 +540,10 @@ decoy("site/globe-wrong-order", "site_gates.py",
|
||||
decoy("site/leftover-text-switch", "site_gates.py",
|
||||
replace_in(_EN("apps.html"), '<li class="lang-globe-li">', '<li><a href="/alkalmazasok" lang="hu" hreflang="hu" class="lang-switch">Magyar</a></li><li class="lang-globe-li">'),
|
||||
must='en/apps.html: a leftover text language switch')
|
||||
# the dashboard pictures (2026-10-08): a Hungarian picture copied onto the English home page
|
||||
decoy("site/dashboard-picture-wrong-language", "site_gates.py",
|
||||
replace_in(_EN("index.html"), 'src="/assets/dashboard-start-en.webp"', 'src="/assets/dashboard-start-hu.webp"'),
|
||||
must="en/index.html: a hu dashboard picture (/assets/dashboard-start-hu.webp) on a en page")
|
||||
decoy("site/lang-attr", "site_gates.py",
|
||||
replace_in(_EN("backups.html"), '<html lang="en">', '<html lang="hu">'),
|
||||
must="the English set needs lang='en'")
|
||||
|
||||
Reference in New Issue
Block a user