Repository navigation
Description
Summary
Three test classes introduced or rewritten by #4154 (a4306d63) fail intermittently on ubuntu-latest. Each one has failed on pull requests that do not touch the module under test, so this reads as baseline instability rather than a regression from any single change. Right now these failures cost every contributor a re-run and hide real regressions behind a familiar-looking red build.
Status: all four are understood, fixed in #4176
Repeating each class on the same hosted runner (a temporary workflow in that branch, not part of the diff) passes 20/20 for A2A, 20/20 for RocketMQ, 10/10 for ProcessRecoveryTest and 10/10 for HttpServerApplicationTest on ubuntu-latest.
- A2A: the confirmation arrives before
.doFinallyremoves the task fromagentCache, so the runner throws synchronously and the executor answers with a plainMessage— no terminal event. The task now releases itself through a latch thatdoFinallyandstopopen, and a request for the same task waits up to two seconds for it. - RocketMQ: hypothesis 1 was right, hypothesis 2 was not. The fake broker re-offered a message 50ms after handing it out without knowing the consumer was still working on it, so one CANCEL produced two acks. The window is now one second and named; no runtime dedup gap was found, so the fix stays in the test harness.
- ProcessRecovery: not a stall. The runtime interrupts the ticking thread to deliver a wakeup, and the polling
Thread.sleepthrew. All three sleeps now clear the flag, as the fixture loop in the same file already did. - HttpServerApplicationTest: the cached Spring context outlived the static
@TempDir; it is now dirtied after the class, so the context closes before the directory is removed.
Observed on unrelated PRs
| Test | Failed on | What the log shows |
|---|---|---|
AgentScopeAgentExecutorInputRequiredTest.streamingConfirmationWithoutStateStoreFails |
#3287 (job), #4102 (job), #4103 (job) | 0.189s / 0.187s — the stream ends without emitting any terminal event |
RocketMqExecutionTest.agentScopeResumesThroughSeparateLedgersDespitePublicationAndAckFailures |
#3960 (job), #4136 (job, job) | 14.86s / 14.22s — the 10s wait is exceeded |
ProcessRecoveryTest.replacementCollectsOriginalResultWithoutRepeatingEffect[1] |
#4102 (job), main (job) |
InterruptedException from Thread.sleep(20) |
HttpServerApplicationTest (@TempDir cleanup, Failed to delete temp directory /tmp/junit-...) is probably a fourth instance of the same pattern but is not analysed here.
RocketMQ recovery: first concrete snapshot
The recovery assertion only says Condition did not become true, so none of the three failures above can be told apart from each other or from a slow machine. I added a snapshot to that one assertion locally (test-only, no behaviour change; PR to follow) and reproduced the failure 1 time in 4 local runs.
Failing run:
turn.status=WAITING, starts=1, queries=1, modelCalls=1,
commandAcks=20, eventAcks=30,
queuedCommands=0, queuedControls=0, queuedEvents=5,
onError=[DurableException: Execution publication unconfirmed,
DurableException: Execution publication unconfirmed,
IllegalStateException: Consumer ACK lost]
Passing run, same test:
turn.status=SUCCEEDED, starts=1, queries=1, modelCalls=2,
commandAcks=1, eventAcks=5, queuedEvents=0
So in the failing run the command topic is received and acked about 20 times, the event topic about 6 times, five events are still sitting in the queue, and the turn never reaches its second model call. That looks like delivery amplification, not like a single lost message.
Hypotheses (none confirmed)
- The in-test broker's redelivery window is too tight.
Broker.consumerre-enqueues any received-but-not-yet-acked message after a fixed 50ms without checking whether it is still in flight. Ifack()takes longer than 50ms under CI load, one message becomes several, and every extra delivery costs more work, which makes the next ack slower still — a cascade that fits the 20x/6x counts. - No dedup on the consumer side. The extension has no requestId-level dedup, so duplicates are expected to be absorbed by the runtime state machine. If a duplicated command can still move state, duplicates would explain the turn not progressing.
- The 10s budget is simply too short. Not excluded, but a run that acked 20 commands in 14.86s looks stalled rather than slow.
What this report does not claim
At the time of this report none of the three had been root-caused, and no test was skipped, disabled, or weakened to make the build green. A2A and ProcessRecoveryTest are separate failures from the RocketMQ one; the status section above records what each turned out to be.
Question
For the RocketMQ case: is a test-side fix acceptable (only re-enqueue when the message is not in flight, or dedupe by requestId in the fake broker), or should duplicate delivery be treated as a runtime dedup gap and fixed in the extension? I would rather align on that than guess, since the two fixes land in different modules.
Answered: test-side — the duplicates came from the harness window, not from the extension, so #4176 raises the window to one second.
Activity
ningmao-hlyz commentedon Nov 14, 2026
First pass is in #4176 (test-only, no production code):
lastFailure, model/ack counters and queue depths instead ofCondition did not become true. This is how theWAITING / commandAcks=20 / queuedEvents=5snapshot above was obtained.backend.turn(...)while ticking, and the runtime interrupts the ticking thread to deliver a wakeup; the two polling loops in the test body did not clear the flag, soThread.sleepthrew. They now share thepausehelper the fixture loop in the same file already used.stream()now lists the events that did arrive. I could not reproduce the failure: 30 repetitions, 30 passes on Windows. Since it fails in 0.19s on Linux I suspect a platform-specific ordering rather than load, but I have no evidence, so no production code is touched and this one stays open.If the A2A failure recurs on CI, the new message will name the events the stream emitted before ending, which should be enough to tell "no terminal event at all" from "a terminal event the filter missed".
ningmao-hlyz commentedon Nov 14, 2026
Root cause found for the RocketMQ entry, and it is in the test harness rather than in the runtime.
Broker.consumerinRocketMqExecutionTestre-offers a message 50ms after handing it out unless it was acked, without knowing whether the consumer is still working on it. When the ack lands later than 50ms the same message is delivered twice. That is the whole failure:one CANCEL, two acks. Narrowing the window to 1ms reproduces it locally and deterministically, together with the recovery stall:
So the
commandAcks=20in my earlier comment was not a stuck turn waiting for one result; it was the same command being handed out repeatedly while the consumer was still catching up. A real invisible duration is measured in seconds, and these tests only need redelivery inside their 10s waits, so #4176 raises the window to one second and names the constant.ProcessRecoveryTestis confirmed as a third instance of the interrupt, always at the same line (run 43592515698):Also fixed in #4176 — the fixture loop in that file already cleared the interrupt flag for exactly this reason.
streamingConfirmationWithoutStateStoreFails(A2A) is untouched and still open. It does not reproduce here (30 repetitions pass, and the whole module passes), and the module has no SLF4J provider, so its CI output carries no executor logging to read a cause from. I would rather leave it open than guess.test(rocketmq): widen the fake broker's redelivery window
CryoThrust commentedon Nov 17, 2026
I hit a post-fix RocketMQ timeout on the unchanged base while investigating the separate
ProcessRecoveryTestfailure in #4214.Baseline:
30dc84b59e646f443dcf1870d66b3225e6210582, which already contains #4176 (2c935368a) and the 1,000 ms fake-broker ACK window. The full Linux build uses Ubuntu / Temurin 17 and the upstream PR Maven command. Its only reported test failure isRocketMqExecutionTest.agentScopeResumesThroughSeparateLedgersDespitePublicationAndAckFailures:The full-build reports are in artifact 14302736460, under
full/agentscope-extensions/agentscope-extensions-durable-rocketmq/target/surefire-reports. They contain 13,064 reported tests in total, one failure and no errors. The later five focused repetitions in that job target ProcessRecoveryTest, not RocketMQ; they do not establish a successful RocketMQ rerun.This snapshot differs from the earlier 20-command-ACK / nonempty-event-queue observation. I have not established whether this is a remaining fixture timing issue or a runtime/transport issue, and I have not changed the ACK window, wait budget or assertions. Would you prefer tracking this post-fix timeout here or in a separate issue? I am not proposing a competing implementation of the already merged fix.