Verifying built output (cofferdam verify --dist)
cofferdam verify --dist <dir> is an opt-in check mode for built HTML output — static sites, email templates, or any dist/, .next/, build/ tree your build step already produced. It is deliberately a separate subcommand from cofferdam check, not a flag:
verify --distdiscovers only the directory you name. It never merges intocheck's discovery roots, so a plaincofferdam checkrun is completely unaffected by (and blind to) any dist tree in your repo — even one that's gitignored, sinceverifyignores.gitignorefor the directory you explicitly pointed it at.verify --distruns only checks explicitly tagged as eligible for output mode. Source-level and output-level SEO/HTML checks are complementary, and a single check may be tagged eligible for both — but nothing runs against a--disttree unless it opted in.
Tagging a check as output-mode
- Built-in checks override
Check::output_mode()to returntrue. Defaults tofalse, so every existing check is excluded fromverifyruns unless it opts in explicitly.Html.MissingLangAttributeis the first built-in tagged this way — a build-output page missinglangis exactly the kind of findingverify --distshould catch. - Plugin checks set
outputMode: trueindefineCheck({ ... })(@cofferdam/check-sdk). Defaults tofalse, mirroringrequiresTypes's plumbing end to end.
Usage
sh
cofferdam verify --dist dist/Findings are labeled with their build-output provenance in both output formats: JSON wraps findings in {"origin": "build_output", "dist": "...", "findings": [...]}, and text output prints a banner line noting origin: build_output before the findings.
v1 limitations
- No CSR/SPA support.
verify --distreads the HTML as written to disk; it does not run a headless browser, so content injected client-side (React/Vue/etc. hydration) is invisible to it. Apps with no static HTML output are out of scope for v1 — supporting them would require a headless-render step, which isn't implemented. - No source-mapping. Findings report the location in the built HTML file, not the original template/component that produced it. Mapping build-output findings back to source is build-tool-specific (varies per SSG/framework) and isn't attempted — the reported location is always in the built HTML.