Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

@whitdog47 whitdog47 commented Jun 25, 2025

This PR updates the tag recommendation flow to disallow recommendations for restricted incidents. Key changes include:

  • Raising a ValueError when the incident is not found.
  • Returning an error message when the incident is restricted.

@whitdog47 whitdog47 requested a review from Copilot June 25, 2025 03:31
@whitdog47 whitdog47 self-assigned this Jun 25, 2025
@whitdog47 whitdog47 added the bug Something isn't working label Jun 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the tag recommendation flow to disallow recommendations for restricted incidents. Key changes include:

  • Raising a ValueError when the incident is not found.
  • Returning an empty recommendation list with an error message when the incident is restricted.
Comments suppressed due to low confidence (1)

src/dispatch/ai/service.py:448

  • [nitpick] The current error handling uses an exception for a missing incident and a response with an error message for a restricted incident. For consistency, consider aligning these approaches by either returning an error message in both cases or raising exceptions in both scenarios.
            return TagRecommendationResponse(recommendations=[], error_message=message)

@whitdog47 whitdog47 merged commit 261f3d1 into main Jun 25, 2025
11 checks passed
@whitdog47 whitdog47 deleted the fix/disallow-tag-suggestions-for-restricted-incidents branch June 25, 2025 03:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants