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

   ## What
   
   Two fixes for the AI tools, from the local-model benchmark (qwen3.6 35B-A3B 
against camel-jbang-mcp, Oct 16-17). The step that adds a Java class and 
declares it as a bean (run-order-generator step 2) failed in 8 of 10 runs.
   
   1. **Beans in `src/main/resources`.** `camel run --source-dir` loads the 
whole directory, and the validator already finds the classes in 
`src/main/java`. A model that put the class there wrote `beans.yaml` in 
`src/main/resources` (6 of the 8 failures). Each reference to the bean was then 
refused as not declared, and `camel_get_files` did not list the file with the 
route files. Now the bean declarations come from the YAML in 
`src/main/resources` too, and a file with only beans (or another top-level 
entry of the YAML DSL, such as `onException`) is listed with the route files.
   2. **A route id that another file has, and the cause of a failed start.** In 
another run the model copied the route into `beans.yaml`. The write went ahead, 
the restart failed with "Duplicate route ids detected", and the model ran 
`camel_run` three more times until its calls ran out. The validator now refuses 
a route id that a route in another YAML or XML file of the project has, and 
names that file. A failed `camel_run` or restart says its cause first: the 
error `camel run` prints as it exits, else the first exception logged at ERROR. 
The `camel_run` answer has it as `cause`.
   
   ## Tests
   
   New tests in `SourceValidatorBeanRefsTest`, `AuthoringToolsTest`, 
`SourceValidatorRoutesTest` and `IntegrationLauncherTest`; the camel-jbang-core 
suite passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


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