davsclaus opened a new pull request, #29698:
URL: https://github.com/apache/camel/pull/29698

   A follow-up from r32 of the local-model benchmark (qwen3.6, 7 rounds), 
test-citrus-orders step 1. In 3 of 7 runs the model wrote the log check of its 
Citrus test as
   
   ```yaml
   - camel:
       cli:
         verify:
           integration: "orders"
           logMessage: "Order ORD-1001 accepted for C-482 with 2 line\\(s\\)"
   ```
   
   Citrus checks that the integration logged a line that contains the 
logMessage as written (`output.contains(logMessage)` in citrus-camel 5.1.0), so 
`camel test run` failed: "has not printed message 'Order ORD-1001 accepted for 
C-482 with 2 line\(s\)' after 60 attempts". The model had first written the 
check as a regular expression (`assert-log: {pattern: ...}`), which is not a 
Citrus action, and kept the escapes when it moved the text to logMessage.
   
   **What changes**
   
   - A logMessage of a camel `cli` (or `jbang`) verify action with a backslash 
before one of `( ) [ ] { } . * + ? ^ $ |` is a problem of the test, so the 
write is refused. The message says that logMessage is plain text, and ends with 
the line to write, without those backslashes: `Write line 7 as:` and 
`logMessage: "Order ORD-1001 accepted for C-482 with 2 line(s)"`.
   - Two backslashes are taken as a pair. A backslash before another character, 
as in a Windows path or an escaped quote, is left alone.
   - The answer to a `log` or `assert-log` action, which points to the verify 
action, now says that it matches the text as written (plain text, not a 
pattern).
   
   **Tests**
   
   - `CitrusTestChecksTest`: the r32 value in double quotes, in single quotes 
and without quotes, the `jbang` key, and a line to write that keeps another 
backslash. Also four values that pass: no escapes, a Windows path, an escaped 
quote, and two backslashes. Each refused case checks that the written line 
gives the plain value and a valid test.
   - Run locally: the camel-jbang-core `ai` package, 1026 tests, 0 failures, 1 
skipped.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF
   


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