Wire `author_source` into `completed_pipeline_execution` and `first_pipeline_succeeded` events

What does this MR do and why?

Part of #596636 — identifying agent-generated pipeline configs to filter Config Quality and Time-to-first-pipeline metrics to AI-guided flows.

Previous MRs in this chain established the foundation:

This MR closes the loop by surfacing author_source on the two downstream events that analytics actually uses:

  • completed_pipeline_execution — fires on every pipeline completion; author_source lets us segment Config Quality metrics by whether the pipeline was set up by a human or an AI agent.
  • first_pipeline_succeeded — fires on Time-to-first-pipeline; author_source lets us compare TTFP for AI-guided onboarding vs. manual onboarding.

Because these events fire from the pipeline execution context, not from a git push, we cannot read the git trailer there directly. Instead we look up the persisted value from ci_project_metrics at event-fire time. When no AI agent trailer was recorded for the project, the value defaults to 'human'.

References

Edited by Sahil Sharma

Merge request reports

Loading