Skip to content

feat(labels): estate label tooling + auto-triage for new issues - #82

Open
hyperpolymath wants to merge 1 commit into
mainfrom
automated/label-tooling
Open

feat(labels): estate label tooling + auto-triage for new issues#82
hyperpolymath wants to merge 1 commit into
mainfrom
automated/label-tooling

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Ships the canonical label set and the classifier that labels newly-filed issues.

Additive only — never removes a label, never overrides a human's classification, silent when unsure, never fails an issue.

Also adds this repo's two new workflows to .github/workflows/actions.lock as []. That lock is keyed by workflow path and refuses any workflow it does not list — a startup_failure, which produces no check run and is therefore silent. gh actions-lock cannot add these: it records action versions, and both workflows deliberately use none.

See docs/LABELS.adoc in hyperpolymath/.git-private-farm.

🤖 Generated with Claude Code

Ships the canonical label set and the classifier that labels newly-filed
issues. Additive only: it never removes a label, never overrides a human's
classification, stays silent when unsure, and never fails an issue.

Also adds this repo's two new workflows to .github/workflows/actions.lock as
'[]'. That lock is keyed by workflow path and refuses any workflow it does not
list -- a startup_failure, which produces no check run and is therefore silent.
`gh actions-lock` cannot add these: it records action versions, and both
workflows deliberately use no actions.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 7 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: acfeeb7b-689e-4895-93f6-bd7f832a2943

📥 Commits

Reviewing files that changed from the base of the PR and between 368e7cd and 868bfe8.

⛔ Files ignored due to path filters (1)
  • .github/workflows/actions.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/label-classifier.json
  • .github/labels.json
  • .github/scripts/classify-issue.jq
  • .github/workflows/label-triage.yml
  • .github/workflows/labels.yml

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.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@gitar-bot

gitar-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The PR successfully implements a canonical label set and automated triage system using JQ, meeting the requirement for a Python-free estate-wide solution. Codacy analysis indicates the code is 'Up to Standards'; however, several technical risks must be addressed before merging.

Crucially, the label synchronization logic in labels.yml is fragile due to TSV parsing and case-sensitive comparisons, which will lead to duplicate labels or failed updates. Additionally, the label application step in the triage workflow is vulnerable to shell word splitting, which will cause failures if label names contain spaces. The sophisticated regex logic in the classifier currently lacks unit tests, representing a high maintenance risk. Lastly, the PR mentions updating actions.lock, but this file was not found in the submitted changes.

About this PR

  • The kwrx regex engine is central to the classification consistency. Given the complexity of the suffix handling and word boundary logic, this should be accompanied by a suite of test cases to ensure no regressions occur as the taxonomy expands.
  • The PR description mentions updating .github/workflows/actions.lock, but this file is missing from the pull request. Please ensure all lock files are included to prevent drift.

Test suggestions

  • Verify 'feat:' and 'fix:' prefixes correctly map to 'enhancement' and 'bug' types
  • Verify bracketed tags like '[docs]' or '[security]' are correctly extracted and mapped to labels
  • Verify keyword mapping for specific areas (e.g., 'workflow' or 'actions.lock' mapping to 'cicd')
  • Verify that human-applied labels in a tier (e.g., 'type') block the bot from adding another label of that same tier
  • Verify the label sync workflow creates missing labels while ignoring updates to 'frozen' labels' definitions
  • Automatable test for kwrx function logic in classify-issue.jq against common stems (e.g., 'test', 'testing') and 'testing')
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify 'feat:' and 'fix:' prefixes correctly map to 'enhancement' and 'bug' types
2. Verify bracketed tags like '[docs]' or '[security]' are correctly extracted and mapped to labels
3. Verify keyword mapping for specific areas (e.g., 'workflow' or 'actions.lock' mapping to 'cicd')
4. Verify that human-applied labels in a tier (e.g., 'type') block the bot from adding another label of that same tier
5. Verify the label sync workflow creates missing labels while ignoring updates to 'frozen' labels' definitions
6. Automatable test for `kwrx` function logic in `classify-issue.jq` against common stems (e.g., 'test', 'testing') and 'testing')

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

# (`port` + `ion` = "portion", and `port` is a live keyword). They are enabled
# only for shapes that are unambiguously truncated stems -- `-at`
# (instantiat, investigat, adjudicat) and `-ment` (document, implement).
def kwrx($kw):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

The regex generation logic in kwrx is highly specialized to handle the observed false-positive/miss distribution. Because this logic is implemented in JQ without direct unit tests in the PR, it represents a maintenance risk if the keyword taxonomy expands. Consider generating a set of test cases in a temporary JQ script that validates the kwrx function against common stems and inflections.


printf 'applying: %s\n' "${apply[*]}"
gh issue edit "$NUM" -R "$GITHUB_REPOSITORY" \
$(printf -- '--add-label %q ' "${apply[@]}") \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

This command expansion will break if label names contain spaces (e.g., 'good first issue') because word splitting occurs after the printf result is substituted. Use a loop to populate an array of arguments or use xargs to ensure arguments are passed correctly to the gh command.

Comment on lines +54 to +60
while IFS=$'\t' read -r name color desc; do
[ -z "$name" ] && continue
frozen=0
for f in "${FROZEN[@]}"; do [ "$f" = "$name" ] && frozen=1 && break; done

cur=$(printf '%s\n' "$existing" | awk -F'\t' -v n="$name" '$1==n{print;exit}')
if [ -z "$cur" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

The label synchronization logic is fragile and incomplete. Using TSV and awk for comparisons can break if label descriptions contain tab characters and currently performs case-sensitive matches, which conflicts with GitHub's case-insensitive label names. Refactor this block to use jq for comparison directly on the JSON objects; this will provide robustness against special characters and allow for a tolower comparison to correctly handle case-insensitive drift.

&& updated=$((updated+1))
fi
fi
sleep 0.4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚪ LOW RISK

Nitpick: The rate-limiting sleep is applied to every iteration regardless of whether a change occurred. Moving it inside the if blocks for label creation or updates would significantly speed up the workflow execution when only a few labels need syncing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant