Skip to content

Harden invariant evaluation engine and add protocol and packaging contract tests. - #3303

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_974402084
Open

Harden invariant evaluation engine and add protocol and packaging contract tests.#3303
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_974402084

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 1, 2026

Copy link
Copy Markdown

Harden invariant evaluation engine and add protocol and packaging contract tests.

Key Capabilities:

  1. Cross-Realm SVG Geometry & Shadow DOM Invariants (tests/ui/invariants.py):
    • Adds check_svg_geometry_deep() traversing SVG namespaces, Shadow DOM, and iframes via pure Python Playwright locators to detect non-finite numerical coordinates (e.g. NaN attributes in chart trendlines).
    • Adds run_cell_invariants_optimized() with leaf-aligned header inspection, diff column awareness, and poison token scanning ((null), INVALID, [object Object]).
    • Modernizes type annotations to PEP 585 standard collections.
  2. Server Protocol & Packaging Integrity (tests/ui/test_server_and_packaging.py):
    • Verifies runtime.js is served with application/javascript MIME type.
    • Verifies unmapped static routes return HTTP 404 rather than being masked by catch-all fallback.
    • Asserts repository working tree purity to prevent server caches from polluting tracked demo files.
    • Verifies proto interface declaration archives (.d.ts.gz) are valid and declared in BUILD.oss.
    • Forbids unexported raw internal import paths in frontend source files.

@copybara-service copybara-service Bot changed the title Harden invariant evaluation engine and add HTTP protocol and packaging contract tests. Harden invariant evaluation engine and add protocol and packaging contract tests. Sep 1, 2026
…tract tests.

Key Capabilities:
1. Cross-Realm SVG Geometry & Shadow DOM Invariants (tests/ui/invariants.py):
   - Adds check_svg_geometry_deep() traversing SVG namespaces, Shadow DOM, and iframes via pure Python Playwright locators to detect non-finite numerical coordinates (e.g. NaN attributes in chart trendlines).
   - Adds run_cell_invariants_optimized() with leaf-aligned header inspection, diff column awareness, and poison token scanning ((null), INVALID, [object Object]).
   - Modernizes type annotations to PEP 585 standard collections.
2. Server Protocol & Packaging Integrity (tests/ui/test_server_and_packaging.py):
   - Verifies runtime.js is served with application/javascript MIME type.
   - Verifies unmapped static routes return HTTP 404 rather than being masked by catch-all fallback.
   - Asserts repository working tree purity to prevent server caches from polluting tracked demo files.
   - Verifies proto interface declaration archives (.d.ts.gz) are valid and declared in BUILD.oss.
   - Forbids unexported raw internal import paths in frontend source files.

PiperOrigin-RevId: 974402084
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants