Skip to content

Stabilize CI: deterministic TestIssue1773, Xvfb retry hardening, Maven 429 backoff - #2953

Merged
riccardobl merged 2 commits into
masterfrom
copilot/fix-ci-transitive-failures
Sep 8, 2026
Merged

Stabilize CI: deterministic TestIssue1773, Xvfb retry hardening, Maven 429 backoff#2953
riccardobl merged 2 commits into
masterfrom
copilot/fix-ci-transitive-failures

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The Build jMonkeyEngine workflow was failing intermittently from three independent transient causes: a flaky screenshot test, an Xvfb crash that poisoned retries, and unretried Maven Central rate-limiting.

Changes

  • Deterministic TestIssue1773 (ScenarioIssue1773.java): The emitter shape samples random torus vertices from the shared FastMath.rand, whose state leaked between the two parameterized invocations. The framework already fixes tpf via IsoTimer(60), so reseeding per invocation makes the render reproducible. The scene is unchanged, so existing reference images remain valid.
public static ScreenshotTest testIssue1773(boolean worldSpace) {
    FastMath.rand.setSeed(0); // isolate from shared RNG state leaked by prior invocations
    return screenshotTest(new BaseAppState() { ... });
}
  • Screenshot retry hardening (main.yml): between attempts, stop Gradle daemons (./gradlew --stop) and restart Xvfb. Previously an X_PutImage / BadLength Xlib crash killed the test JVM and the corrupted X server state carried into the next retry, wasting attempts.

  • Maven 429 backoff (main.yml): publishToSonatype now retries 3× with 30s/60s backoff. A single 429 Too Many Requests during dependency resolution previously failed the Deploy Java Snapshot job.

Note

Screenshot tests could not be executed in the authoring sandbox (the root buildscript requires the Android Gradle plugin from a blocked host), so confirmation that TestIssue1773 is stable should come from a CI run. The seed fix also covers the Android variant, which shares ScenarioIssue1773.

Copilot AI and others added 2 commits September 8, 2026 09:38
…emitter

Reseed the shared FastMath.rand to a fixed value at the start of each
parameterized invocation so particle positions are reproducible, and remove
the MotionEvent-driven moving emitter (which caused timing-sensitive
world-space spawn interpolation). The test remains a must-pass screenshot
test for issue 1773. Reference images must be regenerated on the CI
reference machine.

Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Reverting the earlier removal of the moving emitter. The emission loop is
purely tpf-driven and IsoTimer supplies a constant tpf, so the moving emitter
is already deterministic across identical runs. The genuine flakiness source
is the shared FastMath.rand state leaking between the two parameterized
invocations. Resetting the seed per invocation makes the screenshot
reproducible while keeping the existing reference images valid (the scene is
unchanged).

Also harden CI:
- main.yml: restart Xvfb + stop Gradle daemon between screenshot retries to
  survive the X_PutImage BadLength Xlib crash
- main.yml: retry publishToSonatype with backoff to absorb Maven Central 429s

Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
@riccardobl
riccardobl marked this pull request as ready for review September 8, 2026 09:46
@riccardobl
riccardobl merged commit d0ff5b5 into master Sep 8, 2026
13 checks passed
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.

2 participants