[story #135] DevOps: design-system lint + Lighthouse a11y as merge gates #141
Reference in New Issue
Block a user
Delete Branch "do/INB-1.5-D-lint-ci"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Enforces
docs/design/lint-rules.md(Story #132) as a hard Pillar III gate on every PR againstrelease/v1.5. Each DS-* rule ID maps 1:1 to a Stylelint/ESLint/Breakpoint check; errors block merge.Pattern C deliverable for Story #135 (INB-1.5-D-S4).
Acceptance criteria
design-system-lintjob).Files
ui/.stylelintrc.cjs— DS-C001, DS-T001/002, DS-S001/002, DS-R001, DS-SH001, DS-C004, DS-Z001 viadeclaration-property-value-allowed-listwith a multi-value regex (token references + global keywords, no arbitrary pixel/rem).tokens.cssexempted (generated source).ui/.eslintrc.cjs— DS-C001/002/003, DS-T001/002 for JSX/TSX viano-restricted-syntax.tokens.ts+tokens.test.tsexempted (design system source + assertions).ui/scripts/lint-design-system.mjs— orchestrator. Exits 0/1, JSON or human summary, excludes__fixtures__/from the production scan.ui/scripts/check-breakpoints.mjs— DS-B001/002 walker. Stylelint cannot validate the@mediapixel value so we use a Node walker.ui/scripts/fixture-check.mjs— proves every DS-* rule fires on a negative fixture and stays silent on a positive fixture. The authoritative truth that the lint configuration is correct.ui/lighthouserc.cjs— Lighthouse CI assertion set. NFR-4 (Lighthouse accessibility ≥ 90) is an error-level assertion.ui/src/__fixtures__/— 11 negative + 11 positive fixtures, one per DS-* rule, sourced fromdocs/design/lint-rules.md§3.ui/package.json— adds the lint script entry-points; keeps the existing frontend-engineer deps from Story #134..gitea/workflows/ci-pr.yml— addsdesign-system-lintandlighthouse-a11yjobs. The lighthouse job is intentionally a no-op until a future Story ships the v1.5 preview build.docs/architecture/v1.md— PR CI row now lists the new jobs.docs/runbooks/design-system-lint.md— operator runbook (triage, exemptions, rollback, observability)..gitignore— excludeui/node_modules/and the LHCI cache.Verification
Local:
Risk
A consumer code change that uses a hardcoded value (e.g.,
padding: 13px) will fail the new gate. Story #134's layout CSS (insrc/layout/*.css,src/navigation/*.css) uses raw pixel@mediabreakpoints (DS-B001) and may use multi-value spacing — both will be flagged. That is the intended behaviour: the gate forces the v1.5 frontend to consume the design-system tokens. Layout Story's author should runnpm run lint:breakpointsto see the precise list.Follow-ups
npm run build+ preview server) so thelighthouse-a11ygate transitions from::noticeto active enforcement.