davsclaus opened a new pull request, #29327: URL: https://github.com/apache/camel/pull/29327
https://issues.apache.org/jira/browse/CAMEL-26690 Part 4 of 4 for CAMEL-26690, follow-ups from the r28 run of the local-model benchmark. The four PRs are independent of each other: each was built and tested alone on main. - **JsonPath compiled at write time.** `$[?(@.orderId == '${header.id}')][]` failed only at runtime (r28n-3 and -6). The write now compiles jsonpath expressions: "jsonpath ... does not compile: Could not parse token starting at position 33 (at []). ...; JsonPath has no [], and a filter or [*] gives a list already: write $[?(@.orderId == '${header.id}')]". `${...}` placeholders are filled in first. It fires on 30 of 1,275 jsonpath writes of the benchmark, all of them expressions that fail at runtime. - JsonPath is not on the CLI's classpath, so the check uses camel-jsonpath, downloaded once per process the way the expression tool does it (CAMEL-24907). Without it the check is skipped. This also applies to `camel validate yaml`. - json-path is added as a test dependency. - **The expression tool on a JSON text body.** Field reads on a JSON text body failed ("No such property: sku for class: java.lang.String ... unmarshal it first"), which the tool cannot do; connect-stock-api step 2 made 21 such calls. The tool now evaluates on the parsed JSON and says so: "the body is JSON text, so this is the result on that text parsed into a List, as a route has the body after unmarshal: json ...". - **Repeated evaluations.** The third identical evaluation gets the repeated-call note, as other tools do (not for expressions that read the clock, random values, ids, properties, beans or files). The MCP server's `camel_eval_expression` takes the connection to count repeats; its arguments are unchanged. **Checks** - Tests pass: the `ai` package of camel-jbang-core (944, 1 skipped as before), camel-jbang-mcp (540), camel-yaml-dsl-validator (350). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016Y4dDi5iQNgtHrDdz2NpwF -- 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]
