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

   A follow-up from r32 of the local-model benchmark (qwen3.6, 7 rounds) and 
CAMEL-26758 / CAMEL-26825. In r32 the model sent the same refused content 3 or 
more times in 9 step runs of the new set. Most were stuck on "must have at most 
1 properties": one item of `steps` held two keys.
   
   **What changes**
   
   - **A second EIP in a step.** For a step such as
   
     ```yaml
     - setBody:
         constant: "x"
       log: "order ${body}"
     ```
   
     the refusal said `(log: is another EIP: start it as its own item, - 
log:)`, but gave no line to write. So the loop breaker of CAMEL-26758 could not 
apply it: four step runs sent the same content 5, 14, 14 and 20 times. The 
message now ends with `Write line 8 as:` and the line as a `- log:` item of its 
own, with the dash at the column of the item's dash. The lines under the key 
keep their columns. A model can copy the line, and the write tool applies it on 
the third identical write. With several keys to move, the message gets no 
lines, as before.
   - **doCatch: and doFinally: of doTry.** Written at the column of `doTry:`, 
they were called "another EIP", so the advice was to start them as their own 
items: the wrong direction. They are options of doTry and go under it, next to 
`steps:`. In r32 one step run sent such content 19 times.
     - The validator now gives the option hint, which `IndentLines` turns into 
the lines to write, two spaces further right. The write tool already repairs 
this shape on the first write (CAMEL-25532).
     - The "array found, object expected" error that came with it (doCatch: 
read as an EIP) is dropped when the value has the shape of the option.
     - Three options have the name of an EIP: doCatch and doFinally of doTry, 
and filter of claimCheck. claimCheck's filter takes a text, so a `filter:` with 
a mapping or a list is still the filter EIP. The new `YamlValidator.optionType` 
reads the type from the schema.
   
   **Tests**
   
   - camel-yaml-dsl-validator: `StructureHintTest` (doCatch, doFinally, 
doFinally as a list, filter as a text, filter with steps) and `SchemaHintsTest` 
(option types). The whole module: 364 tests, 0 failures.
   - camel-jbang-core:
     - New `IndentLinesTest`: the three r32 shapes, two keys to move, a key 
that is not found, doCatch with its lines, and the write tool's repair of 
doCatch.
     - `AuthoringToolsRefusalFixesTest`: the third identical write with a 
second EIP is written as the refusals said.
     - The `ai` package: 1025 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