Runtime Verification

/camel-verify — Runtime verification feedback loop

Overview

/camel-verify is the runtime verification orchestrator that validates generated integrations actually work. Through a 3-phase feedback loop with error classification and automated fixes, the AI ensures your integration builds, passes integration tests, and handles failures gracefully.

The output is a verified, working integration ready for deployment.

When to Use

Invoke /camel-verify when you:

  • Want to validate a generated integration works at runtime
  • Encounter build failures, runtime errors, or test failures
  • Need to troubleshoot an existing integration
  • Want automated diagnosis and fixing of common issues

Auto-invocation: After /camel-execute completes, the AI automatically invokes /camel-verify. You can also invoke it standalone for troubleshooting.

The Verification Loop

The verification process runs three phases in sequence. If any phase fails, the AI classifies the error, fixes it, and retries (up to 15 attempts per phase). An environment probe runs before verification (as the first step of camel-execute) to catch dependency, service, and startup issues before code is generated.

Error Classification System

The AI classifies every error into one of four categories and routes fixes to the appropriate target:

1. BUILD_ERROR

Indicators:

  • Maven compilation errors
  • Missing dependencies
  • YAML syntax errors
  • Java source errors

Fix Strategy:

  • Add missing dependencies to pom.xml
  • Repair YAML with camel-validate skill
  • Update Java code (rare for generated code)
  • Resolve version conflicts with BOM

Routed To: Build system, dependency manager, camel-validate skill

2. RUNTIME_ERROR

Indicators:

  • Application fails to start (detected by Citrus test runner)
  • Connection refused errors
  • Port conflicts
  • Configuration errors

Fix Strategy:

  • Update configuration properties
  • Fix route startup issues
  • Change ports
  • Verify Testcontainers service configuration

Routed To: camel-implement skill (route fixes), configuration manager

3. TEST_ERROR

Indicators:

  • Test failures
  • Assertion errors
  • Timeouts in tests
  • Testcontainers startup failures

Fix Strategy:

  • Regenerate routes if logic wrong (camel-implement)
  • Regenerate tests if assumptions wrong (camel-test)
  • Modify the TDD plan for persistent architectural failures (re-plan)
  • Increase timeouts
  • Fix Testcontainers configuration

Routed To: camel-implement (route logic), camel-test (test re-generation), re-plan (TDD modification)

4. ENVIRONMENT_ERROR

Indicators:

  • Docker not running (required for Testcontainers)
  • Testcontainers unable to start services
  • Port conflicts
  • Image pull errors

Fix Strategy:

  • Start Docker daemon (required for Testcontainers)
  • Fix Testcontainers service configuration
  • Change conflicting ports
  • Pull missing images

Routed To: Environment manager, Testcontainers configuration

Retry Budget

Each phase has a retry budget of 15 attempts.

Retry Strategy:

Attempt 1: Try original approach
Attempt 2: Apply simple fix (restart service)
Attempt 3: Apply configuration fix
Attempt 4: Apply code fix
Attempt 5: Apply environment fix
...
Attempt 15: Last attempt
  → If still failing, give up and report

Exponential Backoff:

Between retries, the AI waits:

  • Attempts 1-3: 5 seconds
  • Attempts 4-7: 10 seconds
  • Attempts 8-12: 30 seconds
  • Attempts 13-15: 60 seconds

This gives external services time to recover.

Standalone Invocation

You can invoke /camel-verify standalone for troubleshooting:

Use Case 1: After Manual Code Changes

(You manually edit a route)

/camel-verify

→ Runs full 3-phase verification
→ Reports if your changes broke anything

Use Case 2: Test Failures

You: My integration used to work but now tests fail

/camel-verify

→ Phase 1: Rebuild (detects updated code)
→ Phase 2: Runs tests (identifies failure)
→ Fix: Regenerates route or test as needed
→ Phase 3: Reports results

Use Case 3: New Test Scenarios

(You add a new Citrus YAML test)

/camel-verify --phase=2

→ Skips Phase 1 (already built)
→ Runs only Phase 2 (Test Verification via camel test run)
→ Reports test results

Environment-in-the-Loop Concept

/camel-verify is “environment-in-the-loop” verification: it doesn’t just check code, it actually runs the integration with real databases, message brokers, and HTTP endpoints via Testcontainers.

Why This Matters:

  • Catches real issues: Code might compile but fail at runtime
  • Validates integrations: Endpoints actually connect, messages actually flow
  • Tests behavior: Not just unit tests, but full integration tests with real services
  • Prevents surprises: Find issues now, not in production
  • Self-contained: Testcontainers manage the service lifecycle – no manual Docker Compose setup needed

Contrast with traditional testing:

  • Unit tests: Mock everything (no environment)
  • Integration tests: Run against real services managed by Testcontainers (environment-in-the-loop)

Camel-Kit uses Citrus YAML integration tests with Testcontainers for verification because integrations are, by definition, about connecting systems. Docker Compose files are still generated as user artifacts for local development, but they are not used during the verification loop.

Graceful Degradation

If tools are unavailable, the AI adapts:

No Docker

Warning: Docker not available.

Skipping test verification phase (Testcontainers requires Docker).

Note: Without Docker, integration tests cannot start external services.
Consider running on a system with Docker installed.

Proceeding to report phase with partial results...

No Maven Wrapper

Warning: ./mvnw not found. Skipping build verification phase.

Proceeding to test verification...

No Camel Test CLI

Warning: camel test command not available.

Skipping test verification phase.

Note: Without the Camel JBang test plugin, we cannot run integration tests.
Consider installing Camel JBang: https://camel.apache.org/manual/camel-jbang.html

No Citrus Tests

Warning: No Citrus YAML tests found (*.it.yaml)

Skipping test verification phase.

Note: Without tests, we cannot verify integration behavior.
Consider generating tests with /camel-test skill.

The AI continues with available tools, warning about limitations.

Summary

/camel-verify validates integrations through a 3-phase feedback loop:

  1. Build - Compile and resolve dependencies (skipped for JBang)
  2. Test Verification - Run Citrus YAML tests via camel test run with Testcontainers
  3. Report Generation - Summarize results and provide insights

Key Features:

  • Error Classification - BUILD, RUNTIME, TEST, ENVIRONMENT errors
  • Auto-Fixes - 15 retry attempts with intelligent fixes
  • Fix Routing - Errors routed to camel-implement, camel-test, re-plan, or escalated to user
  • Environment-in-the-Loop - Testcontainers manage real databases and brokers
  • Graceful Degradation - Works even when tools unavailable
  • Standalone Invocation - Use for troubleshooting existing integrations

The result is confidence that your integration actually works, not just compiles.

This completes the three-phase pipeline: Design → Plan → Execute → Verify.