Skip to content

bug: Deploy-local response missing credential fields and limit not enforced #337

Closed

Description

@vybe

Summary

The local agent deployment endpoint has two issues:

  1. Response is missing credentials_imported and credentials_injected fields
  2. The 10-credential limit is not being enforced (requests with >10 credentials succeed)

Reproduction

pytest tests/test_deploy_local.py::TestDeployLocalSuccessful::test_deploy_with_credentials -v
pytest tests/test_deploy_local.py::TestDeployLocalLimits::test_too_many_credentials_rejected -v
pytest tests/test_deploy_local.py::TestDeployLocalResponse::test_response_structure -v

Error Details

Missing fields:

AssertionError: 'credentials_imported' not in response
Response: {agent_name, message, ...}  # missing credential fields

Limit not enforced:

Expected 400 for >10 credentials, got 200 (accepted without limit)

Fix

  1. Add credentials_imported and credentials_injected fields back to the deploy-local response model
  2. Add validation in the deploy-local handler:
if len(credentials) > 10:
    raise HTTPException(status_code=400, detail="Maximum 10 credentials allowed")

Affected Tests (3)

  • test_deploy_local.py::TestDeployLocalSuccessful::test_deploy_with_credentials
  • test_deploy_local.py::TestDeployLocalLimits::test_too_many_credentials_rejected
  • test_deploy_local.py::TestDeployLocalResponse::test_response_structure

Labels

  • priority-p1
  • type-bug

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 credentials_imported and credentials_injected fields to deploy-local response, enforced 10-credential limit.

  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