gates: re-anchor four site decoys to the shell markup
gates / gates (push) Successful in 6m33s

The decoys plant a known defect and assert the gate convicts, so when the markup
they anchor on changes they must be rebuilt rather than deleted - which is exactly
what test_gate_decoys.py refused to let pass ('the decoy's anchor is gone or
ambiguous').

  en-nav-drift          drifts a SIDEBAR entry now, and expects gate 3b's message
                        rather than gate 3's - the website's <nav> is gone
  leftover-text-switch  anchors on <details class=lang-globe>; the old nav's
                        <li class=lang-globe-li> wrapper no longer exists
  lang-attr             <html lang=en class=no-js>, the progressive-enhancement hook
  ascii-hungarian-text  anchors on the new English home's own link text; its old
                        'Contact form' link went when the page became a real twin

The other decoys in that section still anchor correctly and were left alone -
checked each one against the new files rather than rewriting the lot.
This commit is contained in:
2026-10-11 16:05:14 +02:00
parent bd708b3593
commit f92e81ee14
+9 -5
View File
@@ -524,9 +524,12 @@ def replace_in(path, old, new):
# page, a translator leaving a Hungarian word without accents, a status message left in a script. # page, a translator leaving a Hungarian word without accents, a status message left in a script.
_WEB = os.path.join(ROOT, "website") _WEB = os.path.join(ROOT, "website")
_EN = lambda f: os.path.join(_WEB, "en", f) _EN = lambda f: os.path.join(_WEB, "en", f)
# M3 (2026-10-11): the website's <nav> became the controller's sidebar, so this decoy now drifts
# a sidebar entry and expects gate 3b's message instead of gate 3's.
decoy("site/en-nav-drift", "site_gates.py", decoy("site/en-nav-drift", "site_gates.py",
replace_in(_EN("technology.html"), '<li><a href="/en/apps">Apps</a></li>', '<li><a href="/en/apps">Applications</a></li>'), replace_in(_EN("technology.html"), '<li><a href="/en/apps">All applications</a></li>',
must="en/technology.html: <nav> differs from en/index.html") '<li><a href="/en/apps">Every application</a></li>'),
must='en/technology.html: <nav class="sidebar"> differs from')
decoy("site/hreflang-wrong", "site_gates.py", decoy("site/hreflang-wrong", "site_gates.py",
replace_in(_EN("faq.html"), '<link rel="alternate" hreflang="en" href="https://felhom.eu/en/faq">', replace_in(_EN("faq.html"), '<link rel="alternate" hreflang="en" href="https://felhom.eu/en/faq">',
'<link rel="alternate" hreflang="en" href="https://felhom.eu/en/apps">'), '<link rel="alternate" hreflang="en" href="https://felhom.eu/en/apps">'),
@@ -547,7 +550,8 @@ decoy("site/globe-wrong-order", "site_gates.py",
replace_in(_EN("apps.html"), "<li>" + _GHU + "</li><li>" + _GEN + "</li>", "<li>" + _GEN + "</li><li>" + _GHU + "</li>"), replace_in(_EN("apps.html"), "<li>" + _GHU + "</li><li>" + _GEN + "</li>", "<li>" + _GEN + "</li><li>" + _GHU + "</li>"),
must="en/apps.html: the globe lists [('en', 'English'), ('hu', 'Magyar')]") must="en/apps.html: the globe lists [('en', 'English'), ('hu', 'Magyar')]")
decoy("site/leftover-text-switch", "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">'), replace_in(_EN("apps.html"), '<details class="lang-globe">',
'<a href="/alkalmazasok" lang="hu" hreflang="hu" class="lang-switch">Magyar</a><details class="lang-globe">'),
must='en/apps.html: a leftover text language switch') must='en/apps.html: a leftover text language switch')
# R-912 (2026-10-10, gate 19): the measured 2026-10-08 shape — Crafty Controller's logo under ANOTHER name # R-912 (2026-10-10, gate 19): the measured 2026-10-08 shape — Crafty Controller's logo under ANOTHER name
# (`crafty-logo.png`), so the dashboard asked for `crafty-controller-logo.*` and showed the grey placeholder. # (`crafty-logo.png`), so the dashboard asked for `crafty-controller-logo.*` and showed the grey placeholder.
@@ -583,13 +587,13 @@ decoy("site/viewer-inline-copy-back", "site_gates.py",
" <script>\n /**\n * Screenshot Gallery / Lightbox functionality\n */\n </script>\n</body>"), " <script>\n /**\n * Screenshot Gallery / Lightbox functionality\n */\n </script>\n</body>"),
must="alkalmazasok.html: an inline copy of the picture viewer") must="alkalmazasok.html: an inline copy of the picture viewer")
decoy("site/lang-attr", "site_gates.py", decoy("site/lang-attr", "site_gates.py",
replace_in(_EN("backups.html"), '<html lang="en">', '<html lang="hu">'), replace_in(_EN("backups.html"), '<html lang="en" class="no-js">', '<html lang="hu" class="no-js">'),
must="the English set needs lang='en'") must="the English set needs lang='en'")
decoy("site/app-missing-one-side", "site_gates.py", decoy("site/app-missing-one-side", "site_gates.py",
replace_in(_EN("apps.html"), '<img src="/assets/radicale-logo.svg" alt="Radicale" class="app-logo">', ""), replace_in(_EN("apps.html"), '<img src="/assets/radicale-logo.svg" alt="Radicale" class="app-logo">', ""),
must="the apps pages show DIFFERENT apps") must="the apps pages show DIFFERENT apps")
decoy("site/ascii-hungarian-text", "site_gates.py", decoy("site/ascii-hungarian-text", "site_gates.py",
replace_in(_EN("index.html"), "Contact form</a>", "Kapcsolatfelveteli urlap</a>"), replace_in(_EN("index.html"), "Who is behind it", "Kapcsolatfelveteli urlap"),
must="en/index.html: Hungarian on an English page (the Hungarian stem 'kapcsolat')") must="en/index.html: Hungarian on an English page (the Hungarian stem 'kapcsolat')")
decoy("site/hungarian-in-script", "site_gates.py", decoy("site/hungarian-in-script", "site_gates.py",
replace_in(_EN("contact.html"), "showStatus('Fill in every required field.', 'error-state');", replace_in(_EN("contact.html"), "showStatus('Fill in every required field.', 'error-state');",