Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Summary

  • install global EDT and thread error hooks so CN1SS logs capture swallowed platform exceptions
  • replace use of StandardCharsets with CN1-compatible UTF-8 encoding for test start markers

Testing

  • not run (not requested)

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 208 to +233
else
ra_log "FATAL: Failed to extract/decode CN1SS payload for test '$test'"
RAW_B64_OUT="$SCREENSHOT_TMP_DIR/${test}.raw.b64"
if cn1ss_extract_base64 "$TEST_LOG" "$test" > "$RAW_B64_OUT" 2>/dev/null; then
if [ -s "$RAW_B64_OUT" ]; then
head -c 64 "$RAW_B64_OUT" | sed 's/^/[CN1SS-B64-HEAD] /'
ra_log "Partial base64 saved at: $RAW_B64_OUT"
fi
fi
exit 12
ra_log "WARN: No screenshot payload decoded for '$test' (png_chunks=${png_chunks})"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore failure when screenshot decode missing

When a test yields no PNG chunks (e.g., the app crashes before emitting CN1SS output or the chunks are corrupt), the loop now only logs a warning and continues. Because the run ends with exit $comment_rc (typically 0), the job can report success even though a test produced no actual screenshot, leaving missing_actual entries in the summary as the only signal. Previously this branch exited with a non‑zero status. Consider failing the run when a test’s PNG payload can’t be decoded so silent regressions aren’t marked green.

Useful? React with 👍 / 👎.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Nov 22, 2025

Android screenshot updates

Compared 7 screenshots: 1 matched, 1 updated, 2 missing references, 3 missing actuals.

  • BrowserComponent — updated screenshot. Screenshot differs (320x616 px, bit depth 8).

    BrowserComponent
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • GraphicsPipeline — missing reference. Reference screenshot missing at /home/runner/work/CodenameOne/CodenameOne/scripts/android/screenshots/GraphicsPipeline.png.

    GraphicsPipeline
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as GraphicsPipeline.png in workflow artifacts.

  • GraphicsShapesAndGradients — missing actual screenshot. Actual screenshot missing (test did not produce output).

    No preview available for this screenshot.

  • GraphicsStateAndText — missing actual screenshot. Actual screenshot missing (test did not produce output).

    No preview available for this screenshot.

  • GraphicsTransformations — missing reference. Reference screenshot missing at /home/runner/work/CodenameOne/CodenameOne/scripts/android/screenshots/GraphicsTransformations.png.

    GraphicsTransformations
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as GraphicsTransformations.png in workflow artifacts.

  • MediaPlayback — missing actual screenshot. Actual screenshot missing (test did not produce output).

    No preview available for this screenshot.

Native Android coverage

  • 📊 Line coverage: 17.99% (1936/10763 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 17.59% (8929/50756), branch 9.55% (450/4714), complexity 12.44% (531/4267), method 25.10% (458/1825), class 25.33% (77/304)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/398 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.CodenameOneInputConnection – 0.00% (0/109 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)

@shai-almog shai-almog closed this Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants