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

   ## Description
   
   https://issues.apache.org/jira/browse/CAMEL-25403
   
   In the local model benchmark (qwen3.6:35b-a3b through the camel-jbang-mcp 
server, Kamelet side check), the model wrote a custom action Kamelet whose 
template is a single `setBody`, and listed `camel:timer` in `spec.dependencies` 
in 3 of 5 runs. It most likely copied it from the source sample in 
`kamelet-custom.adoc`, whose template starts from a timer.
   
   `KameletChecks.unusedDependencies` finds a `camel:` dependency that names a 
component the template does not use: no endpoint of the template has its scheme 
(`timer:x`, or `uri: timer` with `parameters:`, alternative schemes such as 
`https` included), and no language or data format of the template is in its 
artifact. `camel_write_file`, `camel_edit_file` and `camel_validate_source` 
report it under `notes`:
   
   ```
   Line 18: spec.dependencies: camel:timer is not used by the template (it has 
no timer: endpoint): list only the components, languages and data formats the 
template uses
   ```
   
   It is a note, not an error: the Kamelet works, so the write is not refused. 
Nothing is said when the template may use a component in a way not visible in 
it: `beans`, a `bean` or `method` step, a `#class:` reference, a placeholder as 
the scheme, or a component that runs on another (cron on quartz, rest-openapi 
on an http component). Only components are checked, not languages or data 
formats.
   
   Over the 259 Kamelets of camel-kamelets main it notes 6 dependencies, all of 
them unused:
   - `camel:timer` in azure-storage-blob-source, azure-storage-datalake-sink, 
azure-storage-datalake-source and azure-storage-files-source
   - `camel:dns` in aws-translate-action
   - `camel:azure-storage-blob` in azure-storage-files-sink
   
   ## Tests
   
   `KameletChecksTest`: the note for an unused dependency (and no error), no 
note for used dependencies (scheme with and without a colon, https for http, a 
language, mvn:), no note for a placeholder scheme, beans, a bean step, cron 
with quartz and rest-openapi with http, and the note in the answer of a write. 
The 510 tests of the `commands.ai` package pass.
   
   🤖 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