Skip to content

Check the HTML view with the Nu Html Checker in the same pod - #32

Merged
fabianekc merged 1 commit into
mainfrom
nu-html-checker
Oct 26, 2026
Merged

fabianekc merged 1 commit into
mainfrom
nu-html-checker

Conversation

@fabianekc

Copy link
Copy Markdown
Member

Runs the new passport criterion DPP-DAT-020 of dpp-criteria (proposed): the HTML view conforms to the HTML standard, as far as the Nu Html Checker can tell.

html with markup_errors: forbidden

  • Checker: dpplint posts the HTML view, as received and with the media type and charset of the response, to the Nu Html Checker at NU_CHECKER_URL (NuChecker). It never sends the document to a public instance.
  • Result: every message of type error fails the criterion; the message names up to 10 errors with their line. Warnings and other info messages do not count.
  • Skipped (not_evaluated): without NU_CHECKER_URL, if the checker does not answer, answers with an error page or invalid JSON, or reports that it could not check the document (non-document-error). The request keeps within the time limit of the check.

Deployment

  • Each pod runs the checker (ghcr.io/validator/validator, MIT licence, version 26.10.12) as a second container, named by its digest.
  • It listens on 127.0.0.1:8888 only, so only dpplint in the same pod can reach it.
  • It runs with a heap of 192 MB, a memory request of 320 Mi and a limit of 512 Mi.
  • The pod's readiness does not depend on it; a liveness probe restarts it if it stops answering.
  • The README describes the deployment and how to run the checker next to dpplint locally.

Test vectors

Criterion Vectors
DPP-DAT-020 3 valid (one with warnings only), 6 invalid (test/fixtures/files/html/DPP-DAT-020/)

The answers of the checker to the vectors are recorded next to them; the tests answer with them through a local server instead of running the checker. The README in that directory shows how to record them again.

Further tests cover the request to the checker, the messages, the cut after 10 errors, the cases without a usable checker, and the time limit. SlowServer now also reads a request body.

Both reference passports have no error in the checker.

The image is built with the dpp-criteria commit that adds the criterion. kubernetes/deployment.yaml names its digest.

html with markup_errors: forbidden (DPP-DAT-020) posts the HTML view, as
received and with its media type and charset, to the Nu Html Checker at
NU_CHECKER_URL and fails on every message of type error; warnings and
other info messages do not count. Without a checker, or if it does not
answer or cannot check the document, the criterion is skipped.

The deployment runs the checker (ghcr.io/validator/validator, named by
its digest) as a second container of each pod. It listens on 127.0.0.1
only and runs with a heap of 192 MB within a memory limit of 512 Mi; the
readiness of the pod does not depend on it.

Test vectors for DPP-DAT-020 with the recorded answers of the checker are
under test/fixtures/files/html/DPP-DAT-020. The image is built with the
dpp-criteria commit that adds the criterion.
@fabianekc
fabianekc merged commit dc0cbc9 into main Oct 26, 2026
2 checks passed
@fabianekc
fabianekc deleted the nu-html-checker branch October 26, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant