Fix: don't verify a candidate with no release tag - #46
Merged
Conversation
Now that Copilot parsing actually works (COPILOT_PAT fixed), a real
comment exposed this: LionSR posted a bare repo link with a typo
("tps://" missing "ht"), Copilot correctly understood the intent and
extracted the repo but with no tag (none was given). candidates_from_parsed
appended it anyway, sending an empty-tag request straight to the releases
API:
GET https://api.github.com/repos/lccqqqqq/sae-feature-nonlocality/releases/tags/
which 404s, and the bot dumped that raw error on the commenter instead of
asking for the release link. candidates_from_comment already guarded
against this (skips matches with no tag); candidates_from_parsed didn't.
Added the same guard, so an untagged repo mention now falls through to
the existing "please include a release tag" reply.
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
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.
Why
Now that Copilot parsing actually works (
COPILOT_PATfixed in #45), a real comment on Discussion #36 exposed this: a bare repo link with no release tag was correctly understood by Copilot (it extracted the repo despite a typo'd URL), butcandidates_from_parsedaccepted the candidate anyway with an empty tag. That empty tag flowed straight into the verify step, sending a malformed request to the releases API:which 404s, and the bot dumped that raw HTTP error on the commenter instead of asking for the release link.
candidates_from_comment(the URL-only fallback) already guarded against this by requiring a non-empty tag;candidates_from_parsed(the Copilot-derived path) didn't have the same guard.Fix
scripts/app_discussion_bot.py: skip a parsed candidate when it resolves to an empty tag, mirroring the existing guard incandidates_from_comment. An untagged repo mention now falls through to the existing "please include a release tag" reply instead of a raw API error.Test plan
candidates_from_parsed({"candidates": [{"repo_url": "...", "tag": ""}]})returns[]workflow_dispatch(dry run) with the exact comment that triggered the bug on Discussion 📚 Published APP papers #36 — bot now replies: "Thanks! To verify this as an APP publication, please share the specific tagged Release URL (with the APP_PUBLICATION.json asset) rather than just the repo link." instead of dumping the raw 404.Generated by Claude Code