feat: add source: labels to all auto-created issues for provenance tracking#4955
feat: add source: labels to all auto-created issues for provenance tracking#4955marcusquinn merged 1 commit intomainfrom
Conversation
…acking Every autonomous process that creates GitHub issues now adds a source:* label identifying which process created it. This makes auto-created work filterable and traceable — you can see at a glance whether an issue came from the review scanner, quality sweep, CI failure miner, etc. Labels added: - source:review-feedback (quality-feedback-helper.sh) - source:review-scanner (post-merge-review-scanner.sh) - source:quality-sweep (stats-functions.sh — quality-review + simplification-debt) - source:health-dashboard (stats-functions.sh — supervisor/contributor health) - source:ci-failure-miner (gh-failure-miner-helper.sh) - source:circuit-breaker (circuit-breaker-helper.sh) - source:mission-validation (milestone-validation-worker.sh) - source:findings-to-tasks (findings-to-tasks-helper.sh) - source:self-evolution (self-evolution-helper.sh) All labels use color #C2E0C6 (light green) for visual consistency. Existing type labels (quality-debt, bug, etc.) are preserved — source:* is an orthogonal dimension.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances issue management by implementing a new Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Caution Review failedPull request was closed or merged during review WalkthroughThese changes implement consistent source labeling across eight shell scripts in the DevOps automation framework, adding "source:" prefixed labels to issues created by circuit breaker, findings-to-tasks, failure miner, mission validation, review scanner, quality feedback, self-evolution, and health/quality sweep automation workers. Each script now creates and applies its corresponding source label to track issue provenance. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Mar 15 20:31:27 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Code Review
This pull request consistently adds source:* labels to issues created by various autonomous processes, which is a great improvement for tracking the origin of automated work. The implementation is straightforward across the modified shell scripts.
I've found a few areas for improvement:
- Two scripts (
findings-to-tasks-helper.shandself-evolution-helper.sh) are missing thegh label createcommand, which is inconsistent with the other scripts and could lead to the source labels not being applied. - There's a minor code cleanup opportunity in
gh-failure-miner-helper.shregarding an unused variable. - There's some inconsistency in error handling for the
gh label createcommands across the scripts.
My detailed comments provide suggestions to address these points.
| local severity="${3:-$DEFAULT_SEVERITY}" | ||
|
|
||
| local out="actionable-finding,${source},severity:${severity}" | ||
| local out="actionable-finding,${source},severity:${severity},source:findings-to-tasks" |
There was a problem hiding this comment.
The source:findings-to-tasks label is added here, but the script is missing the corresponding gh label create command to ensure the label exists. This is inconsistent with other scripts in this PR and may result in issues being created without the intended source label. Please add the label creation logic before the issue is created. It should look something like this:
gh label create "source:findings-to-tasks" --repo "$repo_slug" \
--description "Auto-created by findings-to-tasks-helper.sh" \
--color "C2E0C6" --force || trueYou'll need to ensure a variable like $repo_slug is available in the scope where you add this.
| --title "Self-evolution: ${description}" \ | ||
| --description "$issue_body" \ | ||
| --labels "self-evolution,auto-dispatch" 2>&1) || { | ||
| --labels "self-evolution,auto-dispatch,source:self-evolution" 2>&1) || { |
There was a problem hiding this comment.
The source:self-evolution label is added here, but the script is missing the corresponding gh label create command. This is inconsistent with other scripts in this PR and may result in issues being created without the intended source label. Please add the label creation logic before calling claim-task-id.sh. It should look something like this:
gh label create "source:self-evolution" --repo "$repo_slug" \
--description "Auto-created by self-evolution-helper.sh" \
--color "C2E0C6" --force || trueYou'll need to ensure a variable like $repo_slug is available. I see --repo-path "$repo_path" is used, so you might need to derive the repo slug from the path if it's not already available.
|
|
||
| # Ensure source label exists on repos that will receive issues | ||
| if [[ "$dry_run" != "true" ]]; then | ||
| local seen_repos="" |
| local repo_entry | ||
| for repo_entry in $(printf '%s\n' "$clusters_json" | jq -r '.[].repo' | sort -u); do | ||
| gh label create "source:ci-failure-miner" --repo "$repo_entry" \ | ||
| --description "Auto-created by gh-failure-miner-helper.sh" --color "C2E0C6" --force 2>/dev/null || true |
There was a problem hiding this comment.
The gh label create command uses 2>/dev/null || true. While this works, it suppresses any potential error messages from gh, such as authentication or permission issues. Other scripts in this PR use just || true, which is slightly safer as it allows errors to be logged while still preventing the script from exiting. For consistency and better error visibility, consider using just || true here and in other places where 2>/dev/null is used for gh label create (e.g., milestone-validation-worker.sh, stats-functions.sh).
| --description "Auto-created by gh-failure-miner-helper.sh" --color "C2E0C6" --force 2>/dev/null || true | |
| --description "Auto-created by gh-failure-miner-helper.sh" --color "C2E0C6" --force || true |
References
- Avoid using '2>/dev/null' for blanket suppression of command errors in shell scripts to ensure that authentication, syntax, or system issues remain visible for debugging.
- In shell scripts with 'set -e' enabled, use '|| true' to prevent the script from exiting when a command fails on an optional lookup, but do not suppress stderr with '2>/dev/null' so that actual syntax or system errors remain visible for debugging.



Summary
source:*label identifying which process created itlabel:source:review-feedbackshows all issues from review bot feedback scansquality-debt,bug, etc.) are preserved —source:*is orthogonalSource labels added
source:review-feedbackquality-feedback-helper.shsource:review-scannerpost-merge-review-scanner.shsource:quality-sweepstats-functions.shsource:health-dashboardstats-functions.shsource:ci-failure-minergh-failure-miner-helper.shsource:circuit-breakercircuit-breaker-helper.shsource:mission-validationmilestone-validation-worker.shsource:findings-to-tasksfindings-to-tasks-helper.shsource:self-evolutionself-evolution-helper.shMotivation
When new issues appear in a repo without the user creating them, there was no way to tell which automated process was responsible. The
quality-debtlabel tells you what kind of issue, but not which process created it. Withsource:*labels, you can filter by process and understand the origin of all auto-created work.Verification
ShellCheck passes clean on all 8 modified files. All labels use consistent color
#C2E0C6(light green).Summary by CodeRabbit