content-style gate does not check .astro pages, which is where today's violations were #141

Stängd
öppnade 2026-08-01 14:25:57 +00:00 av supernaut · 0 kommentarer
Ägare

Follow-up to #128, whose gate landed in #137.

The gate reads src/content/**/*.md and src/i18n/*.ts. It does not read .astro files — and
.astro pages are where the violations that motivated the glossary work today actually were:

  • src/pages/pricing.astro said "dedikerad runner" while every Swedish surface the gate does read
    says körare;
  • the same page had wiki, mm and dvs, both spelled-out-shorthand violations.

All three were found by reading, then fixed in #136, and the runner → körare row was added to
docs/content-style.md. But the gate cannot enforce that row where it was broken, so the same fault can
return to the same file tomorrow. A check that reports clean over the surface where the bug was not
gives false assurance, which is worse than no check for the people who trust it.

Why it was scoped this way, and why extending it is not a one-line change

.astro files are code and copy in one file. Running the text rules across them raw would flag class
names, import paths, identifiers and attribute values — the author scoped the globs deliberately rather
than ship a noisy gate. Doing it properly means checking only the parts that are prose: template text
nodes and the string literals that reach the page, not the whole file.

So this needs a small amount of parsing, and it needs the same escape hatch the gate already has
(lang-check-ignore-next-line <rule-id>) to work inside .astro.

Done when

pnpm lang-check would have caught "dedikerad runner", wiki, mm and dvs in
src/pages/pricing.astro, with no false positives on the existing pages, and the lefthook glob and CI
sweep both include .astro.

Follow-up to #128, whose gate landed in #137. The gate reads `src/content/**/*.md` and `src/i18n/*.ts`. It does **not** read `.astro` files — and `.astro` pages are where the violations that motivated the glossary work today actually were: - `src/pages/pricing.astro` said "dedikerad **runner**" while every Swedish surface the gate *does* read says **körare**; - the same page had `wiki, mm` and `dvs`, both spelled-out-shorthand violations. All three were found by reading, then fixed in #136, and the `runner → körare` row was added to `docs/content-style.md`. But the gate cannot enforce that row where it was broken, so the same fault can return to the same file tomorrow. A check that reports clean over the surface where the bug was not gives false assurance, which is worse than no check for the people who trust it. ## Why it was scoped this way, and why extending it is not a one-line change `.astro` files are code and copy in one file. Running the text rules across them raw would flag class names, import paths, identifiers and attribute values — the author scoped the globs deliberately rather than ship a noisy gate. Doing it properly means checking only the parts that are prose: template text nodes and the string literals that reach the page, not the whole file. So this needs a small amount of parsing, and it needs the same escape hatch the gate already has (`lang-check-ignore-next-line <rule-id>`) to work inside `.astro`. ## Done when `pnpm lang-check` would have caught "dedikerad runner", `wiki, mm` and `dvs` in `src/pages/pricing.astro`, with no false positives on the existing pages, and the lefthook glob and CI sweep both include `.astro`.
supernaut lade till detta till projektet Bitborg Web 2026-08-01 19:51:46 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web#141
Ingen beskrivning angiven.