Start foundational flows with no coding environment on Workhorse
What does this merge request do and why?
Flows with coding_environment: none fail in CI when the project's .gitlab/duo/agent-config.yml uses an image without curl. These flows skip setup_script, and the executor needs curl to download the Duo CLI. About 16.7% of external projects that ran Recommend Reviewers at least 10 times failed every time.
This change makes Ai::Catalog::ExecuteWorkflowService start a foundational flow on Workhorse through ExecuteRunService when its coding environment maps to Workhorse (none), the same way Slack runs its flows. The runtime comes from coding_environment, so a flow needs no extra opt-in and no feature flag. To give a Workhorse run what a CI run gets:
ServerSideExecutionServicesends the flow's feature setting name (model selection and self-hosted billing) and the resource and flow context.- The
:executepre-authorization mints the composite identity token of the workflow's service account when the session runs on Workhorse and the project allows flow execution. The workflow's state decides this, not a request header, and there is no fallback service account. - A Workhorse start checks "Allow flow execution", as a CI start does.
ServerSideTurnWorkerdrops a session whose turn fails when no messaging surface reports the failure, through anAuditedDropconcern shared withCreateAndStartWorkflowService, instead of leaving it running until the stuck session cleanup.
No flow on this start path declares none yet, so no flow changes runtime. Recommend Reviewers declares full on master (!265859 (merged)) and keeps running setup_script in CI. It can move to none, and so to Workhorse, when detached server-side execution (#634394) frees the worker slot of a turn. #636378 tracks that change.
References
Screenshots or screen recordings
| Before | After |
|---|---|
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.