davsclaus opened a new pull request, #29703:
URL: https://github.com/apache/camel/pull/29703

   A follow-up from r32 of the local-model benchmark (qwen3.6, 7 rounds), 
route-batch-file step 2: append each line that cannot be read to `rejects/<file 
name>`, one per line. The step failed in all 7 runs. In 4 of the 5 runs that 
wrote the route, the rejected lines ran together:
   
   - Three routes wrote to a file endpoint with `fileExist: Append` and no 
`appendChars`.
   - One had `appendChars: "\n"`. In YAML that is a line break, and the 
endpoint uri drops line breaks (`URISupport.textBlockToSingleLine`), so it adds 
nothing: the run logged the endpoint as 
`file://rejects?appendChars=&fileExist=Append`.
   - In step 3, 4 of the 7 runs rewrote the file and turned the `appendChars: 
"\\n"` of the reference into `"\n"` the same way.
   
   The model read the options of the file component in 5 runs, and saw 
`appendChars` only once (with `optionsFilter: append`).
   
   **What changes**
   
   - A write of a route with a file producer (`to:` or `toD:`) with `fileExist: 
Append` that adds nothing after each message gets a note; the write is not 
refused. The note says that the messages run together in the file, and that 
`appendChars: "\\n"` under `parameters:` of the `to:` writes a line break after 
each message (the file component turns the two characters `\n` into a line 
break). In the uri form, the note gives the uri to write, with `%5Cn`.
   - The note also comes for an `appendChars` that has no effect: a line break 
in the YAML, or `\n` in a `toD` with `${...}`, which the toD reads as Simple 
and turns into a line break that the uri drops. There the note gives `%5Cn`, 
which works.
   - No note when the body already ends with a line break. Only the file 
component gets the note: ftp, ftps and sftp have no `appendChars`.
   - Checked over 24,422 YAML files (the final files of the benchmark runs and 
the shipped examples): the note comes on 10 of them, all route-batch-file runs, 
and on no reference solution or shipped example.
   
   **Tests**
   
   - `WriteNotesTest`: nothing between the messages, the uri form, a line break 
after each message (no note), a line break of the YAML, a toD with an 
expression, and a write that does not append (no note).
   - `AuthoringToolsEditTest`: the note comes with the write.
   - Run locally: the camel-jbang-core `ai` package, 1024 tests, 0 failures, 1 
skipped.
   
   🤖 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]

Reply via email to