# WPT Node.js Conformance & Feasibility Architecture This document describes the unified architecture for running W3C Web Platform Tests (WPT) in pure Node.js, how achievable ("feasible") conformance denominators are determined, what constitutes an out-of-scope test versus a genuine CSSOM bug, and how to maintain and triage these boundaries over time. --- ## 1. Conformance Principles & Anti-Greenwashing Invariants `cssomnom` builds a spec-compliant CSS Object Model (CSSOM) and CSS Typed OM implementation in pure TypeScript. - **Pure Node.js Environment**: Tests execute inside Node.js using an in-memory DOM ([LinkeDOM](https://github.com/WebReflection/linkedom)) without a visual browser layout engine, GPU rasterizer, OS windowing system, or live hardware input drivers. - **Anti-Greenwashing Invariant**: We **never** declare a test "out of scope" simply because it is difficult, exposes a parser bug, or requires non-trivial AST manipulation. A test is considered out-of-scope **only if it is physically impossible to satisfy in headless Node.js without a full browser engine**. - **Executable Ground Truth**: Ground truth is enforced by executable unit tests in [`tests/wpt-classifier.test.ts`](../../../tests/wpt-classifier.test.ts), not unmaintained static JSON catalogs that drift out of sync. --- ## 2. The Single Unified Architecture All WPT test execution, failure clustering, and feasibility evaluation is consolidated into a single configuration and a single runtime engine: ```mermaid graph TD Config["tests/wpt-node-config.json
(ONLY Configuration File: Spec paths & runner blockers)"] Runner["scripts/wpt/node/cli.ts run
(Unified Test Runner)"] Classifier["scripts/wpt/node/core/classifier.ts
(ONLY Feasibility Engine: 7 Capability Boundaries)"] Cluster["scripts/wpt/node/commands/cluster.ts
(Failure Cluster Triage: pnpm run wpt:cluster)"] UnitTests["tests/wpt-classifier.test.ts
(Executable Committee Ground Truth in CI)"] Config --> Runner Runner --> Classifier Classifier --> UnitTests Runner --> Cluster ``` ### The Single Configuration File: `tests/wpt-node-config.json` `tests/wpt-node-config.json` is the **only** configuration file in the repository. Its `exclude` list is strictly reserved for **Runner Blockers**: 1. **Visual Reftests**: Tests declaring `` with 0 JavaScript assertions (requiring a pixel-rendering engine). 2. **VM Syntax/Loader Crashes**: Files containing `