Skip to content

finding: the DOM-leak "is this attribute HTML-defined" judge now exists in two copies, in two test files that cannot import each other #4434

Description

@yinlianghui

Observation-class. Nothing a user hits; recorded so the next agent touching either gate knows the duplication is deliberate and temporary rather than an accident.

The two copies

The attribute judge — isKnownAttribute / findLeaks / the IDL-reflection trick / the happy-dom gap table / the SVG attribute list — now lives twice:

Why it was copied rather than shared

The original judge is defined inside a test file and is not exported, so reusing it would mean editing packages/fields — out of scope for #4425 phase 1, which is measurement-only and leaves the fields gate untouched as the reference implementation the card points at. Copying was the smaller change; it is not the right end state.

Why it is worth closing eventually

The judge encodes measured environment facts that drift: the happy-dom IDL gaps (select[size], option[label], textarea[wrap], col[span]), the SVG presentation list, the open-family prefixes. The sweep copy already needed SVG entries the fields copy does not have (orient, refx, refy, markerwidth, … — recharts markup the fields gate never renders). So the two are already not identical, and a happy-dom upgrade that changes IDL coverage now has to be discovered twice. Each gate's calibration fixtures fail loudly in that case, which is what keeps this at observation grade rather than a defect.

Fix shape

Extract to one home both gates may import — a small test-support module in a package packages/fields and packages/app-shell can both depend on, with the calibration fixtures moving next to it so the shared judge proves itself once. Sequence it with #4425 phase 2 if that decision changes what the judge has to know; there is no value in extracting it twice.


Generated by Claude Code

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions