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

   ### Which Issue(s) This PR Fixes
   
   Fixes #6874
   
   ### Brief Description
   
   When an enhanced prompt starts and ends with separate code examples, the 
cleaner removes the first opening fence and the last closing fence, corrupting 
both examples. Match the opening marker's length and strip a wrapper only when 
its first valid closing fence is the final line.
   
   Preserve separate examples, unclosed wrappers, and invalid opening info 
strings. Continue removing the complete info string from genuine wrappers, 
including wrappers around shorter inner code fences.
   
   ### How Did You Test This Change?
   
   - Added cleaner boundary regressions and a mocked multi-chunk `enhance()` 
regression. On the unchanged production class, `PromptEnhancerTest` ran 18 
cases with 8 failures.
   - JDK 21, from `server`: `mvn -B -ntp 
-Dtest=PromptEnhancerTest,AgentProviderRegistryTest,ClaudeCodeAgentProviderTest,QoderAgentProviderTest
 test` (with local Maven settings/cache options): **42 tests passed, 0 
failures/errors**. Mockito-dependent tests were run outside the 
process-attachment-restricted sandbox.
   - Full backend and test-source compilation, Checkstyle, and `git diff 
--check`.
   - The full MySQL-backed integration suite was not run.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Regression tests added with `...Test` method names
   - No new source files, UI strings, dependencies, or architecture changes
   


-- 
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