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

   https://issues.apache.org/jira/browse/CAMEL-26568
   
   Fixes from the r26 run of the local-model benchmark (qwen3.6, 7 rounds), for 
the messages the AI tools and Camel give. Two commits: the first changes 
Camel's own error texts (camel-core-languages, camel-groovy), and the second 
the AI tools (camel-jbang-core, camel-yaml-dsl-validator). They are one PR 
because a camel-jbang test checks the new camel-core text.
   
   **A JMS reply that replaces the message** (jms request-reply step 2: 1 of 7 
runs passed)
   - After a `to:` on jms, sjms, sjms2, activemq, activemq6 or amqp sent InOut 
(`pattern: InOut`, `exchangePattern=InOut`, or an earlier 
`setExchangePattern`), the body is the reply. The models logged the reply and 
lost the order.
   - The write answer now has a note on that line: "after this request-reply 
(InOut) the body is the reply from stock, and the message that was sent is 
gone. To keep the message as the body, add variableReceive: stockReply to this 
to: and read the reply as ${variable.stockReply}."
   - No note when the `to:` has `variableReceive`, or when a later step sets 
the body.
   - Checked on the traces of r23 to r26: it is on the writes of all 6 failed 
r26 runs, on no write of a passed jms step, and on none of the 2,425 final 
files of passed steps.
   
   **`${file:noext}`** (sftp step 3: 3 of 7)
   - "Unknown file language syntax: noext" now says "did you mean 
${file:name.noext}, the file name without its extension?". It also catches 
`name:noext`, a different case and typos. For a path it keeps the advice that 
the file: functions do not read a file. This is the Simple error in 
camel-core-languages, so every user gets it.
   - The AI tools check Simple in the file options of file, ftp, ftps, sftp and 
smb endpoints (fileName, move, moveFailed, preMove, moveExisting, tempFileName, 
idempotentKey, filterFile, filterDirectory) at write time. `fileName: 
${file:noext}.txt` in a `to: sftp` was accepted before and failed only at 
reload.
   
   **`file` as a language** (jms step 3: 5 of 7 runs wrote `expression: file:`)
   - The refusal said only "property 'file' is not defined". It now says that 
file is not a language, and shows `constant:` with `"resource:file:stock.json"`.
   
   **`parseText` on bytes** (jms step 3)
   - `new JsonSlurper().parseText(body)` on a `byte[]` body fails with a 
MissingMethodException. camel-groovy adds a hint to that error: parse the bytes 
with `new groovy.json.JsonSlurper().parse(body)`, or unmarshal them first. 
(`parseText(body as String)` would give the numbers of the bytes in Groovy, so 
the hint does not say that.)
   
   **An unused placeholder** (nightly report step 4)
   - The note from CAMEL-26482 was right in all 3 failed runs, but the models 
only repeated it. The answer now starts with what to do: "Use 
{{report.schedule}} again on line 7, and set report.schedule=... in 
application.properties: the property is now unused, as line 7 has its own 
value."
   
   **Two smaller ones**
   - The "did you mean ${exchangeProperty.x}" advice (CAMEL-26483) pointed to a 
variable when a Groovy script set the exchange property. It now names the 
property (all 11 refusals of sftp step 2 in r26n-3).
   - The schema hint listed choice among the EIPs that have `steps:`. Choice 
now gets its own hint: the steps go under a `when:` or under `otherwise:` (all 
6 refusals of openapi-server step 4 in r26l-2).
   
   **Tests**
   - Each new test fails without its fix.
   - camel-core `org.apache.camel.language.**`: 926 pass (1 skipped). 
camel-groovy: 128 (1 skipped, as before). camel-yaml-dsl-validator: 347. 
camel-jbang-core: 2,822 (2,528 + 294 serial), 3 skipped as before.
   
   🤖 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