Claus Ibsen created CAMEL-26384:
-----------------------------------
Summary: camel-jbang - AI tools: a resource: in both values of a
Simple ternary goes before the function, and the list item column message
quotes the lines
Key: CAMEL-26384
URL: https://issues.apache.org/jira/browse/CAMEL-26384
Project: Camel
Issue Type: Improvement
Components: camel-jbang, camel-yaml-dsl
Reporter: Claus Ibsen
Fix For: 4.24.0
Two findings from the local-model benchmark (qwen3.6, r23).
*A resource: in both values of a top-level ternary*
The model wrote {{${exchangeProperty.CamelTimerCounter} == 1 ?
resource:file:order.json : resource:file:order-bad-email.json}}. The rewrite of
CAMEL-26316 put both values inside the function, as quoted text:
{{${exchangeProperty.CamelTimerCounter == 1 ? 'resource:file:order.json' :
'resource:file:order-bad-email.json'}}}. That is valid Simple, but resource: is
read only at the start of the expression, so the body became the text
resource:file:order.json, and the next step failed with "JsonParseException:
Unrecognized token 'resource'" (2 of 8 runs). When both values start with the
same resource: and scheme, the rewrite now puts it before the function:
{{resource:file:${exchangeProperty.CamelTimerCounter == 1 ? 'order.json' :
'order-bad-email.json'}}}.
*The list item column message*
"line 38: this list item starts in column 9, but the list that starts at line
32 has its items in column 7" gives only numbers. The model sent the same
indentation again up to 18 times in a row (4 steps in r23). The message now
quotes both lines as written, so the model sees the spaces it has to change:
line 38 (" - log:"): ... line 32 (" - setVariable:") .... The
lenient repair that reads this message accepts the quoted form.
_Filed by Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)