zmuxuny opened a new pull request, #7143:
URL: https://github.com/apache/rocketmq-dashboard/pull/7143
### Which Issue(s) This PR Fixes
- Fixes #7141
### Brief Description
A successful provider ResultMeta currently projects live COMPLETED before
the terminal run-row update. An observer can receive success while the stored
run is still RUNNING, including when that update subsequently fails.
Record successful results without projecting their terminal pair. Finalize
every outcome through the existing ordered path: flush text, persist one
terminal timeline event, update the run row and cache, then publish one live
terminal using the recorded duration. Preserve success-before-stop and
success-before-late-provider-failure precedence.
Carry the terminal event's actual sequence into the delayed publication. A
reconnect that already replayed that event must not receive it again, whether
its replay has finished or is still buffering live frames. The projector's
standalone contract is unchanged.
Scope is live publication consistency. This does not make timeline INSERT
and run-row UPDATE transactional for attach replay; the current Studio page
waits for event:done before final refetch. Nearby #6385, #7031, #7044, #4999
and #6469 were reviewed for overlap. When combining with #7031, retain
terminalSeq separately from any later diagnostic notice's endSeq.
AI assistance was used for investigation, implementation, and regression
testing.
### How Did You Test This Change?
Base: rocketmq-studio@127c47b06a268cc74224d5f34c56ec7c36ac0d55. JDK
21.0.12.1 / Maven 3.9.12.
- Unchanged production: both new row-before-wire and failed-terminal-update
regressions fail (2 failures, 0 errors), observing one success frame where zero
is required.
- Deliberate incorrect intermediate variant publishing sequence 0: both
reconnect-interleaving cases fail. Restored the final production source before
the complete focused run.
- Final AiRunExecutorTest: 26 tests passed, including stop-before-success,
stop-after-success, late gateway/runtime failures, absent provider duration,
terminal-write failure, and both replay/live handoffs.
- Final related suites: 412 tests passed across 9 classes, with zero
failures/errors/skips; Maven Checkstyle reports 0 violations.
From server/ (Mockito's explicit startup agent avoids this container's
unsupported dynamic self-attachment):
```sh
MAVEN_OPTS=-Xmx384m mvn -B -ntp test \
-DforkCount=1 \
-DargLine="-Xmx256m
-javaagent:$MAVEN_REPO/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar"
\
-Dtest=AiRunExecutorTest,AiRunServiceTest,AgentStreamSessionTest,AgentRunRegistryTest,AgentRunHandleStopTest,AgentEventProjectorTest,AiEventSeqAllocationTest,AiEventContractTest,AiEventJsonSerializationTest
# Tests run: 412, Failures: 0, Errors: 0, Skipped: 0
git diff --check
```
MAVEN_REPO is the configured local Maven repository; proxy and existing
system truststore settings were environment-only. Final bounded run took 28.57
seconds and peaked at approximately 885 MiB combined process RSS. Full
backend/MySQL integration and frontend suites were not run for this two-file
lifecycle fix. Independent code and test review passed.
### Checklist
- [x] One coherent lifecycle change
- [x] Conventional Commit subject
- [x] Regression methods use the ...Test suffix
- [x] No new UI text, dependencies, schema, API fields, or source files
- [x] Lifecycle documentation/comments updated
- [ ] Full backend/MySQL integration and architecture suite (not run locally)
--
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]