Drive agentic chat verification run over WebSocket
What does this MR do and why?
This MR wires the agentic chat verification check run action available for SM instances with a self-hosted DWS/AIGW:
- On
Runbutton click, theCreateFunctionalVerificationWorkflowmutation is triggered. It then uses theworfklowIdfrom the response to open a WebSocket connection viaWorfklowStream. - The check is successful when the stream reports a terminal checkpoint of
INPUT_REQUIREDorTOOL_CALL_APPROVAL_REQUIRED. The check failed if it reports a terminal checkpoint ofFINISHED,FAILED, orSTOPPED. When available, the check surfaces the underlying failure detail fromui_chat_log. - Handles 3 different WebSocket-layer failure cases:
handshake_failed: the WebSocket connection's handshake never completes. The message hints at checking the reverse proxy configuration and ensuring that it supports WebSocket upgrades based on RFH reports [ref].abnormal_close: the connection opens successfully, then closes unexpectedly before a terminal checkpoint arrives. The message includes the close category, code, and server-provided reason when available.timeout: no terminal message or close event ever arrives. A watchdog timer (100 seconds) forces the run toFAILED.
References
Related to #627472 (closed)
Parent epic: #602572 (closed)
How to set up and validate locally
- Enable the
duo_agentic_chat_verification_checkfeature flag - Enable self-hosted models and configure a self-hosted model for the instance.
- Visit
/admin/gitlab_duoas an instance admin. - In the
Functional verification checkscard, selectgitlab-duo(or whichever namespace that has DAP enabled) from namespace selector - Click run
| Case | Steps | Expected |
|---|---|---|
| Passed |
Select a valid self-hosted model for Agentic Chat in |
Status badge updates to
|
| Failed with DWS error | Select an outdated self-hosted model for Agentic Chat (ex: Claude Sonnet 3.7). |
Status badge updates to Error message:
|
|
Failed due to WebSocket |
Click Run button In the browser console, run |
Status badge updates to Error message: |
| Failed due to WebSocket close with reason |
Click Run button In the browser console, run |
Status badge updates to Error message: |
| Failed due to WebSocket handshake error |
|
Status badge updates to Error message: |
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.





