[Bug] Projman diagnostic failure: MCP tools require explicit repo parameter #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
During
/projman:labels-syncexecution on thepersonal-projects/personal-portfoliorepository, several issues were encountered with the MCP Gitea tools.Failed Tests / Error Messages
1. Missing Default Repository Configuration
Error:
Context: Called
validate_repo_organdget_labelswithout explicitrepoparameter.Expected: Tools should use a default repository from project context (e.g., from
.claude/config or working directory git remote).Actual: Tools fail immediately without explicit
repoparameter on every call.2. Empty Organization Labels Array
Response:
Context: Repository
personal-projects/personal-portfoliobelongs to orgpersonal-projects.Uncertainty: Unable to determine if:
Suggested Fix: Add diagnostic output or verification step to confirm org label fetch succeeded vs returned empty.
3. Label Naming Convention Mismatch
Documentation states: Labels use slash format (
Type/Bug,Priority/High)Actual Gitea labels: Colon-space format (
Type: Bug,Priority: High)Impact: The
suggest_labelstool may return suggestions in wrong format, or documentation is outdated.Repository Context
personal-projects/personal-portfoliogitea.hotserv.cloud/projman:labels-syncvalidate_repo_org,get_labelsReproduction Steps
/projman:labels-syncSuggested Fixes
.claude/project configLabels:
Type: Bug,Source: InternalInvestigation Results
Sub-issue 1: Missing repo parameter ✅ ALREADY FIXED
Fixed in PRs #70, #71, #72. The
_find_project_directory()and_detect_repo_from_git()methods now handle repo auto-detection from git remote.Sub-issue 2: Empty organization labels ✅ EXPECTED BEHAVIOR
The
personal-projectsorganization simply has no org-level labels defined in Gitea. This is not a bug - the labels exist only at the repository level in this case.Sub-issue 3: Label format mismatch 🔧 NEEDS FIX
Confirmed issue. The
suggest_labelsfunction hardcodes slash format while the repository uses colon-space format:Type/BugType: BugPriority/HighPriority: HighComplexity/MediumComplexity: MediumEfforts/MEffort: M(singular)Root cause:
labels.py:suggest_labels()hardcodes label names without checking actual labels in the repository.Fix approach: Modify
suggest_labelsto:Working on the fix now.
Resolution
All three sub-issues have been addressed:
Fix Details (Sub-issue 3)
The
suggest_labelsfunction now dynamically detects the label naming convention:PRs:
This issue can be closed once PR #76 is merged.