zmuxuny opened a new pull request, #7147:
URL: https://github.com/apache/rocketmq-dashboard/pull/7147

   ### Which Issue(s) This PR Fixes
   
   - Fixes #7146
   
   ### Brief Description
   
   The run-stream endpoint reads conversation-wide event pages and currently 
projects every row as the requested run. Other turns' answers and statuses 
enter its replay; a previous COMPLETED event can suppress the correct synthetic 
FAILED terminal for a reaped run.
   
   Start replay at the later of the caller's cursor and the requested run's 
positive startSeq minus one. Continue advancing the scan cursor across every 
row, but only matching runId rows enter decoding, projection, terminal 
detection, and the live deduplication watermark.
   
   Do not cap replay at endSeq: a reaped run may retain its admission-time 
endSeq while already having persisted text. Null/zero legacy startSeq values 
retain the zero-floor fallback; those rows cannot receive the old-history skip 
optimization without trustworthy metadata. SQL, pagination limits, observer 
registration, and external API shapes are unchanged.
   
   This is same-owner content/status correctness. Normal short-history UI 
attachment usually supplies a later timeline cursor; the large-history 
auto-attach path was verified in source, not with a browser deployment. Nearby 
paging, timing, duration, frontend-continuation, and terminal-publication fixes 
were checked for overlap. AI assistance was used.
   
   ### How Did You Test This Change?
   
   Base: rocketmq-studio@127c47b06a268cc74224d5f34c56ec7c36ac0d55.
   
   - Four initial regressions fail against unchanged production (4 failures, 0 
errors): requested middle run isolation, reaped FAILED status, active-run 
tailing, and 5000 earlier rows exhausting the replay budget.
   - Nine added test instances also cover null/zero startSeq, cursors at/past 
the requested end, stale reaper endSeq, and a later run appearing between pages 
without poisoning the requested run's buffered-live watermark.
   - AiRunServiceTest: 42 passed.
   - Final related suites: 415 passed across 9 classes, zero 
failures/errors/skips; Checkstyle: 0 violations. Independent code/test review 
and git diff --check passed.
   
   JDK 21.0.12.1 / Maven 3.9.12, from server/:
   
   ```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: 415, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   MAVEN_REPO denotes the configured local repository. The explicit Mockito 
startup agent avoids unsupported dynamic self-attachment in this container; no 
project build configuration changed. The final focused run took 8.21 seconds, 
with approximately 512 MiB sampled combined RSS. Full backend/MySQL integration 
and frontend suites were not run.
   
   ### Checklist
   
   - [x] One coherent correctness change and Conventional Commit subject
   - [x] Regression methods use the ...Test suffix
   - [x] No new dependencies, source files, schema, UI text, or API fields
   - [x] Replay boundary 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]

Reply via email to