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

   [CAMEL-26789](https://issues.apache.org/jira/browse/CAMEL-26789): a bug in 
the experiments of CAMEL-26774 (#29480). I found it in a recorded "let there be 
chaos" run (CAMEL-26760).
   
   **What happened.** The AI ran this experiment against the chaos example 
shop, with the payment service down and the dead letter channel failing too:
   ```
   endpoint=http://localhost:8080/payment error status=503 until=1m; 
endpoint=direct:parked error at=dlq until=1m expect=orders:failed<=0
   ```
   The experiment passed (0 failed). The report of the same run said:
   ```
   FAIL: rule r9 failed or dropped 58 sends of the dead letter channel, which 
handled them without delivering them: 58 lost
   ```
   The dead letter channel handles a message it could not deliver 
(`deadLetterHandleNewException`), so the message neither fails nor completes in 
its route, and no expectation on the route can see it. The report counts it as 
lost at the dead letter channel and fails. The experiment only read its 
expectations, so it passed.
   
   **Fix**
   - An experiment counts the messages its rules lost at the dead letter 
channel: `lostAtDeadLetterChannel`, plus `lostAtDeadLetterChannelPerRule`.
   - Its verdict is FAIL when there are any, as the report's verdict is.
   - The journal text and `camel get chaos --report` show "lost at the dead 
letter channel: 58 messages, handled there without being delivered".
   
   **Tests**
   - `ChaosExperimentTest.messagesLostAtTheDeadLetterChannelFailTheExperiment`: 
a route with a dead letter channel, the service and the dead letter channel 
both failing. Billing has 0 failed, and the experiment is still FAIL with 3 
lost.
   - `ListChaosTest` checks the new line.
   - camel-chaos: 826 green.
   
   Independent of the open chaos stack (#29498, #29499, #29501): it changes 
code that is already on main.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS
   


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