Automation: CI failure on MR returns issue from state::needsReview to state::needsWork
## Summary When an MR's CI pipeline fails, automatically transition the linked issue from `state::needsReview` back to `state::needsWork`. ## Work Track Cross-track (AI Core / coordination) ## Context / Background Today, a failed pipeline on an MR in review does not change the issue's state, so issues sit in `needsReview` advertising work that is not actually reviewable. We want the automation layer to detect pipeline failure events and roll the linked issue back to `needsWork`. Parent / related: #3586474. This issue is blocked by the three exploration issues (#3586475, #3586476, #3586477) — the platform choice and the available `gitlab_api` primitives must land first. ## Tasks * [ ] Subscribe to GitLab `Pipeline Hook` events for the configured AI Initiative repos. * [ ] On status `failed`, locate the source MR(s) and follow them to the linked issue (issue fork → upstream). * [ ] If the linked issue currently has `state::needsReview`, swap it for `state::needsWork`. * [ ] Post a short comment on the issue explaining why the state changed and link to the failing pipeline. * [ ] Idempotent: do not re-post a comment if the state was already moved for the same pipeline run. ## Acceptance Criteria * [ ] Failing CI on an MR demonstrably moves the linked issue to `state::needsWork`. * [ ] Successful re-runs do not undo a deliberate human override. * [ ] No double-comments on retry pipelines. ## Related issues ## AI Usage - [x] AI Assisted Issue — This issue was generated with AI assistance, but was reviewed and refined by the creator.
issue