Automation: feature change without tests → state::needsWork and needs-tests label
## Summary When an MR adds / changes code outside of `docs/` but contains no changes under any `tests/` directory, set `state::needsWork` on the linked issue and add a `needs-tests` label. ## Work Track Cross-track (AI Core / coordination) ## Context / Background Quality bar: any feature / behavior change should ship with tests. Detect MRs that change source code without touching a tests directory and roll the issue back to `needsWork` so the contributor knows to add tests before another review cycle. 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 `Merge Request Hook` events (open + update). * [ ] Compute the diff: any change outside `docs/` counts as "code changed". * [ ] If "code changed" is true and no file under any `tests/` directory is added or modified, set `needs-tests` on the MR and the linked issue, and roll the issue's state to `state::needsWork` (only if it was in `needsReview` or higher). * [ ] When tests are added in a follow-up push, remove `needs-tests` automatically. * [ ] Post a single comment on the MR explaining the policy the first time the label is added. ## Acceptance Criteria * [ ] Code-only MRs are caught and labelled. * [ ] Adding tests in a subsequent push clears the label without manual intervention. * [ ] Docs-only MRs are not affected. ## Related issues ## AI Usage - [x] AI Assisted Issue — This issue was generated with AI assistance, but was reviewed and refined by the creator.
issue