Claus Ibsen created CAMEL-26410:
-----------------------------------
Summary: camel-jbang - AI tools: a refused write reports the
problems behind a YAML indentation the write repairs by itself
Key: CAMEL-26410
URL: https://issues.apache.org/jira/browse/CAMEL-26410
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Fix For: 4.24.0
The AI write and edit tools repair a YAML shape that has one reading, for
example a list item two columns off (CAMEL-25532). The write then goes ahead
and says what it repaired.
But when the repaired content has another problem, the repair is dropped, and
the write is refused with the indentation error only. The YAML parser stops at
the indentation, so the other checks never run. The model never sees the real
problem, and it sends the same lines again.
In the local-model benchmark (qwen3.6:35b), this gave loops of 16 to 19 refused
writes in a row. Four such steps were checked:
* route-aggregator step 1 (three runs): a log two columns off after an
aggregate. With the column repaired, the validator says that steps: is at the
route level and goes under from:.
* route-enrich-and-dedupe step 2: a log two columns off after a pollEnrich.
With the column repaired, the validator says that the log reads a field of the
variable that holds the file as it was read (a GenericFile), and how to
unmarshal it in place.
In both cases the validator already has a clear message, but the model never
got it.
The change: when the write can repair the shape, but the repaired content has
other problems, the write is still refused. The answer then gives those
problems, and a note that the write repairs the shape by itself. The answer
stays as before when a problem of the content as written is still there after
the repairs, or when a repair moved lines (the line numbers would not be the
model's).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)