Skip to content

Fix: don't verify a candidate with no release tag - #46

Merged
LionSR merged 1 commit into
mainfrom
claude/discussion-bot-failures-axndxl
Aug 14, 2026
Merged

Fix: don't verify a candidate with no release tag#46
LionSR merged 1 commit into
mainfrom
claude/discussion-bot-failures-axndxl

Conversation

@LionSR

@LionSR LionSR commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Why

Now that Copilot parsing actually works (COPILOT_PAT fixed 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), but candidates_from_parsed accepted the candidate anyway with an empty tag. That empty tag flowed straight into the verify step, sending a malformed request to the releases API:

GET https://api.github.com/repos/<owner>/<repo>/releases/tags/

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 in candidates_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

  • Verified locally: candidates_from_parsed({"candidates": [{"repo_url": "...", "tag": ""}]}) returns []
  • Verified locally: candidates with a real tag are unaffected
  • Live-tested via 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

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.
@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot 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.

@LionSR
LionSR merged commit e3e1901 into main Aug 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants