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

   ## Description
   
   From the round-2 benchmark (series l3): after the validator's hint for 
`include: ".*\.json$"` (an unknown escape in double quotes, correctly answered 
with `write the value in single quotes: '.*\.json$'`), the model wrote 
`include: '.*\\.json$'`, doubling the backslash as a Java string would. Inside 
single quotes YAML keeps both, the regex then matches a file name containing a 
literal backslash, no file matched, and the route ran ten seconds in silence. A 
person used to Java strings makes the same slip.
   
   `EndpointChecks.checkRegexOptions`, which already parses include/exclude on 
the file components, now reports a value with a doubled backslash:
   
   ```
   Line 5: file: include=.*\\.json$ matches a backslash in the file name (in 
single quotes one backslash escapes the dot): write include='.*\.json$'
   ```
   
   ## Tests
   
   `SourceValidatorEndpointTest.aDoubledBackslashInAnIncludeRegexIsReported`: 
the doubled form is reported with the form to write, the single-backslash form 
is not.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj


-- 
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