Skip to content

chore: Update Citrus to 4.9.3#85

Closed
christophd wants to merge 1 commit into
KaotoIO:mainfrom
christophd:chore/citrus-4.9.3
Closed

chore: Update Citrus to 4.9.3#85
christophd wants to merge 1 commit into
KaotoIO:mainfrom
christophd:chore/citrus-4.9.3

Conversation

@christophd
Copy link
Copy Markdown
Contributor

@christophd christophd commented Mar 2, 2026

  • Since Citrus is not being used yet in Kaoto replace version instead of adding new versions

Summary by CodeRabbit

  • Chores
    • Updated Citrus catalog to version 4.9.3
    • Enhanced schema validation by enforcing stricter property constraints across endpoints, functions, validators, and test containers
    • Simplified the AssertFault action structure by removing optional fields

- Since Citrus is not being used yet in Kaoto replace version instead of adding new versions
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 2, 2026

📝 Walkthrough

Walkthrough

Citrus catalog version bumped from 4.9.2 to 4.9.3 across version references and multiple JSON schema files. Schema constraints added via additionalProperties: false throughout catalog definitions. Deprecated properties removed from AssertFault definition.

Changes

Cohort / File(s) Summary
Version References
index.js, catalog/index.json, catalog/citrus/4.9.3/index.json
Updated Citrus version from 4.9.2 to 4.9.3 in catalog index and main manifest.
Configuration Schema
catalog/citrus/4.9.3/citrus-agent-configuration.json
Added additionalProperties: false constraints to TestSources and root schema objects.
Endpoint & Function Catalogs
catalog/citrus/4.9.3/citrus-catalog-aggregate-endpoints.json, citrus-catalog-aggregate-functions.json, citrus-catalog-aggregate-validation-matcher.json
Added version "4.9.3" field to all entries and additionalProperties: false constraints to nested propertiesSchema blocks.
Test Containers & Case Schemas
catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json, citrus-testcase.json
Added version "4.9.3" and additionalProperties: false constraints. Removed deprecated properties (attachments, body, contentType, headers, etc.) from AssertFault definition.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Schemas tighten, versions climb,
From 4.9.2 to 4.9.3 in time!
No extra props allowed to play,
Stricter Citrus catalogs today! 🎯✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating the Citrus catalog from version 4.9.2 to 4.9.3 across all related configuration and schema files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json`:
- Line 34: The schema blocks that define action-holder objects currently declare
"type": "object" and "additionalProperties": false but declare no allowed
properties, which rejects valid nested action objects like {"send": ...},
{"receive": ...}, {"echo": ...}; locate each action-holder schema (the JSON
object nodes that have "type": "object" followed immediately by
"additionalProperties": false and no "properties" entry) and remove the
"additionalProperties": false entry (or change it to true) so nested action keys
are accepted; search for the repeated pattern occurrences in the file (the
blocks mentioned in the review) and apply the same change to each.

In `@catalog/citrus/4.9.3/citrus-testcase.json`:
- Around line 1007-1008: The schema node definitions.TestActionBuilder_Object_
incorrectly sets "additionalProperties": false without defining a "properties"
object, which makes only an empty object valid and rejects real action objects
(e.g., {"echo": {...}}); fix by updating the upstream schema source so
TestActionBuilder_Object_ either declares the allowed "properties" for nested
actions or allows arbitrary action keys (set additionalProperties: true)
depending on intended validation, then rebuild the generated catalog with yarn
build to regenerate catalog/citrus/4.9.3/citrus-testcase.json so the corrected
schema replaces the faulty definition.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1843103 and a40b8f7.

📒 Files selected for processing (11)
  • catalog/citrus/4.9.3/citrus-agent-configuration.json
  • catalog/citrus/4.9.3/citrus-catalog-aggregate-endpoints.json
  • catalog/citrus/4.9.3/citrus-catalog-aggregate-functions.json
  • catalog/citrus/4.9.3/citrus-catalog-aggregate-test-actions.json
  • catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json
  • catalog/citrus/4.9.3/citrus-catalog-aggregate-validation-matcher.json
  • catalog/citrus/4.9.3/citrus-testcase.json
  • catalog/citrus/4.9.3/citrus-testcase.xsd
  • catalog/citrus/4.9.3/index.json
  • catalog/index.json
  • index.js

"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and examine its basic structure
test -f "catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json" && echo "File exists" || echo "File not found"

# Count lines in file
wc -l "catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json"

# Check the specific line 34 mentioned in the review
sed -n '30,40p' "catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json"

Repository: KaotoIO/camel-catalog

Length of output: 497


🏁 Script executed:

# Also check if yarn build is referenced in package.json or if catalog is generated
if [ -f "package.json" ]; then
  echo "=== Checking build scripts ==="
  jq '.scripts' package.json 2>/dev/null || grep -A 5 '"scripts"' package.json
fi

# Check if there's a build script or if catalog files are generated
ls -la catalog/ 2>/dev/null | head -20

Repository: KaotoIO/camel-catalog

Length of output: 1108


🏁 Script executed:

# Now run the verification script provided in the review
python -m pip install --quiet jsonschema >/dev/null 2>&1
python - <<'PY'
import json
from pathlib import Path
from jsonschema import Draft7Validator

path = Path("catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json")
if not path.exists():
    print(f"File not found: {path}")
else:
    doc = json.loads(path.read_text())
    
    samples = {
        "assert": {"when": [{"send": {"endpoint": "e1"}}]},
        "async": {"actions": [{"send": {"endpoint": "e1"}}]},
        "catch": {"when": [{"receive": {"endpoint": "e1"}}]},
        "conditional": {"actions": [{"echo": {"message": "ok"}}], "when": "true"},
        "doFinally": {"actions": [{"echo": {"message": "done"}}]},
        "iterate": {"actions": [{"echo": {"message": "i"}}], "condition": "i < 3"},
        "parallel": {"actions": [{"echo": {"message": "p"}}]},
        "repeat": {"actions": [{"echo": {"message": "r"}}]},
        "repeatOnError": {"actions": [{"echo": {"message": "re"}}]},
        "sequential": {"actions": [{"echo": {"message": "s"}}]},
        "soap-assertFault": {"when": {"receive": {"endpoint": "soapClient"}}},
        "timer": {"actions": [{"echo": {"message": "tick"}}]},
    }
    
    print("Testing schema validation:")
    print("=" * 60)
    for name, payload in samples.items():
        if name not in doc:
            print(f"{name}: SKIP (not in schema)")
            continue
        schema = doc[name].get("propertiesSchema")
        if not schema:
            print(f"{name}: SKIP (no propertiesSchema)")
            continue
        errors = list(Draft7Validator(schema).iter_errors(payload))
        if errors:
            print(f"{name}: INVALID -> {errors[0].message}")
        else:
            print(f"{name}: VALID")
PY

Repository: KaotoIO/camel-catalog

Length of output: 1159


additionalProperties: false here breaks all nested actions—validation fails for any action object.

At line 34 (and identically at lines 61, 79, 92, 131, 158, 197, 230, 289, 322, 373, 429, 506, 532), the schema enforces type: object with additionalProperties: false but declares no allowed properties. This rejects every valid nested action: {"send": {...}}, {"receive": {...}}, {"echo": {...}}, etc. all fail with "Additional properties are not allowed."

Remove additionalProperties: false from all action-holder schemas (type:object with no declared properties).

Affected schemas (lines with same pattern)

34, 61, 79, 92, 131, 158, 197, 230, 289, 322, 373, 429, 506, 532

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@catalog/citrus/4.9.3/citrus-catalog-aggregate-test-containers.json` at line
34, The schema blocks that define action-holder objects currently declare
"type": "object" and "additionalProperties": false but declare no allowed
properties, which rejects valid nested action objects like {"send": ...},
{"receive": ...}, {"echo": ...}; locate each action-holder schema (the JSON
object nodes that have "type": "object" followed immediately by
"additionalProperties": false and no "properties" entry) and remove the
"additionalProperties": false entry (or change it to true) so nested action keys
are accepted; search for the repeated pattern occurrences in the file (the
blocks mentioned in the review) and apply the same change to each.

Comment on lines +1007 to +1008
"type" : "object",
"additionalProperties" : false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, check the file structure and read lines around 1007-1008
wc -l catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 112


🏁 Script executed:

# Read the relevant section
sed -n '1000,1020p' catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 625


🏁 Script executed:

# Check the TestActionBuilder_Object_ definition more thoroughly
# Look for the full definition including properties
rg -A 20 '"TestActionBuilder_Object_"' catalog/citrus/4.9.3/citrus-testcase.json | head -40

Repository: KaotoIO/camel-catalog

Length of output: 716


🏁 Script executed:

# Check if there's a properties key anywhere for this definition
rg -B 5 -A 15 '"TestActionBuilder_Object_"' catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 624


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 -m pip install --quiet jsonschema

python3 - <<'PY'
import json
from jsonschema import Draft7Validator

schema_path = "catalog/citrus/4.9.3/citrus-testcase.json"
with open(schema_path) as f:
    schema = json.load(f)

sample = {
    "name": "demo",
    "actions": [
        {"async": {"actions": [{"echo": {"message": "hi"}}]}}
    ]
}

errors = list(Draft7Validator(schema).iter_errors(sample))
for err in errors[:10]:
    print(f"path={list(err.path)} message={err.message}")
print(f"TOTAL_ERRORS={len(errors)}")
PY

Repository: KaotoIO/camel-catalog

Length of output: 192


🏁 Script executed:

# Check if TestActionBuilder_Object_ is referenced in the schema
rg '"TestActionBuilder_Object_"' catalog/citrus/4.9.3/citrus-testcase.json | grep -v '^ *"TestActionBuilder_Object_" *:' | head -20

Repository: KaotoIO/camel-catalog

Length of output: 47


🏁 Script executed:

# Check if the file has generation markers or comments
head -30 catalog/citrus/4.9.3/citrus-testcase.json
tail -30 catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 1862


🏁 Script executed:

# Check the build script and if this file is generated
if [ -f package.json ]; then
  jq '.scripts | keys' package.json
fi
if [ -f yarn.lock ]; then
  echo "yarn.lock exists - yarn is used"
fi
ls -la catalog/ | head -20

Repository: KaotoIO/camel-catalog

Length of output: 680


🏁 Script executed:

# Search for $ref patterns pointing to TestActionBuilder_Object_
rg '\$ref.*TestActionBuilder_Object_' catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 1176


🏁 Script executed:

# Let's look at the TestActions definition and see how it relates
sed -n '1010,1050p' catalog/citrus/4.9.3/citrus-testcase.json

Repository: KaotoIO/camel-catalog

Length of output: 1311


🏁 Script executed:

# Search for how "actions" arrays are defined - look for TestActionBuilder_Object_ pattern
rg -B 3 -A 3 'TestActionBuilder_Object_' catalog/citrus/4.9.3/citrus-testcase.json | head -50

Repository: KaotoIO/camel-catalog

Length of output: 1821


🏁 Script executed:

# Check if there's a build process that generates this file
cat package.json | grep -A 10 '"build:catalog"'
if [ -f scripts/build.js ]; then echo "=== build.js ==="; head -50 scripts/build.js; fi

Repository: KaotoIO/camel-catalog

Length of output: 535


Line 1008 blocks all nested actions due to missing properties schema

definitions.TestActionBuilder_Object_ defines an object type with "additionalProperties": false but no "properties" field, making only {} valid. This breaks all 16+ references in nested action arrays (async, iterate, doFinally, when blocks, etc.), rejecting valid actions like {"echo":{"message":"hi"}}.

The validation test confirms the exact failure:

path=['actions', 0, 'async', 'actions', 0]
message=Additional properties are not allowed ('echo' was unexpected)
Proposed fix
    "TestActionBuilder_Object_" : {
      "type" : "object",
-     "additionalProperties" : false
    },

Since this file is generated by yarn build (per the coding guideline), regenerate the catalog after fixing the upstream schema source.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@catalog/citrus/4.9.3/citrus-testcase.json` around lines 1007 - 1008, The
schema node definitions.TestActionBuilder_Object_ incorrectly sets
"additionalProperties": false without defining a "properties" object, which
makes only an empty object valid and rejects real action objects (e.g., {"echo":
{...}}); fix by updating the upstream schema source so TestActionBuilder_Object_
either declares the allowed "properties" for nested actions or allows arbitrary
action keys (set additionalProperties: true) depending on intended validation,
then rebuild the generated catalog with yarn build to regenerate
catalog/citrus/4.9.3/citrus-testcase.json so the corrected schema replaces the
faulty definition.

Copy link
Copy Markdown
Member

@lordrip lordrip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @christophd, do you think it would be possible to use Tabs for the catalog JSON files? We switched from Spaces to Tabs in the Kaoto catalog and saved 40 MB 😬

@christophd
Copy link
Copy Markdown
Contributor Author

Waiting for Citrus version 4.9.4 to fix some issues with the YAML DSL schema

@christophd christophd closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants