[Diagnostic] suggest_labels returns empty array despite matching keywords #94

Closed
opened 2026-01-22 15:45:22 +00:00 by lmiranda · 0 comments
Owner

Diagnostic Report

Generated: 2026-01-22T00:00:00Z
Command Tested: /debug-report (general diagnostic)
Reporter: Claude Code via /debug-report

Project Context

Field Value
Repository personal-projects/personal-portfolio
Git Remote ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/personal-portfolio.git
Working Directory /home/lmiranda/Repositories/personal/personal-portfolio
Current Branch development

Diagnostic Results

Test 1: validate_repo_org

Call: validate_repo_org(repo="personal-projects/personal-portfolio")
Status: PASS
Response:

{"is_organization": true}

Test 2: get_labels

Call: get_labels(repo="personal-projects/personal-portfolio")
Status: PASS
Response:

{
  "organization": [],
  "repository": [18 labels including "Type: Bug", "Type: Feature", "Priority: High", etc.],
  "total_count": 18
}

Test 3: list_issues

Call: list_issues(repo="personal-projects/personal-portfolio", state="open")
Status: PASS
Response:

[]

Test 4: list_milestones

Call: list_milestones(repo="personal-projects/personal-portfolio")
Status: PASS
Response:

[]

Test 5: suggest_labels

Call: suggest_labels(context="Test bug fix for authentication")
Status: PASS (but unexpected result)
Response:

[]

Summary

  • Total Tests: 5
  • Passed: 5
  • Failed: 0

Observation

The suggest_labels tool returned an empty array for the context "Test bug fix for authentication", despite:

  1. The repository having a "Type: Bug" label
  2. The context containing the keywords "bug fix"

Error Category

  • Parameter Format
  • Authentication
  • Not Found
  • Network
  • Logic - Unexpected response (empty when labels should match)

Hypothesis

The suggest_labels function may:

  1. Not be using keyword matching against the context string
  2. Not have access to the repository's label taxonomy (no repo parameter was passed)
  3. Require a different context format or structure
  4. Have hardcoded patterns that don't match common terms like "bug fix"

Suggested Investigation

  1. Check suggest_labels implementation in the Gitea MCP server code
  2. Verify if it requires a repo parameter to fetch available labels
  3. Review the matching logic for keywords → label suggestions
  4. Consider adding pattern matching for common terms: "bug", "fix", "feature", "refactor", etc.

Reproduction Steps

  1. Navigate to any project with projman configured
  2. Run /debug-report or call suggest_labels(context="Test bug fix for authentication")
  3. Observe empty array returned despite "bug fix" keywords

Generated by /debug-report - Labels: Type: Bug, Source: Diagnostic, Agent: Claude

## Diagnostic Report **Generated**: 2026-01-22T00:00:00Z **Command Tested**: /debug-report (general diagnostic) **Reporter**: Claude Code via /debug-report ## Project Context | Field | Value | |-------|-------| | Repository | `personal-projects/personal-portfolio` | | Git Remote | `ssh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/personal-portfolio.git` | | Working Directory | `/home/lmiranda/Repositories/personal/personal-portfolio` | | Current Branch | `development` | ## Diagnostic Results ### Test 1: validate_repo_org **Call**: `validate_repo_org(repo="personal-projects/personal-portfolio")` **Status**: PASS **Response**: ```json {"is_organization": true} ``` ### Test 2: get_labels **Call**: `get_labels(repo="personal-projects/personal-portfolio")` **Status**: PASS **Response**: ```json { "organization": [], "repository": [18 labels including "Type: Bug", "Type: Feature", "Priority: High", etc.], "total_count": 18 } ``` ### Test 3: list_issues **Call**: `list_issues(repo="personal-projects/personal-portfolio", state="open")` **Status**: PASS **Response**: ```json [] ``` ### Test 4: list_milestones **Call**: `list_milestones(repo="personal-projects/personal-portfolio")` **Status**: PASS **Response**: ```json [] ``` ### Test 5: suggest_labels **Call**: `suggest_labels(context="Test bug fix for authentication")` **Status**: PASS (but unexpected result) **Response**: ```json [] ``` ## Summary - **Total Tests**: 5 - **Passed**: 5 - **Failed**: 0 ### Observation The `suggest_labels` tool returned an empty array for the context "Test bug fix for authentication", despite: 1. The repository having a "Type: Bug" label 2. The context containing the keywords "bug fix" ### Error Category - [ ] Parameter Format - [ ] Authentication - [ ] Not Found - [ ] Network - [x] Logic - Unexpected response (empty when labels should match) ### Hypothesis The `suggest_labels` function may: 1. Not be using keyword matching against the context string 2. Not have access to the repository's label taxonomy (no `repo` parameter was passed) 3. Require a different context format or structure 4. Have hardcoded patterns that don't match common terms like "bug fix" ### Suggested Investigation 1. Check `suggest_labels` implementation in the Gitea MCP server code 2. Verify if it requires a `repo` parameter to fetch available labels 3. Review the matching logic for keywords → label suggestions 4. Consider adding pattern matching for common terms: "bug", "fix", "feature", "refactor", etc. ### Reproduction Steps 1. Navigate to any project with projman configured 2. Run `/debug-report` or call `suggest_labels(context="Test bug fix for authentication")` 3. Observe empty array returned despite "bug fix" keywords --- *Generated by /debug-report - Labels: Type: Bug, Source: Diagnostic, Agent: Claude*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#94