WHOOSH-LABELS-004: Standardize Automatic Label Creation to Match Ecosystem Convention #4

Closed
opened 2025-09-21 06:56:13 +00:00 by tony · 1 comment
Owner

Problem

WHOOSH automatically creates labels when repositories are added, but the current label set does not match the standardized label convention used across the CHORUS ecosystem (WHOOSH, CHORUS, KACHING repositories).

Current vs Required Label Sets

Currently Auto-Created Labels

Location: internal/gitea/client.go:432-489

  1. bzzz-task (#ff6b6b) - Issues for CHORUS task conversion
  2. whoosh-monitored (#4ecdc4) - Repository monitoring indicator
  3. priority-high (#e74c3c) - High priority tasks
  4. priority-medium (#f39c12) - Medium priority tasks
  5. priority-low (#95a5a6) - Low priority tasks

Required Standardized Labels

Source: WHOOSH repository standard label set

  1. bug (#ee0701) - Something is not working
  2. bzzz-task (#5319e7) - CHORUS task for auto ingestion (color correction)
  3. duplicate (#cccccc) - This issue or pull request already exists
  4. enhancement (#84b6eb) - New feature
  5. help wanted (#128a0c) - Need some help
  6. invalid (#e6e6e6) - Something is wrong
  7. question (#cc317c) - More information is needed
  8. wontfix (#ffffff) - This won't be fixed

Technical Requirements

1. Update Label Creation Function

File: internal/gitea/client.go
Function: EnsureRequiredLabels() (lines 432-489)

Changes Required:

  • Replace current requiredLabels array with standardized ecosystem labels
  • Fix bzzz-task color from #ff6b6b to #5319e7
  • Remove priority labels (can be added as separate enhancement)
  • Remove whoosh-monitored (redundant with monitoring system)

2. Maintain Backward Compatibility

  • Ensure existing repositories with old labels continue to work
  • No breaking changes to filtering or issue detection logic
  • Document label migration strategy if needed

3. Integration Points

Automatic Execution: Repository creation via POST /api/v1/repositories
Manual Sync: POST /api/v1/repositories/{id}/ensure-labels

Implementation Details

Updated Label Array

requiredLabels := []CreateLabelRequest{
    {
        Name:        "bug",
        Color:       "ee0701",
        Description: "Something is not working",
    },
    {
        Name:        "bzzz-task",
        Color:       "5319e7", // Corrected color
        Description: "CHORUS task for auto ingestion.",
    },
    {
        Name:        "duplicate",
        Color:       "cccccc",
        Description: "This issue or pull request already exists",
    },
    {
        Name:        "enhancement",
        Color:       "84b6eb",
        Description: "New feature",
    },
    {
        Name:        "help wanted",
        Color:       "128a0c",
        Description: "Need some help",
    },
    {
        Name:        "invalid",
        Color:       "e6e6e6",
        Description: "Something is wrong",
    },
    {
        Name:        "question",
        Color:       "cc317c",
        Description: "More information is needed",
    },
    {
        Name:        "wontfix",
        Color:       "ffffff",
        Description: "This won't be fixed",
    },
}

Benefits

  1. Ecosystem Consistency: All CHORUS repos have identical label sets
  2. Developer Experience: Familiar GitHub-standard labels
  3. Tool Integration: Better compatibility with external tools
  4. Issue Management: Standardized categorization across projects

Priority

Medium - Improves ecosystem consistency and developer experience

Requirement Traceability

@goal: WHOOSH-LABELS-004, WSH-CONSISTENCY - Ecosystem standardization

Dependencies

  • No breaking dependencies
  • Should coordinate with any label-based filtering logic
  • Consider impact on existing monitored repositories

Testing Requirements

Unit Tests

  • Verify all 8 labels are created correctly
  • Confirm colors and descriptions match specification
  • Test error handling for label creation failures

Integration Tests

  • Test automatic label creation on repository addition
  • Verify manual label sync endpoint works
  • Confirm existing repository functionality unaffected

Acceptance Criteria

  • EnsureRequiredLabels() creates all 8 standardized labels
  • bzzz-task label uses correct color (#5319e7)
  • All label colors and descriptions match WHOOSH repository standards
  • Automatic creation works on repository addition
  • Manual sync endpoint functions correctly
  • No breaking changes to existing functionality
  • Unit tests cover new label set
  • Integration tests verify end-to-end functionality
  • Inline comments include @goal: traceability tags

Future Enhancements

  • Add priority labels as optional/configurable feature
  • Implement label migration tool for existing repositories
  • Add validation to ensure labels remain consistent over time
## Problem WHOOSH automatically creates labels when repositories are added, but the current label set does not match the standardized label convention used across the CHORUS ecosystem (WHOOSH, CHORUS, KACHING repositories). ## Current vs Required Label Sets ### Currently Auto-Created Labels **Location**: `internal/gitea/client.go:432-489` 1. `bzzz-task` (#ff6b6b) - Issues for CHORUS task conversion 2. `whoosh-monitored` (#4ecdc4) - Repository monitoring indicator 3. `priority-high` (#e74c3c) - High priority tasks 4. `priority-medium` (#f39c12) - Medium priority tasks 5. `priority-low` (#95a5a6) - Low priority tasks ### Required Standardized Labels **Source**: WHOOSH repository standard label set 1. `bug` (#ee0701) - Something is not working 2. `bzzz-task` (#5319e7) - CHORUS task for auto ingestion *(color correction)* 3. `duplicate` (#cccccc) - This issue or pull request already exists 4. `enhancement` (#84b6eb) - New feature 5. `help wanted` (#128a0c) - Need some help 6. `invalid` (#e6e6e6) - Something is wrong 7. `question` (#cc317c) - More information is needed 8. `wontfix` (#ffffff) - This won't be fixed ## Technical Requirements ### 1. Update Label Creation Function **File**: `internal/gitea/client.go` **Function**: `EnsureRequiredLabels()` (lines 432-489) **Changes Required**: - Replace current `requiredLabels` array with standardized ecosystem labels - Fix `bzzz-task` color from `#ff6b6b` to `#5319e7` - Remove priority labels (can be added as separate enhancement) - Remove `whoosh-monitored` (redundant with monitoring system) ### 2. Maintain Backward Compatibility - Ensure existing repositories with old labels continue to work - No breaking changes to filtering or issue detection logic - Document label migration strategy if needed ### 3. Integration Points **Automatic Execution**: Repository creation via `POST /api/v1/repositories` **Manual Sync**: `POST /api/v1/repositories/{id}/ensure-labels` ## Implementation Details ### Updated Label Array ```go requiredLabels := []CreateLabelRequest{ { Name: "bug", Color: "ee0701", Description: "Something is not working", }, { Name: "bzzz-task", Color: "5319e7", // Corrected color Description: "CHORUS task for auto ingestion.", }, { Name: "duplicate", Color: "cccccc", Description: "This issue or pull request already exists", }, { Name: "enhancement", Color: "84b6eb", Description: "New feature", }, { Name: "help wanted", Color: "128a0c", Description: "Need some help", }, { Name: "invalid", Color: "e6e6e6", Description: "Something is wrong", }, { Name: "question", Color: "cc317c", Description: "More information is needed", }, { Name: "wontfix", Color: "ffffff", Description: "This won't be fixed", }, } ``` ## Benefits 1. **Ecosystem Consistency**: All CHORUS repos have identical label sets 2. **Developer Experience**: Familiar GitHub-standard labels 3. **Tool Integration**: Better compatibility with external tools 4. **Issue Management**: Standardized categorization across projects ## Priority **Medium** - Improves ecosystem consistency and developer experience ## Requirement Traceability @goal: WHOOSH-LABELS-004, WSH-CONSISTENCY - Ecosystem standardization ## Dependencies - No breaking dependencies - Should coordinate with any label-based filtering logic - Consider impact on existing monitored repositories ## Testing Requirements ### Unit Tests - Verify all 8 labels are created correctly - Confirm colors and descriptions match specification - Test error handling for label creation failures ### Integration Tests - Test automatic label creation on repository addition - Verify manual label sync endpoint works - Confirm existing repository functionality unaffected ## Acceptance Criteria - [ ] `EnsureRequiredLabels()` creates all 8 standardized labels - [ ] `bzzz-task` label uses correct color (#5319e7) - [ ] All label colors and descriptions match WHOOSH repository standards - [ ] Automatic creation works on repository addition - [ ] Manual sync endpoint functions correctly - [ ] No breaking changes to existing functionality - [ ] Unit tests cover new label set - [ ] Integration tests verify end-to-end functionality - [ ] Inline comments include @goal: traceability tags ## Future Enhancements - Add priority labels as optional/configurable feature - Implement label migration tool for existing repositories - Add validation to ensure labels remain consistent over time
Author
Owner

Assigned to: Claude AI Assistant

Status: Implementation already complete, proceeding to testing

Plan:

  1. Test automatic label creation functionality
  2. Verify all 8 standardized labels are created correctly
  3. Test manual sync endpoint
  4. Confirm no breaking changes
  5. Create pull request

Implementation Status: Code changes already completed

  • Updated EnsureRequiredLabels() in internal/gitea/client.go
  • Added requirement traceability comments
  • Decision record created

ETA: Testing and PR creation

**Assigned to**: Claude AI Assistant **Status**: Implementation already complete, proceeding to testing **Plan**: 1. Test automatic label creation functionality 2. Verify all 8 standardized labels are created correctly 3. Test manual sync endpoint 4. Confirm no breaking changes 5. Create pull request **Implementation Status**: ✅ Code changes already completed - Updated `EnsureRequiredLabels()` in `internal/gitea/client.go` - Added requirement traceability comments - Decision record created **ETA**: Testing and PR creation
tony closed this issue 2025-09-21 07:39:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tony/WHOOSH#4
No description provided.