Skip to content

fix(compat): support Java 25 unordered event delivery in context tests - #6

Merged
naji247 merged 1 commit into
mainfrom
meowbot/compat-ci
Nov 4, 2026
Merged

naji247 merged 1 commit into
mainfrom
meowbot/compat-ci

Conversation

@meowbot-agent

@meowbot-agent meowbot-agent Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Failing

  • Java 25 in CI #15, scheduled on main at 2026-11-04T02:13:04Z.
  • Commit: 79d7308b8a6b578f51e16c0403b0e199230f6cbe.

Cause

ContextParametersTest assumes capture order matches invocation order, but EventQueue publishes through up to five concurrent workers.
The second call can arrive first, so positional assertions inspect the wrong event.

Evidence

  • First assertion error at 2026-11-04T02:13:37.3067711Z: org.opentest4j.AssertionFailedError: userIntent must be null when no context is provided ==> expected: <null> but was: <Listing todos to check current status>.
  • Failure location: ContextParametersTest.capturesUserIntentOnlyWhenContextProvided, line 250, after selecting events.get(0).
  • Mechanism: EventQueue.java:65,205-226 starts separate workers; EventCapture.java:60,89-91 records arrival order.
  • Last green CI #14: identical commit, Temurin 25.0.5+8, and runner agent 2.338.2.
  • Runner image difference: Ubuntu 20261025.353.1 to 20261101.360.1; no demonstrated upstream MCP or JDK regression.

Change

  • Match echo events by their original msg argument, independently of userIntent.
  • Preserve both context-present and context-absent assertions.
  • Apply the same fix to the adjacent two-context test and assert both calls.
  • Add deterministic coverage for both arrival orders.
  • Leave production code, dependencies, and the Java/MCP matrix unchanged.

Test / Verification

  • git diff --check: passed.
  • command -v java and command -v mvn: unavailable.
  • CI only for Java tests because this worktree has no Java or Maven installation.
  • Required CI: mvn --batch-mode --no-transfer-progress verify on Java 17, 21, and 25.
  • Required compatibility CI: mvn --batch-mode --no-transfer-progress clean compile, then mvn --batch-mode --no-transfer-progress test -P<mcp-profile>.
  • Required release packaging: mvn --batch-mode --no-transfer-progress package -P release,mcp-2.0.1 -DskipTests -Dgpg.skip.
  • CI run 41762947450: passed on 910cd9c8b119fc869841046655019bb37e96a2c1.
  • Java 17, 21, and 25 full suites, all six MCP compatibility jobs, and release packaging passed.
  • Java 25: 1102 tests, 0 failures, 0 errors, 0 skipped; ContextParametersTest: 10 tests, 0 failures, 0 errors, 0 skipped.
  • CodeQL and both analysis jobs passed.
  • gh pr checks 6 --repo agentcathq/agentcat-java-sdk --watch: passed; all 14 reported results passed.

Thread

No Slack permalink supplied; the originating alert links to CI #15.

CI run 41759271776 read the second call's userIntent from events.get(0). EventQueue sends on concurrent workers, so capture order is not call order. Match both multi-call context tests by msg and cover reversed delivery without changing production behavior or the matrix.
@naji247
naji247 merged commit 58bafc6 into main Nov 4, 2026
14 checks passed
@naji247
naji247 deleted the meowbot/compat-ci branch November 4, 2026 02:51
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