← Back to Pull requests

Serialize custom element registry boundaries in XML #92

Closed
unknown closed this pull request without merging on Nov 25, 2026 18:01 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 21:30 UTC
Author

Serialize null and scoped custom element registry boundaries on HTML-namespace elements in XML output, matching the HTML serialization behavior proposed in https://github.com/whatwg/html/pull/12000.

An HTML element gets a generated no-namespace customelementregistry="" attribute when its null or scoped registry differs from the registry it inherits and the attribute is not already present. HTML defines the inherited registry: the parent's, or the node document's when there is no parent or the parent is a plain DocumentFragment.

Existing attributes and namespace handling are preserved, and serialization does not mutate the DOM. As with the HTML proposal, the attribute does not encode scoped registry identity or global-registry boundaries inside null/scoped subtrees.

Companion changes:

  • HTML entry points and fragment serialization: https://github.com/whatwg/html/pull/12000

  • Existing DOM infrastructure: https://github.com/whatwg/dom/pull/1500

  • Tests, including new HTML-document and XHTML XML serialization cases: https://github.com/web-platform-tests/wpt/pull/65320
  • Validation of the initial November 20 revision:

  • ReSpec rendering with --haltonerror: passed, including canonical registry references.

  • git diff --check: passed.

  • HTML companion: source lint and the official remote build passed (exit-code: 0).

  • WPT lint, shared JavaScript syntax, and XHTML well-formedness checks: passed.

  • Edge 158.0.4370.33 ran both new test files using the WPT testharness, with no harness/script errors: 17 subtests passed and 33 failed. The failures expose missing registry-boundary generation and an existing XHTML descendant-registry discrepancy; this PR does not include a browser implementation.

  • Unchanged comparison tests in the same browser: scoped HTML serialization had 14 passes/11 failures, and general XMLSerializer serialization had 27 passes/6 failures. These existing browser failures are not claimed as passing.
  • The normal wpt run setup stalled before executing tests and was stopped. The browser results above were collected by serving the unmodified test files locally and using a testharness completion callback with headless Edge.

    Validation of the November 24 inherited-registry follow-up:

  • Applied Anne van Kesteren's supplied patch, preserving his authorship and its exact source changes.

  • ReSpec rendering with --haltonerror: passed.

  • git show --format= --check HEAD: passed.

  • Local HTML and WPT checkouts are synced to the corresponding inherited-registry changes already present in their PRs. No further source changes or pushes were made there.

  • Browser tests were not rerun for this spec-only follow-up; the browser results above belong to the initial revision.
  • Diff: 344 lines (+258 / -86) across 4 files Reviewer: lukewarlow Review duration: 6991m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 344 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.350
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #92"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.4% (MEDIUM) · Higher = larger blast radius
    42.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%