Measured on ConductionNL/launchpad @ development, hydra-gates at main (756fe89), full tree.
[gate-31] img-alt: FAIL — 1 <img> tag(s) without alt attribute
src/components/OrgNavigationItem.vue: <img>
There is no <img> in that component. The file's only occurrence of the string is inside a JSDoc comment in the <script> block:
$ grep -n '<img' src/components/OrgNavigationItem.vue
83: * resolves any value the icon picker emits — a URL (→ `<img>`), an SVG
$ grep -n '^<template>\|^</template>\|^<script>\|^</script>' src/components/OrgNavigationItem.vue
6:<template>
62:</template>
64:<script>
216:</script>
Line 83 is inside <script> (64–216), in a docblock explaining that CnDashboardIcon resolves a URL to an <img>. It is prose about markup, in backticks, in a comment, in the wrong SFC block entirely. The template contains no <img> at all.
This is the third instance of the same family:
The family is worth naming: a checker that greps raw file text for markup fails in both directions at once — it misses the real thing when it is written differently, and it fires on any mention of it in prose.
Suggested direction
gate-31 should scan the <template> block only, with comments stripped, the same way check_apphost_autoload_prelude.py now calls strip_comments() before matching. Two cheap guards, both testable:
- Slice the SFC to its
<template> region before matching — nothing in <script> or <style> can render an <img>.
- Strip
<!-- … -->, // and /* … */ comments, and inline-code spans, before matching.
A fixture that would have caught it: a .vue file whose <script> docblock contains `<img>` and whose template contains none — must report 0. Paired with the positive control (a real <img> with no alt in the template — must report 1), so the relaxation cannot be over-applied.
src/components/OrgNavigationItem.vue at launchpad development is a clean reproduction.
Measured on ConductionNL/launchpad @
development, hydra-gates atmain(756fe89), full tree.There is no
<img>in that component. The file's only occurrence of the string is inside a JSDoc comment in the<script>block:Line 83 is inside
<script>(64–216), in a docblock explaining thatCnDashboardIconresolves a URL to an<img>. It is prose about markup, in backticks, in a comment, in the wrong SFC block entirely. The template contains no<img>at all.This is the third instance of the same family:
has_prelude()matched inside comments, and a commented-out prelude counted as a prelude — false GREEN (fix(hydra-gates): gate-64 read spelling, not code — 2 false REDs and 1 false GREEN #184)<img>written in a comment — false RED (this one)The family is worth naming: a checker that greps raw file text for markup fails in both directions at once — it misses the real thing when it is written differently, and it fires on any mention of it in prose.
Suggested direction
gate-31 should scan the
<template>block only, with comments stripped, the same waycheck_apphost_autoload_prelude.pynow callsstrip_comments()before matching. Two cheap guards, both testable:<template>region before matching — nothing in<script>or<style>can render an<img>.<!-- … -->,//and/* … */comments, and inline-code spans, before matching.A fixture that would have caught it: a
.vuefile whose<script>docblock contains`<img>`and whose template contains none — must report 0. Paired with the positive control (a real<img>with noaltin the template — must report 1), so the relaxation cannot be over-applied.src/components/OrgNavigationItem.vueat launchpaddevelopmentis a clean reproduction.