Skip to content

CAMEL-25403: camel-jbang - AI tools: note a Kamelet camel: dependency that the template does not use - #27473

Merged
davsclaus merged 2 commits into
mainfrom
fix/CAMEL-25403
Oct 7, 2026
Merged

davsclaus merged 2 commits into
mainfrom
fix/CAMEL-25403

Conversation

@davsclaus

@davsclaus davsclaus commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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.

camel:core is noted as implied, as every Camel runtime has it (162 of the 259 Kamelets list it). camel:kamelet is not: it is the artifact that runs the template.

Over the 259 Kamelets of camel-kamelets main it notes, besides camel:core, 6 dependencies, all of them unused (fixed in apache/camel-kamelets#3095):

  • 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.ai/code/session_01STT6whBgK1AqsSsUKrnE8m

… that the template does not use

A Kamelet file whose spec.dependencies lists a component the template does
not use (camel:timer copied from a sample into an action whose template is a
setBody) now gets a note in the answer of camel_write_file, camel_edit_file
and camel_validate_source. A note, not an error: the write is not refused.
Nothing is said when the template may use the component unseen: a bean, a
class reference, a placeholder as a scheme, or a component that runs on
another (cron on quartz, rest-openapi on http).

Over the 259 Kamelets of camel-kamelets it notes 6 dependencies, all unused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
@github-actions github-actions Bot added the dsl label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

…ependencies as implied

Every Camel runtime has camel-core, so camel:core adds nothing. camel:kamelet
is not implied: it is the artifact that runs the template.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core

🔁 1 test passed only after a retry on JDK 25 (1 retried attempt)

Recovered flaky tests on JDK 25 (1)
Module Test Failed attempts First failure
dsl/camel-jbang/camel-jbang-plugin-tui AiPanelAcpTest.aJsonRpcErrorKeepsTheSessionAlive 1 the second question reaches the same agent ==> expected: <2> but was: <1>

ℹ️ These tests did not fail the build. Surefire retried them and they passed.
Retries are enabled project-wide by surefire.rerunFailingTestsCount in parent/pom.xml.


🔬 Scalpel shadow comparison — Scalpel: 6 of 699 tested, 8 compile-only — current: 6 all tested

Maveniverse Scalpel detected 6 affected modules (current approach: 6).

Skip-tests mode would test 6 modules (1 direct + 6 downstream), skip tests for 8 (generated code, meta-modules)

Modules Scalpel would test (6)
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-route-parser ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-jbang-core
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
Modules with tests skipped (8)
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-launcher
  • coverage

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 2 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (15 modules, 2m 41s total)

Total reactor time: 2m 41s

Module Duration Status
Camel :: Launcher 52.7s SUCCESS
Camel :: JBang :: MCP 41.9s SUCCESS
Camel :: JBang :: Plugin :: Validate 21.4s SUCCESS
Camel :: JBang :: Plugin :: Kubernetes 19.0s SUCCESS
Camel :: JBang :: Plugin :: Testing 11.3s SUCCESS
Camel :: Coverage 5.4s SUCCESS
Camel :: JBang :: Plugin :: Generate 2.0s SUCCESS
Camel :: JBang :: Plugin :: MCP 1.8s SUCCESS
Camel :: JBang :: Plugin :: Edit 1.7s SUCCESS
Camel :: JBang :: Integration tests 1.2s SUCCESS
Camel :: JBang :: Plugin :: Route Parser 0.9s SUCCESS
Camel :: JBang :: Main 0.8s SUCCESS
Camel :: Launcher :: Container 0.8s SUCCESS
Camel :: JBang :: Core n/a
Camel :: JBang :: Plugin :: TUI n/a

Top 20 slowest modules:

  • Camel :: Launcher (52.7s)
  • Camel :: JBang :: MCP (41.9s)
  • Camel :: JBang :: Plugin :: Validate (21.4s)
  • Camel :: JBang :: Plugin :: Kubernetes (19.0s)
  • Camel :: JBang :: Plugin :: Testing (11.3s)
  • Camel :: Coverage (5.4s)
  • Camel :: JBang :: Plugin :: Generate (2.0s)
  • Camel :: JBang :: Plugin :: MCP (1.8s)
  • Camel :: JBang :: Plugin :: Edit (1.7s)
  • Camel :: JBang :: Integration tests (1.2s)
  • Camel :: JBang :: Plugin :: Route Parser (0.9s)
  • Camel :: JBang :: Main (0.8s)
  • Camel :: Launcher :: Container (0.8s)

⚙️ View full build and test results

@davsclaus
davsclaus merged commit fb86fbe into main Oct 7, 2026
6 checks passed
@davsclaus
davsclaus deleted the fix/CAMEL-25403 branch October 7, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant