Skip to content

bug: Subscription assignment missing injection_result and auto-assign not working #340

Closed

Description

@vybe

Summary

Two issues with subscription assignment:

  1. Response is missing injection_result field
  2. Round-robin auto-assign is not setting agent auth_mode to subscription

Reproduction

pytest tests/test_subscriptions.py::TestCredentialInjection::test_injection_on_assignment -v
pytest tests/test_subscriptions.py::TestSubscriptionAutoAssign::test_round_robin_distribution -v

Error Details

Missing field:

AssertionError: 'injection_result' not in response
Response: {agent_name, message, restart_result, subscription_name}

Auto-assign not working:

auth_mode is 'api_key' instead of 'subscription'

Root Cause

  1. The injection_result field was removed from the subscription assignment response model during refactoring
  2. Round-robin auto-assignment during agent creation is not actually assigning the subscription, or the auth mode is not being updated

Fix

  1. Add injection_result back to the assignment response in routers/subscriptions.py
  2. Debug the auto-assign path:
    • Check if subscriptions with auto_assign=True are being applied during agent creation
    • Verify auth mode update completes successfully

Affected Tests (2)

  • test_subscriptions.py::TestCredentialInjection::test_injection_on_assignment
  • test_subscriptions.py::TestSubscriptionAutoAssign::test_round_robin_distribution

Activity

  1. added
    priority-p1
    type-bug
    on Apr 14, 2026
  2. vybe commented on Apr 16, 2026

    @vybe
    ContributorAuthor

    Fixed in commit 4445193 (PR #343) — added injection_result to subscription assignment response; auto-assign now skips invalid tokens.

  3. added
    complexity-low
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-lowpriority-p1type-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions