123123213weqw opened a new pull request, #5760:
URL: https://github.com/apache/rocketmq-dashboard/pull/5760
## What\n\n`AiRunExecutor.decide` checked the abort reason before
`outcome.successTerminalProjected`, so an abort won unconditionally — including
when the success frame had <em>already</em> been projected (the projector
persists the terminal `run_status` row and publishes the live `run_finished`
the moment a `success` `ResultMeta` arrives).\n\n## Why it is a bug\n\nA stop
that lands **after** the success frame but before the worker finalises — the
user pressed the button while the finished answer was being wrapped up —
then:\n\n- wrote a **second** `run_status` event into the timeline (two
terminal rows for one run; `groupIntoBubbles` renders the stray one as a
phantom empty stopped bubble),\n- published a **second** live `run_finished`,
and\n- rewrote the run row to `STOPPED` for an answer the user watched
complete.\n\nThe documented precedence ("a provider frame that arrived
afterwards does not unmake the abort") is about frames arriving *after* the
abort; here the abort a
rrived after the frame.\n\n## The fix\n\nCheck `successTerminalProjected`
first in `decide()`: once the projector has written the terminal, finalisation
honours it exactly-once. An abort that landed before the success frame still
wins — that is the `stopRacedSuccess` case, where the frame is swallowed and
nothing terminal was ever projected (pinned by the existing
`aStopDuringTheRunShouldWriteStoppedEvenWhenTheProviderReportsSuccessTest`).\n\n##
Test\n\nRed-first:
`AiRunExecutorTest.aStopThatLandsAfterTheSuccessFrameMustNotOverwriteTheCompletedRunTest`
drives a provider that emits the success frame and only then requests the
stop. Asserts exactly one `run_status` (COMPLETED), one live `run_finished`,
and a COMPLETED row — previously STOPPED with two terminal events.
`AiRunExecutorTest` (20), `AiRunServiceTest` (23) and `AgentRunHandleStopTest`
(9) all green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]