Skip to content

Trim JS-port screenshot suite skip list to mirror port.js#5124

Merged
shai-almog merged 1 commit into
masterfrom
jsport-trim-runner-skip-list
May 30, 2026
Merged

Trim JS-port screenshot suite skip list to mirror port.js#5124
shai-almog merged 1 commit into
masterfrom
jsport-trim-runner-skip-list

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • Trim the Java Cn1ssDeviceRunner.shouldForceTimeoutInHtml5 skip list down to mirror the authoritative set already maintained in Ports/JavaScriptPort/src/main/webapp/port.js (cn1ssForcedTimeoutTestClasses + cn1ssForcedTimeoutTestNames).
  • Net effect: ~54 previously-silenced screenshot tests (graphics grid, charts except 3, KotlinUi, MainScreen, transitions, animation grid, sticky headers, picker, sheet, image-viewer, tabs, etc.) now run against the JS-port goldens they already have under scripts/javascript/screenshots/.
  • Remaining 19 isolated tests are split into two clearly-labeled buckets — isJsSkippedNativeTest (APIs the JS port doesn't implement) and isJsSkippedKnownRuntimeBug (each entry cross-linked to the port.js working name: canvasContextWipe, chatInputEmitHijack, chartCombinedXyCapture, sheetTearDownLeak, simdLargeAllocaCorrupt).

Why

The JS port screenshot suite has two parallel skip gates: Java fires first (no JS exec) and port.js catches anything that slips through. port.js is the carefully-maintained source of truth — entries are un-parked there as runtime fixes land. The Java list had drifted: it was still gating off ~73 tests, including the whole graphics grid, every chart except Line family, KotlinUi, MainScreen, animations, transitions, sticky headers — all of which port.js considers fixed.

The CI workflow already accounts for these tests running (CN1_JS_TIMEOUT_SECONDS=1800, CN1_JS_BROWSER_LIFETIME_SECONDS=1740, with the comment explicitly mentioning "the previously-silent graphics / chart / kotlin / mainscreen / transition tests now actually rendering and emitting full PNG streams"). They weren't running because the Java gate fired first.

Safety

  • The per-test 10s HTML5 cap (TEST_TIMEOUT_MS_HTML5) bounds the worst case: even if every newly-enabled test hangs, that's 54 × 10s ≈ 9 min within the 1740s suite budget.
  • Missing-golden runs are non-fatal: ProcessScreenshots only counts different / error as failures with CN1SS_FAIL_ON_MISMATCH=1. Tests without a JS-port golden will appear in the PR comment as preview-only and won't break CI.
  • If a specific newly-enabled test regresses, it shows up in the comparison report and can be re-parked under a documented reason — same pattern port.js already uses.

Test plan

  • CI scripts-javascript workflow runs to completion (suite reaches CN1SS:SUITE:FINISHED within the 1740s budget).
  • Comparison report shows the ~54 newly-enabled tests as equal against their existing goldens (or different for ones whose pixels have drifted — those are real signal to investigate).
  • Tests still parked (canvasContextWipe / chartCombinedXyCapture / etc.) continue to be force-finalised cleanly with no suite-level hang.
  • iOS / Android / JavaSE workflows unaffected (the skip only fires when Display.getInstance().getPlatformName() is "HTML5").

🤖 Generated with Claude Code

The JavaScript-port screenshot suite is gated by two parallel skip
lists. The Java gate (Cn1ssDeviceRunner.shouldForceTimeoutInHtml5)
runs first and prevents the test from being invoked at all; the
port.js bridge (cn1ssForcedTimeoutTest{Classes,Names}) catches what
slips through. port.js has been carefully maintained as runtime fixes
landed and now skips ~19 tests; the Java list had drifted to ~73 and
was silently gating off the graphics grid, every chart test except
the three known to hang, KotlinUi, MainScreen, transitions, animation
grid, sticky headers, sheets and pickers -- all of which port.js
considers fixed.

The CI workflow already expects this larger set to run (the budget
was bumped to 1740s in scripts-javascript.yml specifically "with the
previously-silent graphics / chart / kotlin / mainscreen / transition
tests now actually rendering and emitting full PNG streams"); they
weren't running because the Java gate fired first.

This change mirrors the Java skip list to port.js's authoritative
set. Two methods:

  * isJsSkippedNativeTest    -- APIs/bridges the JS port does not
                                implement (media, vpn, crypto,
                                accessibility, background-thread,
                                browser-component-load-event, etc.)
  * isJsSkippedKnownRuntimeBug -- tests with active runtime bugs,
                                each tagged with the same working
                                name port.js uses (canvasContextWipe,
                                chatInputEmitHijack,
                                chartCombinedXyCapture,
                                sheetTearDownLeak,
                                simdLargeAllocaCorrupt)

Net: ~54 previously-silenced tests are now exercised against their
existing JS-port goldens. The remaining 19 isolated tests are
clearly categorized and cross-linked to port.js so the two lists
stay in sync going forward.

Safety: the per-test 10s HTML5 cap (TEST_TIMEOUT_MS_HTML5) protects
the suite budget if any newly-enabled test regresses; failures
surface in the comparison report so the offender can be re-parked
with a documented reason.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 122 screenshots: 122 matched.

Native Android coverage

  • 📊 Line coverage: 12.82% (7454/58148 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.43% (37344/358162), branch 4.34% (1463/33700), complexity 5.42% (1760/32456), method 9.45% (1441/15248), class 15.52% (330/2126)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 12.82% (7454/58148 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.43% (37344/358162), branch 4.34% (1463/33700), complexity 5.42% (1760/32456), method 9.45% (1441/15248), class 15.52% (330/2126)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)
      • kotlinx.coroutines.kotlinx.coroutines.JobSupport – 0.00% (0/423 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 974.000 ms
Base64 CN1 encode 118.000 ms
Base64 encode ratio (CN1/native) 0.121x (87.9% faster)
Base64 native decode 1079.000 ms
Base64 CN1 decode 389.000 ms
Base64 decode ratio (CN1/native) 0.361x (63.9% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 121 screenshots: 121 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 260 seconds

Build and Run Timing

Metric Duration
Simulator Boot 79000 ms
Simulator Boot (Run) 2000 ms
App Install 20000 ms
App Launch 4000 ms
Test Execution 335000 ms

Detailed Performance Metrics

Metric Duration
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 native encode 743.000 ms
Base64 CN1 encode 1577.000 ms
Base64 encode ratio (CN1/native) 2.122x (112.2% slower)
Base64 native decode 377.000 ms
Base64 CN1 decode 1190.000 ms
Base64 decode ratio (CN1/native) 3.156x (215.6% slower)
Base64 SIMD encode 434.000 ms
Base64 encode ratio (SIMD/native) 0.584x (41.6% faster)
Base64 encode ratio (SIMD/CN1) 0.275x (72.5% faster)
Base64 SIMD decode 454.000 ms
Base64 decode ratio (SIMD/native) 1.204x (20.4% slower)
Base64 decode ratio (SIMD/CN1) 0.382x (61.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 81.000 ms
Image createMask (SIMD on) 12.000 ms
Image createMask ratio (SIMD on/off) 0.148x (85.2% faster)
Image applyMask (SIMD off) 195.000 ms
Image applyMask (SIMD on) 100.000 ms
Image applyMask ratio (SIMD on/off) 0.513x (48.7% faster)
Image modifyAlpha (SIMD off) 175.000 ms
Image modifyAlpha (SIMD on) 125.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.714x (28.6% faster)
Image modifyAlpha removeColor (SIMD off) 243.000 ms
Image modifyAlpha removeColor (SIMD on) 103.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.424x (57.6% faster)
Image PNG encode (SIMD off) 1339.000 ms
Image PNG encode (SIMD on) 990.000 ms
Image PNG encode ratio (SIMD on/off) 0.739x (26.1% faster)
Image JPEG encode 582.000 ms

@shai-almog
Copy link
Copy Markdown
Collaborator Author

shai-almog commented May 30, 2026

Compared 58 screenshots: 58 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 238 seconds

Build and Run Timing

Metric Duration
Simulator Boot 88000 ms
Simulator Boot (Run) 1000 ms
App Install 12000 ms
App Launch 3000 ms
Test Execution 1501000 ms

@shai-almog shai-almog merged commit 6b7d573 into master May 30, 2026
17 of 18 checks passed
@shai-almog shai-almog deleted the jsport-trim-runner-skip-list branch May 30, 2026 18:01
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.

1 participant