luigidemasi opened a new pull request, #26985: URL: https://github.com/apache/camel/pull/26985
# Description Routes that need several independent semantic decisions about the same message currently evaluate each question separately. This adds `refs:actionable,department,urgency` to the existing semantic language, returning a map of decisions keyed by question name for reuse by ordinary EIPs. Each batch resolves one snapshot of the named definitions and evaluates a shared state selector once. Every answer is validated against its question's decision policy before publishing the decision map and detailed `CamelSemanticResults` diagnostics. Invalid references, incompatible selectors, incomplete responses and provider failures propagate through Camel error handling; batches cannot be predicates. Existing `ref:name` expressions and the single-question adapter method retain their behavior. A default `SemanticAdapter.evaluateBatch` method delegates sequentially for existing adapters. TypeSafe AI overrides it to send mixed Boolean, Choice and Score questions in one HTTP request through its existing managed client. The Camel model and core DSL are unchanged. Includes Java and YAML examples, fallback/shared-state documentation, and regression coverage for policies, failure cleanup, interruption, response validation and reload consistency. Validation: - `camel-semantic`: 74 tests passed. - `camel-typesafe-ai`: 158 tests passed, including the single-request mixed batch and malformed HTTP response cases. - YAML `SemanticQuestionTest`: 29 tests passed. - Formatting and import sorting passed in all changed modules. - `mvnd -B -ntp -Dmaven.build.cache.enabled=false clean install -DskipTests`: all 695 modules passed; regenerated catalog documentation included. # Target - [x] Targets `apache/camel:main`. # Tracking - [x] [CAMEL-25049](https://issues.apache.org/jira/browse/CAMEL-25049) # Apache Camel coding standards and style - [x] Meaningful commit subject and body. - [x] Full root build completed and related generated artifacts included. # AI-assisted contributions - [x] AI co-authorship included in the commit. Generated by Codex via /oss-fix-issue on behalf of @luigidemasi. -- 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]
