Skip to content

CAMEL-23477: camel-jbang-mcp - Stop re-embedding pomContent in migrateProject prompt#23140

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23477
May 12, 2026
Merged

CAMEL-23477: camel-jbang-mcp - Stop re-embedding pomContent in migrateProject prompt#23140
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23477

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 12, 2026

Summary

Stops re-embedding the full pomContent argument inside the migrate_project prompt
instructions. Previously, PromptDefinitions.migrateProject inlined the entire pom.xml
inside a multi-paragraph workflow block, so the prompt size grew linearly with pom size —
duplicating content the client typically already has in conversation context. Verbose
"Step 1 … Step 6" descriptions are also compressed into a tight numbered list.

JIRA: CAMEL-23477

Changes

  • pomContent is now required = false (backward compatible — old clients still send it).
  • The prompt no longer interpolates the full pom content; instead it emits a one-line
    acknowledgement of whether a pom was supplied or should be read from conversation context.
  • Workflow descriptions compressed from ~6 paragraphs of "Step N: …" into a 6-item numbered
    list, preserving every tool call and decision branch (camel_migration_analyze,
    camel_version_list, camel_migration_wildfly_karaf, camel_migration_compatibility,
    camel_migration_recipes, camel_migration_guide_search).

Test plan

  • Updated PromptDefinitionsTest:
    • Replaced migrateProjectContainsPomContent (which asserted the pom was inlined).
    • Added migrateProjectDoesNotInlinePomContent — supplies a 1000×<dependency/> pom and
      asserts the resulting prompt size matches the size produced by a small pom, and that the
      large pom text is not present in the output.
    • Added migrateProjectAcknowledgesSuppliedPom, migrateProjectFallsBackToContextWhenPomOmitted,
      and migrateProjectBlankPomFallsBackToContext.
  • mvn verify in dsl/camel-jbang/camel-jbang-mcp — passes.
  • Full reactor build (mvn clean install -DskipTests) — passes; no regen artifacts.

Acceptance

Prompt size does not scale with pomContent length.

Verified by migrateProjectDoesNotInlinePomContent.


Claude Code on behalf of Andrea Cosentino

…eProject prompt

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested review from Croway and davsclaus May 12, 2026 08:25
@github-actions
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.

@github-actions github-actions Bot added the dsl label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-mcp

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

  • dsl/camel-jbang/camel-jbang-mcp: 1 test(s) disabled on GitHub Actions

⚙️ View full build and test results

@oscerd oscerd merged commit b2c58eb into apache:main May 12, 2026
6 checks passed
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.

2 participants