Add automated triage bot for metadata-only issues - #422
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #422 +/- ##
==========================================
- Coverage 87.42% 87.27% -0.15%
==========================================
Files 41 41
Lines 3856 3828 -28
Branches 990 978 -12
==========================================
- Hits 3371 3341 -30
Misses 283 283
- Partials 202 204 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
Author
|
Pushed a follow-up commit per feedback:
Generated by Claude Code |
twcclegg
pushed a commit
that referenced
this pull request
Aug 26, 2026
Every issue from #1 through #422 is now either a PR, a listed metadata issue, or implicitly a non-metadata issue by not appearing in the list - there's no separate "not metadata" file anymore. Went back through the full closed-issue history (including several titles that didn't obviously scream "metadata" but turned out to be, like #14, #25, #109, #149, #165, #181, and #91) to make the positive list genuinely exhaustive rather than a curated sample, taking it from 30 to 39 entries. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVGRJyQwtvBGXAmWswxyqW
Owner
Author
|
Pushed another update per feedback:
Generated by Claude Code |
A large fraction of issues filed here are reports about upstream Google libphonenumber metadata (unrecognized prefixes, outdated numbering plans) rather than bugs in this C# port's code, and maintainers have been closing these by hand with a pointer to google/libphonenumber for years. Add a GitHub Actions workflow that runs the GitHub Copilot CLI against each new issue to classify it, and when confident it's a metadata report, labels it, posts a canned comment redirecting to upstream, and closes it - noting the closure was automatic and inviting a reopen if it's a false positive. The classifier is grounded in .github/triage/metadata_examples.md, an exhaustive, human-verified list of every metadata issue in this repo's history (#1 through #422): every issue in that range is either a PR, a listed metadata issue, or - by not appearing in the list - implicitly a non-metadata issue, with no separate negative list needed. Every time the workflow closes a new issue as a metadata issue, it opens a PR appending it to that file, so the classifier's grounding keeps growing from real, maintainer-confirmed outcomes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVGRJyQwtvBGXAmWswxyqW
twcclegg
force-pushed
the
claude/metadata-issue-bot-1bkszq
branch
from
August 26, 2026 13:48
b090034 to
e57f156
Compare
The exhaustivity/absence-is-negative-signal details already live in metadata_examples.md and system_prompt.md themselves; the README only needs to say what the workflow does and where it learns from. Dropped the maintainer-skip and confidence-gating asides too - implementation detail an average reader doesn't need to know.
…lure
- Pin @github/copilot to 1.0.80 instead of always installing latest,
matching every other dependency in this workflow (SHA/version pinned).
- Replace getLabel+createLabel with a direct createLabel that ignores a
422 (label already exists) - the previous getLabel catch-all meant a
transient getLabel error (rate limit, 5xx) would fall through to
createLabel and throw an uncaught 422, aborting labeling/commenting/
closing entirely.
- Extract the classifier's JSON verdict by taking the last line that looks
like a complete JSON object, instead of a greedy regex spanning from the
first '{' to the last '}' in the whole response - the greedy version
would swallow a legitimate verdict if the model ever emits a stray brace
in preamble text before it.
- Surface a failed examples-list PR in the job summary, not just a log
warning, so a silently-broken growth mechanism doesn't go unnoticed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WVGRJyQwtvBGXAmWswxyqW
This was referenced Aug 28, 2026
Closed
Open
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
.github/workflows/triage_metadata_issues.yml, which runs on every newly opened issue and uses the GitHub Copilot CLI (actions/ai-inferencewith thecopilotprovider) to classify whether it's actually a report about upstream Google libphonenumber metadata — an unrecognized prefix, an outdated numbering plan, a new country code — rather than a bug in this port's C# code.metadata(creating the label if needed), posts a canned comment explaining why and linking to the upstream repo + thebug_report.mdchecklist, and closes the issue (state_reason: not_planned). The comment explicitly says the flag was automatic and to reopen if it's a false positive.OWNER/MEMBER/COLLABORATOR), and fails open: if the CLI errors or its response can't be parsed, or the confidence comes backlow, the issue is left untouched for a human.Setup required after merge
This uses the modern (PAT-free) way of running Copilot CLI in Actions:
permissions: copilot-requests: writeplus the built-inGITHUB_TOKEN. That requires GitHub Copilot CLI usage to be enabled for thetwccleggaccount (the "Allow use of Copilot CLI" policy) — see https://docs.github.com/en/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions. No repository secret needs to be created.Test plan
github-scriptblocks are syntactically valid JavaScript.actions/ai-inferencepinned SHA corresponds to itsv3tag (the current Copilot-CLI-only major version —v1/v2default to the now-retired GitHub Models API and would not work).issues: openedtrigger from a PR — once merged, open a throwaway test issue that mirrors e.g. SA mobile numbers starting with 579 are rejected by IsValidNumber (IsPossibleNumber=true) #313 ("SA mobile numbers rejected") to confirm it gets classified, labeled, commented, and closed automatically, and a normal bug/question issue to confirm it's left alone.Generated by Claude Code