Skip to content

feat: add source: labels to all auto-created issues for provenance tracking#4955

Merged
marcusquinn merged 1 commit intomainfrom
feature/source-labels-auto-issues
Mar 15, 2026
Merged

feat: add source: labels to all auto-created issues for provenance tracking#4955
marcusquinn merged 1 commit intomainfrom
feature/source-labels-auto-issues

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Mar 15, 2026

Summary

  • Every autonomous process that creates GitHub issues now adds a source:* label identifying which process created it
  • Makes auto-created work filterable — e.g., label:source:review-feedback shows all issues from review bot feedback scans
  • Existing type labels (quality-debt, bug, etc.) are preserved — source:* is orthogonal

Source labels added

Label Script Creates
source:review-feedback quality-feedback-helper.sh quality-debt issues from unactioned review bot feedback
source:review-scanner post-merge-review-scanner.sh review-followup issues from merged PR reviews
source:quality-sweep stats-functions.sh quality-review + simplification-debt issues
source:health-dashboard stats-functions.sh supervisor/contributor health dashboard issues
source:ci-failure-miner gh-failure-miner-helper.sh bug issues from systemic CI failures
source:circuit-breaker circuit-breaker-helper.sh circuit-breaker trip issues
source:mission-validation milestone-validation-worker.sh bug issues from mission validation
source:findings-to-tasks findings-to-tasks-helper.sh task issues from audit/review findings
source:self-evolution self-evolution-helper.sh self-improvement tasks from capability gap detection

Motivation

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-debt label tells you what kind of issue, but not which process created it. With source:* 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

  • Chores
    • Enhanced GitHub issue labeling across automated workflows with source-tracking labels to identify their origins and improve issue organization and traceability.

…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.
@github-actions github-actions bot added the enhancement Auto-created from TODO.md tag label Mar 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 source:* labeling convention for all automatically generated GitHub issues. This change provides a robust mechanism for tracking the origin of issues, allowing users to quickly identify which automated script or process created a particular task or debt. The new labels integrate seamlessly with existing categorization, improving overall issue traceability and filtering capabilities without disrupting current workflows.

Highlights

  • Provenance Tracking for Auto-Created Issues: Introduced source:* labels to all automatically created GitHub issues, enabling clear identification of the script or process responsible for their generation.
  • Enhanced Issue Filtering: Enabled filtering of auto-created work by its source, allowing users to easily track and manage issues originating from specific automated processes.
  • Orthogonal Labeling System: Ensured that the new source:* labels are orthogonal to existing issue type labels (e.g., quality-debt, bug), preserving current categorization while adding a new dimension for traceability.
Changelog
  • .agents/scripts/circuit-breaker-helper.sh
    • Ensured the source:circuit-breaker label is created in the repository.
    • Added the source:circuit-breaker label to issues created when the supervisor circuit breaker trips.
  • .agents/scripts/findings-to-tasks-helper.sh
    • Modified the label generation logic to include source:findings-to-tasks for new issues.
  • .agents/scripts/gh-failure-miner-helper.sh
    • Added a mechanism to create the source:ci-failure-miner label in relevant repositories before issue creation.
    • Included the source:ci-failure-miner label when creating bug issues for systemic CI failures.
  • .agents/scripts/milestone-validation-worker.sh
    • Ensured the source:mission-validation label is created in the repository.
    • Added the source:mission-validation label to bug issues generated from mission validation.
  • .agents/scripts/post-merge-review-scanner.sh
    • Ensured the source:review-scanner label is created in the repository.
    • Added the source:review-scanner label to issues created for unaddressed review bot feedback.
  • .agents/scripts/quality-feedback-helper.sh
    • Ensured the source:review-feedback label is created in the repository.
    • Modified issue creation to include the source:review-feedback label for quality-debt issues.
  • .agents/scripts/self-evolution-helper.sh
    • Added the source:self-evolution label to self-evolution tasks created by the helper script.
  • .agents/scripts/stats-functions.sh
    • Ensured the source:health-dashboard label is created and applied it to health dashboard issues.
    • Ensured the source:quality-sweep label is created and applied it to daily code quality review issues.
    • Ensured the source:quality-sweep label is created for simplification-debt issues.
    • Added the source:quality-sweep label to simplification-debt issues.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

These 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

Cohort / File(s) Summary
Issue source-tracking helpers
.agents/scripts/circuit-breaker-helper.sh, .agents/scripts/findings-to-tasks-helper.sh, .agents/scripts/gh-failure-miner-helper.sh, .agents/scripts/milestone-validation-worker.sh, .agents/scripts/post-merge-review-scanner.sh, .agents/scripts/quality-feedback-helper.sh, .agents/scripts/self-evolution-helper.sh
Each script adds creation and application of a source-specific label (source:circuit-breaker, source:findings-to-tasks, source:ci-failure-miner, source:mission-validation, source:review-scanner, source:review-feedback, source:self-evolution) to issues it generates, enabling provenance tracking across automated workflows.
Health and quality monitoring
.agents/scripts/stats-functions.sh
Introduces two new source labels (source:health-dashboard, source:quality-sweep) across health dashboard issue creation and quality sweep simplification workflows, applied to both newly created and matched health/quality issues for enhanced traceability.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🏷️ Eight helpers now wear source labels bright,
Tracing automation's path through the DevOps night,
Each issue marked from whence it came,
Our health and quality flourish all the same! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding source: labels to all auto-created issues for provenance tracking, which is precisely what all file modifications accomplish.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/source-labels-auto-issues
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 362 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Mar 15 20:31:24 UTC 2026: Code review monitoring started
Sun Mar 15 20:31:25 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 362

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 362
  • VULNERABILITIES: 0

Generated on: Sun Mar 15 20:31:27 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh and self-evolution-helper.sh) are missing the gh label create command, 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.sh regarding an unused variable.
  • There's some inconsistency in error handling for the gh label create commands 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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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 || true

You'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) || {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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 || true

You'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=""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The variable seen_repos is initialized but never used. It can be removed to improve code clarity.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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).

Suggested change
--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
  1. 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.
  2. 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.

@marcusquinn marcusquinn merged commit 81210aa into main Mar 15, 2026
25 of 26 checks passed
@marcusquinn marcusquinn deleted the feature/source-labels-auto-issues branch March 15, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant