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

   https://issues.apache.org/jira/browse/CAMEL-26410
   
   The AI write and edit tools repair a YAML shape that has one reading, for 
example a list item two columns off (CAMEL-25532). When the repaired content 
had another problem, the repair was dropped, and the write was refused with the 
indentation error only. The YAML parser stops at the indentation, so the other 
checks never ran, and the model never saw the real problem.
   
   In the local-model benchmark (qwen3.6:35b) this gave loops of 16 to 19 
refused writes in a row. I checked four such steps by validating the refused 
content with the column repaired:
   - route-aggregator step 1 (three runs): the real problem was a `steps:` at 
the route level instead of under `from:`.
   - route-enrich-and-dedupe step 2: the real problem was a field read on a 
variable that holds the file as it was read (a GenericFile).
   
   The validator already has a clear message for both, 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 gives those problems, a 
`repairable` list, 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, because the line 
numbers would then not be the model's.
   - `LenientRepairs.Result` now says whether a repair moved lines.
   
   **Tests**
   - `AuthoringToolsLenientTest` has new tests for both benchmark cases, for 
the edit tool, and for a problem the write cannot repair.
   - The AI tool tests in camel-jbang-core pass: 831 tests.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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