Loading
Add poll_after_seconds hint to MCP get_pipeline for active pipelines
What does this merge request do and why?
After pushing code or kicking off a pipeline, AI agents often need to wait for a pipeline to finish (e.g. to confirm a build, check test results, or verify deployment). Currently, get_pipeline returns no waiting guidance, causing agents to either poll in an aggressive loop or run arbitrary shell sleep scripts.
Following the pattern established by get_duo_session, this MR adds a poll_after_seconds: 30 hint to the structured response of get_pipeline when the pipeline is in an active state (running, pending, created, preparing, waiting_for_resource, waiting_for_callback, canceling). When the pipeline reaches a finished/terminal state (success, failed, canceled, skipped, manual), the hint is omitted.
References
Closes #635912
How to set up and validate locally
bundle exec rspec spec/services/mcp/tools/pipelines/get_pipeline_tool_spec.rb spec/services/mcp/tools/pipelines/get_pipeline_service_spec.rbChangelog: added