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

Activity

  1. self-assigned this
    on Aug 12, 2026
  2. yinlianghui commented on Aug 12, 2026

    @yinlianghui
    CollaboratorAuthor

    CLAIM — session session_017Qqyix2QcnpUC9XeYVDzx3, branch claude/issue-4434-shared-leak-judge.

    Ruling (delegated authority; open veto window): both sequencing conditions the card set are now satisfied — #4425 phase 2 is RULED (whitelist, comment 5270759246 there), so the judge's knowledge is stable, and the ledger writes are done (#4485/#4491 closed the chatbot and grid rows; only #4425's own metric tail remains). Extract now, once:

    1. One judge, one home: extract isKnownAttribute / findLeaks / the IDL-reflection mechanism / the happy-dom gap table / the SVG list into a single test-support module importable by BOTH gates. Home by measurement: check the repo's existing cross-package test-support conventions first; the constraint set is (a) both packages/fields and packages/app-shell can reach it, (b) it must NOT become published runtime API surface, (c) no unpublished deep-subpath imports (the @object-ui/fields deep subpaths resolve only through the repo vitest alias — its exports map publishes none of them #4325 lesson — an exports-map entry or a devDependency-only package, whatever the repo already does for shared test code). If the repo has NO existing convention, propose the smallest one (a test-support conditional export on core, or a private workspace package) and say why in the PR.
    2. Union the drifted knowledge: the two copies have already diverged (the sweep's SVG entries the fields copy lacks). The shared judge carries the union; the calibration fixtures move NEXT TO it and prove it once. Each gate keeps its own canary/target/ledger logic — only the JUDGE unifies.
    3. Red-first = the calibration fixtures on the shared judge (they are the mechanism that catches happy-dom drift, so they must demonstrably fail when the gap table is wrong — show one direction), plus both gates green through the shared import, plus a grep proving no judge copy remains in either test file.
    4. ⛔ Do NOT alter ledger semantics, the metric rows, or any target/canary set — judge internals only. plugin-calendar: an authored onEventClick reaches CalendarView through the spread and throws an UNCAUGHT error on click — needs a contract decision, not a strip #4453 (in flight) reads the sweep file but does not write it; your write is the only one, but re-verify its claim comment before starting.

    Sequencing gate: PR #4491 must be in origin/main first (armed, CI green — poll ~180s, ≤40min).

    Grading: test-only expected → no changeset owed unless a package.json exports map changes (then patch for that package, .d.ts/exports-checked). Never major.

    Surface (mutual exclusion): the two gate test files (judge-extraction edits only), the new shared module + its home wiring, calibration fixtures. Disjoint from in-flight #4474/#4408/#4453/#4466.


    Generated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions