Skip to content

fix: exclude the ticket itself from AI suggestion matches - #67

Draft
sonnymay wants to merge 1 commit into
mainfrom
claude/vibrant-meitner-tzfyyj
Draft

sonnymay wants to merge 1 commit into
mainfrom
claude/vibrant-meitner-tzfyyj

Conversation

@sonnymay

@sonnymay sonnymay commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

ai.suggest_for_ticket compared the target ticket against the 30 most recent Resolved/Closed tickets. If the target was itself Resolved or Closed, it was in that set, so /ai/suggest could recommend the ticket as a "similar past ticket" to itself. The ticket is now filtered out of the comparison set.

Distinct from the open ai.py escaping PRs (#20–#42) and #59 (batching notes in _fetch_recent_resolved); this change only touches suggest_for_ticket.

Testing

  • Added backend/test_ai_suggest.py (ticket excluded from history; self-only history returns the "no resolved tickets" note without calling the model).
  • pytest: 45 passed (with SUPABASE_URL/SUPABASE_KEY set); ruff check and ruff format --check clean.

Generated by Claude Code

A Resolved/Closed ticket was included in its own comparison set, so
/ai/suggest could offer it as a 'similar past ticket' to itself.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0171zWziv1yV4nqFKxwETEZE
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
supportops Ready Ready Preview Nov 5, 2026 3:08pm UTC

This branch was successfully deployed

1 active deployment
Preview — cff49172 Deployed Nov 5, 2026 by vercel[bot]
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