CAMEL-24857, CAMEL-24858, CAMEL-24859: two validator rows and the reload outcome in camel_write_file, from the stepwise benchmark - #26640
Conversation
…aceholder used as an endpoint option or bean property, and a required endpoint path option that is missing; camel_write_file reports the outcome of the reload in dev mode Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
Reviewed three fixes (CAMEL-24857/24858/24859). The validation logic and reload-outcome design are sound; two small issues found.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
…d wait, the HashSet import, and a test for the properties reload status Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after follow-up commits (090cfe1, faf5c43).
All three prior findings are addressed:
- Monotonic clock —
await()now uses Camel'sStopWatch(nanoTime underneath), consistent with the rest of camel-jbang-core. - HashSet import —
java.util.HashSetis now imported properly inEndpointChecks.java. - Properties reload test —
aPropertiesReloadIsReportedAsSuchcovers thepropertiesbranch ofclassify().
One nit found in the new YamlLines.java code, same style as the HashSet issue that was just fixed.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
…l/dsl/jbang/core/commands/ai/YamlLines.java Co-authored-by: Guillaume Nodet - AI Bot <gnodet+bot@gmail.com>
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after commit 84a58e38.
The nit from the previous review (FQN java.util.Set → Set) is half-fixed: the java.util.Set qualifier was dropped from the field declaration, but import java.util.Set; was not added to YamlLines.java. The file only imports java.util.regex.Matcher and java.util.regex.Pattern — Set is unresolved and the class will not compile.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
gnodet-bot
left a comment
There was a problem hiding this comment.
Re-review after commit e2df029.
The open finding from the previous review is addressed: import java.util.Set; has been added to YamlLines.java and the file now compiles cleanly.
Reviewed the new code introduced in this push:
checkSimplePlaceholders/checkRequiredPathOptions(EndpointChecks.java): logic is correct. TheDYNAMIC_URI_EIPSguard correctly exemptstoD,wireTap,enrich,pollEnrich,recipientList,routingSlip, anddynamicRouter. TheDOTTED_KEYregex correctly excludes single-segment expressions (${body},${date:now:yyyy}) and allSIMPLE_ROOTSkeys. The required-path-options check correctly ignores bare-authority URIs (infinispan://) and only fires onfrom/toEIPs.validateBeanPropertyPlaceholders(BeanRefChecks.java): the indentation-tracking state machine handles nested beans blocks, multiple bean entries in the same list, and top-levelproperties:keys (not inside abeans:block) correctly.ReloadOutcome: the newest-first ordering fromLogFileReader.buildis handled correctly. ThesinceKeycomparison prevents false positives from pre-write reload records. The validator-report lookup (j = i+1..i+4) correctly picks up theYamlLoadFailureReportERROR record that precedes the FileWatcher WARN in newest-first order. Tests cover baseline, failed-with-report, properties, and reloaded-after-failed cases.- Static analysis: the
synchronized-without-volatileast-grep finding onEndpointChecks.javais a false positive —defaultCatalogis declaredvolatile(line 247). All other findings (broad-exception-catch,mutable-collection-return) are pre-existing and unrelated to this PR.
No new issues. All three CAMEL-24857/24858/24859 fixes are sound.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 11 of 692 tested, 24 compile-only — current: 11 all testedMaveniverse Scalpel detected 38 affected modules (current approach: 11). Skip-tests mode would test 11 modules (6 direct + 8 downstream), skip tests for 24 (generated code, meta-modules)
|
| Module | Duration | Status |
|---|---|---|
| Camel :: Launcher | 50.8s | SUCCESS |
| Camel :: JBang :: MCP | 38.7s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 31.4s | SUCCESS |
| Camel :: MongoDB GridFS | 25.6s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 21.7s | SUCCESS |
| Camel :: Component DSL | 21.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 14.5s | SUCCESS |
| Camel :: Docs | 14.4s | SUCCESS |
| Camel :: Kamelet Main | 8.0s | SUCCESS |
| Camel :: Catalog :: Camel Route Parser | 7.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 7.6s | SUCCESS |
| Camel :: Catalog :: Camel Report Maven Plugin | 7.5s | SUCCESS |
| Camel :: Spring Cloud Config | 7.4s | SUCCESS |
| Camel :: YAML DSL :: Validator | 7.3s | SUCCESS |
| Camel :: YAML DSL :: Deserializers | 6.3s | SUCCESS |
| Camel :: All Components Sync point | 4.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 4.7s | SUCCESS |
| Camel :: YAML DSL :: Maven Plugins | 3.4s | SUCCESS |
| Camel :: YAML DSL :: Validator Maven Plugin | 3.3s | SUCCESS |
| Camel :: Catalog :: Maven | 3.0s | SUCCESS |
| Camel :: Catalog :: Suggest (deprecated) | 2.3s | SUCCESS |
| Camel :: Assembly | 2.0s | SUCCESS |
| Camel :: Coverage | 1.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.6s | SUCCESS |
| Camel :: Endpoint DSL :: Support | 1.5s | SUCCESS |
| Camel :: JBang :: Integration tests | 1.0s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.0s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: Catalog :: Console | 0.9s | SUCCESS |
| Camel :: Catalog :: Dummy Component | 0.9s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 0.8s | SUCCESS |
| Camel :: Launcher :: Container | 0.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 0.6s | SUCCESS |
| Camel :: Endpoint DSL | n/a | |
| Camel :: Integration Tests | n/a | |
| Camel :: JBang :: Core | n/a | |
| Camel :: MongoDB | n/a | |
| Camel :: YAML DSL | n/a |
Top 20 slowest modules:
Camel :: Launcher(50.8s)Camel :: JBang :: MCP(38.7s)Camel :: JBang :: Plugin :: TUI(31.4s)Camel :: MongoDB GridFS(25.6s)Camel :: Catalog :: Camel Catalog(21.7s)Camel :: Component DSL(21.2s)Camel :: JBang :: Plugin :: Kubernetes(14.5s)Camel :: Docs(14.4s)Camel :: Kamelet Main(8.0s)Camel :: Catalog :: Camel Route Parser(7.9s)Camel :: JBang :: Plugin :: Testing(7.6s)Camel :: Catalog :: Camel Report Maven Plugin(7.5s)Camel :: Spring Cloud Config(7.4s)Camel :: YAML DSL :: Validator(7.3s)Camel :: YAML DSL :: Deserializers(6.3s)Camel :: All Components Sync point(4.9s)Camel :: JBang :: Plugin :: Validate(4.7s)Camel :: YAML DSL :: Maven Plugins(3.4s)Camel :: YAML DSL :: Validator Maven Plugin(3.3s)Camel :: Catalog :: Maven(3.0s)
Description
Three findings of the stepwise half of the round-2 local-model benchmark (ten camel-jbang-examples built step by step through the camel-jbang-mcp server, five runs each). Together they were the cause of most systematic failures of the series: the model wrote something the validator accepted, the runtime rejected it on the reload, and the write tool had already said "written".
CAMEL-24857, a
${...}placeholder where{{...}}is meant.period: "${welcome.period}",period: ${properties:welcome.period}on an endpoint,start: ${order.first-number}on a bean property: Simple syntax for a property key. The endpoint checks and a new bean property check report it with the form to write:Only a property key in Simple syntax is reported (
${welcome.period},${properties:x}): a value whose first segment is a Simple root (${body.id},${header.x},${date:...},${exception.message}) is a Simple expression and is left alone, as is the uri oftoD,wireTap,enrich,pollEnrich,recipientList,routingSlipanddynamicRouter, which evaluate it as Simple. Seven of eight failures of two steps in the series were this shape.CAMEL-24858, a required path option missing.
uri: cronwith only a schedule under parameters passedcamel validate;camel runfails with "Option name is required when creating endpoint uri with syntax cron:name", and in dev mode the reload fails with a WARN. Afrom:orto:with a bare scheme, no path and no//, whose component has a required path option that is not among the parameters either, is reported with both places it can go. An explicit empty authority (infinispan://with a custom listener) is a choice and is left alone, as are the intercept patterns (jms*).CAMEL-24859, the reload outcome in the write tool. When an integration of the project is selected and runs in dev mode,
camel_write_fileremembers the newest reload record before the write, waits up to eight seconds for a newer one, and answers with it:reload.statusreloaded,properties,failedwith the cause (the first lines, no stack frames) and the validator's report the runtime logs next to a load failure (CAMEL-24851), orunknownwhen nothing came. The message says "FAILED to reload the file, the route is not running; fix the content and write again" for a failure. A write with no selected integration answers as before.Two documentation examples had the placeholder slip (mongodb, mongodb-gridfs:
database=${mongodb.database}) and one had a nameless direct endpoint in all three forms (spring-cloud-config,from("direct")): fixed, with their catalog copies. Upgrade guide note for the tool.Tests
SourceValidatorPlaceholderTest: the endpoint option and bean property cases with the form to write, the dynamic EIP and{{...}}left alone, the missingnameon cron reported and not reported when given in the uri or under parameters.ReloadOutcomeTeston synthetic log records: the baseline before the write, a failed reload with the cause and the validator's report and no stack frames, a later successful reload.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj