feat(html): add Nu HTML Checker (vnu) gate (config-driven)#9
Merged
Conversation
…e evidence)
Promotes bd-site's bespoke vnu gate into the kit (epic prx-em8h), matching the
axe-gate pattern: pure parse/evaluate core (unit-tested over synthetic vnu payloads,
no Java) + config-driven CLI + ck-html-validator-gate bin + good/bad fixtures.
Runs vnu (the Nu Html Checker, a self-contained Java jar via vnu-jar — headless, no
browser, no network) --errors-only over a project's built pages and FAILS CLOSED
above $HTML_THRESHOLD (default 0). $HTML_DIST/$HTML_PAGES/$HTML_REPORT configurable;
no site coupling (drops bd-site's data/conformance-evidence.json read). Emits the
`htmlValidator: {errors}` envelope lone's conformance() consumes for html.validator-clean.
Tests: pure parse/threshold logic + a best-effort real-vnu e2e over the fixtures
(bad=1 error, good=clean; tolerated skip when no JRE). node test/run.mjs → 15/0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bdelanghe
added a commit
that referenced
this pull request
Jun 29, 2026
…mance evidence) (#10) Third and final gate-promotion (epic prx-em8h). Promotes bd-site's bespoke baseline gate into the kit, same pattern as vuln (#7), vnu (#9), axe (#6). Maps the SHIPPED CSS to web-features Baseline data via stylelint-plugin-use-baseline (headless, no browser) and FAILS CLOSED when the site-wide status is below target. HONEST: reports the MEASURED status (widely/newly/limited = the worst feature used); a feature guarded behind an @supports query is a tested fallback and doesn't count. Config-driven ($BASELINE_CSS/$BASELINE_TARGET/$BASELINE_REPORT); no site coupling. Emits the `baseline: {status, fallbackTested}` envelope lone's conformance() consumes for compatibility.baseline. Unlike vnu/axe, the engine (stylelint) is pure npm, so the fixture e2e is DETERMINISTIC and runs in CI (no skip). Tests: pure classify/threshold logic + e2e over good (widely) / bad (:has + ::selection → limited) fixtures. node test/run.mjs → 16/0. With this, all three bd-site gates are reusable in the kit; bd-site can now consume them vendored (prx-v5ry), and the kit is ready to publish (prx-47qm). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second gate-promotion (epic prx-em8h). Promotes bd-site's bespoke vnu gate into the kit, same pattern as vuln (#7) and axe (#6).
What
gates/html-validator-gate.mjs(+ck-html-validator-gatebin): runs vnu (the Nu Html Checker, a self-contained Java jar viavnu-jar— headless, no browser, no network)--errors-onlyover built pages and fails closed above the threshold.parseVnu,evaluateHtml) — unit-tested over synthetic vnu payloads, no Java.$HTML_DIST,$HTML_PAGES,$HTML_THRESHOLD,$HTML_REPORT. No site coupling.htmlValidator: { errors }for lone'shtml.validator-clean.fixtures/html/{good,bad}.html(bad = a<ul>inside<span>, which vnu errors on).Verification
node test/run.mjs→ 15 passed, 0 failed. Pure parse/threshold logic + a best-effort real-vnu e2e (bad=1 error, good=clean; tolerated skip when no JRE, like the axe e2e skips without a browser).Next (prx-em8h)
baseline gate, then bd-site consumes the vendored gates, then publish the kit.
🤖 Generated with Claude Code