Skip to content

fix(manage_conversation_labels): log silent no-op on add - #71

Open
mateusbellozupko wants to merge 1 commit into
evolution-foundation:mainfrom
mateusbellozupko:fix/log-silent-noop-add-label
Open

mateusbellozupko wants to merge 1 commit into
evolution-foundation:mainfrom
mateusbellozupko:fix/log-silent-noop-add-label

Conversation

@mateusbellozupko

@mateusbellozupko mateusbellozupko commented Sep 22, 2026 •

Copy link
Copy Markdown

Summary

  • manage_conversation_labels's add action returns success silently (no logger call) when every requested label was already present on the conversation — unlike the success-with-new-labels path and the exception path, both of which log.
  • This makes it impossible to tell from application logs whether an add call actually changed anything, which matters when diagnosing an agent turn that issues several add calls in a row without visible progress in the label list.
  • Added a logger.info call in that branch with the requested labels and the current label list, matching the logging style already used elsewhere in this file.

Test plan

  • python3 -m py_compile on the modified file
  • No existing unit tests cover this module; manual review of the added log line for correctness

🤖 Generated with Claude Code

Summary by Sourcery

Bug Fixes:

  • Log successful no-op label additions when all requested labels are already present, making these outcomes visible in application logs.

When every requested label is already present on the conversation, the
add branch returned success with no logger call at all, unlike the
success-with-new-labels path (which logs) and the exception path (which
also logs). This makes it impossible to tell from application logs
whether an add call actually changed anything or silently no-op'd,
which matters when diagnosing why a multi-step agent turn made several
add calls in a row without visible progress.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The PR makes silent no-op add operations observable by logging the requested and current labels before returning the existing success response when all requested labels are already present.

Flow diagram for no-op conversation label addition logging

flowchart TD
    A[manage_conversation_labels add] --> B[Read current conversation labels]
    B --> C{Any new labels?}
    C -->|No| D[logger.info]
    D --> E[Return success: nothing to update]
    C -->|Yes| F[Continue existing label update flow]
Loading

File-Level Changes

Change Details Files
Add informational logging for successful no-op label additions.
  • Log the conversation ID, requested labels, and labels already present when no new labels are added.
  • Preserve the existing success response and no-op behavior.
src/services/adk/tools/evo_crm/manage_conversation_labels.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

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