Auto-create missing labels in file-issues - #26
Conversation
Adds _ensure_labels() that checks the target repo for required labels and creates any that are missing. Fixes #25. Also adds verification commands and reasons database usage guide to CLAUDE.md template. Co-Authored-By: Claude <noreply@anthropic.com>
…plate Co-Authored-By: Claude <noreply@anthropic.com>
Code Review ReportBranch: #26 claude [CONCERN]ftl_code_expert/cli.py:_ensure_labelsVerdict: CONCERN Two issues:
Neither issue causes data loss or crashes — label creation is idempotent (fails silently for duplicates) — so this is a CONCERN, not a BLOCK. ftl_code_expert/cli.py:file_issues (integration point)Verdict: PASS The integration at lines 3527-3529 is correctly placed: after dedup and confirmation, before filing. The guard conditions ( Self-ReviewLimitations: No test files exist for cli.py (confirmed by observations), so I cannot verify whether any test infrastructure exists that should have been extended. Could not verify the exact output format of Feature Requests
gemini [CONCERN]ftl_code_expert/cli.py:_ensure_labelsVerdict: CONCERN The GitHub implementation ( ftl_code_expert/cli.py:file_issuesVerdict: PASS The label check and creation integration is correctly positioned after verifying remaining candidates and before executing the main loop. It correctly guards label auto-creation to only execute when Self-ReviewLimitations: - Did not have a local environment with
Feature Requests
|
- GitHub: add -L 1000 to gh label list to handle repos with many labels - GitLab: use -F json output format and parse JSON instead of table output Co-Authored-By: Claude <noreply@anthropic.com>
Code Review ReportBranch: #26 claude [CONCERN]ftl_code_expert/cli.py:_ensure_labelsVerdict: CONCERN
ftl_code_expert/cli.py:file_issues (label integration at line 3536-3538)Verdict: PASS The integration point is correctly placed — after dedup and confirmation, before filing. The guard Self-ReviewLimitations: - Could not verify the exact
Feature Requests
gemini [CONCERN]ftl_code_expert/cli.py:_ensure_labelsVerdict: CONCERN
Self-ReviewLimitations: - Did not have access to live GitHub/GitLab CLI credentials or binary environments to execute the exact commands and verify their behavior against different API responses.
|
- Guard GitLab JSON parsing against non-array/non-dict responses - Use --name flag for glab label create (positional args not supported) - Log errors when label creation fails on either platform Co-Authored-By: Claude <noreply@anthropic.com>
Code Review ReportBranch: #26 DisagreementsThe following changes have different verdicts across models:
claude [CONCERN]ftl_code_expert/cli.py:_ensure_labelsVerdict: CONCERN Logic is sound for both GitHub and GitLab paths. GitHub uses ftl_code_expert/cli.py:file_issues (integration of _ensure_labels)Verdict: PASS The call site at line 3543-3545 is correctly placed — after dedup and LLM confirmation but before issue filing. The Self-ReviewLimitations: Could not verify Feature Requests
gemini [PASS]ftl_code_expert/cli.py:_ensure_labelsVerdict: PASS The ftl_code_expert/cli.py:file_issuesVerdict: PASS Integrating Self-ReviewLimitations: - Could not list the directory structure or locate unit test files because shell command execution was restricted by security policy.
|
Summary
file-issuesnow auto-creates missing labels (reasons-gate,reasons-negative, and any--labelvalues) on the target repo before filing issues. Fixes file-issues: auto-create missing labels instead of failing #25.verify,infer-sources) and a "Using the Reasons Database" guide to the CLAUDE.md templateTest plan
code-expert file-issues --dry-run— should not attempt label creationcode-expert file-issuesagainst a repo withoutreasons-gate/reasons-negativelabels — should create them automatically and file issues successfullycode-expert file-issues --label custom-label— should also createcustom-labelif missingcode-expert initproduces a CLAUDE.md with the new reasons database section🤖 Generated with Claude Code