Skip to content

Resolve open frontend, routing, and packaging defects in OpenXLA XProf: - #3304

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

Resolve open frontend, routing, and packaging defects in OpenXLA XProf:#3304
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_974413011

Conversation

@copybara-service

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

Copy link
Copy Markdown

Resolve open frontend, routing, and packaging defects in OpenXLA XProf:

  1. Build & Packaging Integrity:
    • Exclude unexported syntax highlight service from Copybara export and
      keep METADATA excluded_files in sync (copy.bara.sky, METADATA).
    • Package runtime.js in static assets filegroup (static/BUILD,
      static/runtime.js).
  2. Server & Routing Contract:
    • Route runtime.js and return HTTP 404 for unmapped endpoints to prevent
      catch-all HTML masking (server.py, profile_plugin.py, runtime.js).
    • Add WSGI routing unit tests verifying root path dispatch, prefix
      stripping, and 404 handling (server_test.py).
    • Provide offline asset fallback with timeout in index.html when CDN is
      unreachable, preventing redundant secondary requests (static/index.html).
    • Secure and isolate server tool caches to user-scoped temporary directories
      for demo repositories, safely handling filesystem separation between local
      and remote run dirs (profile_plugin.py, tools_cache_test.py).
  3. Client Diagnostic & Data Invariants:
    • Register XProfErrorHandler using type narrowing in app_module.ts to log
      full exception messages and interactive stack traces, accompanied by unit
      tests (app_module.ts, app_module_test.ts).
    • Sanitize uninitialized GPU memory pointers ((null), INVALID, nullptr) with
      a constant Set in cleanCellToken and comprehensive unit tests
      (memory_breakdown_table.ts, memory_breakdown_table_test.ts).
    • Extract clampDataTableNumericValues utility for boundary clamping of
      non-finite and negative metrics (chart_utils.ts, chart_utils_test.ts).
    • Clamp non-finite (NaN) values to 0 in SVG step time graph geometry
      (step_time_graph.ts).
    • Clamp host/device synchronization self-time skew to prevent negative step
      durations in input pipeline analyzer (xplane_to_step_events.cc,
      device_side_analysis_detail_data_provider.ts).

@copybara-service
copybara-service Bot force-pushed the test_974413011 branch 2 times, most recently from 1600e3d to 5ccca72 Compare September 1, 2026 11:28
@copybara-service copybara-service Bot changed the title Remediates open frontend, routing, and packaging defects tracked in b/552235521: Resolve open frontend, routing, and packaging defects in OpenXLA XProf: Sep 1, 2026
@copybara-service
copybara-service Bot force-pushed the test_974413011 branch 4 times, most recently from d6e2d58 to dd14d11 Compare September 2, 2026 10:33
1. Build & Packaging Integrity:
   - Exclude unexported syntax highlight service from Copybara export and
     keep METADATA excluded_files in sync (copy.bara.sky, METADATA).
   - Package runtime.js in static assets filegroup (static/BUILD,
     static/runtime.js).
2. Server & Routing Contract:
   - Route runtime.js and return HTTP 404 for unmapped endpoints to prevent
     catch-all HTML masking (server.py, profile_plugin.py, runtime.js).
   - Add WSGI routing unit tests verifying root path dispatch, prefix
     stripping, and 404 handling (server_test.py).
   - Provide offline asset fallback with timeout in index.html when CDN is
     unreachable, preventing redundant secondary requests (static/index.html).
   - Secure and isolate server tool caches to user-scoped temporary directories
     for demo repositories, safely handling filesystem separation between local
     and remote run dirs (profile_plugin.py, tools_cache_test.py).
3. Client Diagnostic & Data Invariants:
   - Register XProfErrorHandler using type narrowing in app_module.ts to log
     full exception messages and interactive stack traces, accompanied by unit
     tests (app_module.ts, app_module_test.ts).
   - Sanitize uninitialized GPU memory pointers ((null), INVALID, nullptr) with
     a constant Set in cleanCellToken and comprehensive unit tests
     (memory_breakdown_table.ts, memory_breakdown_table_test.ts).
   - Extract clampDataTableNumericValues utility for boundary clamping of
     non-finite and negative metrics (chart_utils.ts, chart_utils_test.ts).
   - Clamp non-finite (NaN) values to 0 in SVG step time graph geometry
     (step_time_graph.ts).
   - Clamp host/device synchronization self-time skew to prevent negative step
     durations in input pipeline analyzer (xplane_to_step_events.cc,
     device_side_analysis_detail_data_provider.ts).

PiperOrigin-RevId: 974413011
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