Skip to content

Bug: Test File Has Outdated Function Signature #62

Description

@purvanshjoshi

Description

The test file backend/test_e2e.py has an outdated function signature that doesn't match the current implementation in agents.py.

Current test code:
python async def main(): manager = MockManager() print('--- Starting AutoMaintainer End-to-End Agent Loop Test ---') await run_agent_loop('PxA-Labs/AutoMaintainer', manager, None) print('--- Done ---')

Current function signature in agents.py:
python async def run_agent_loop( repo_name: str, target_issue: int | None = None, run_id: str = None ):

The test is passing a manager parameter that no longer exists in the function signature.

Proposed Fix

  1. Update the test file to match current implementation:
    `python
    import asyncio
    from agents import run_agent_loop

async def main():
print('--- Starting AutoMaintainer End-to-End Agent Loop Test ---')
await run_agent_loop('PxA-Labs/AutoMaintainer', None, 'test-run-123')
print('--- Done ---')

if name == 'main':
asyncio.run(main())
`

  1. Add proper test cases:

    • Add unit tests for individual agent functions
    • Add integration tests for the full pipeline
    • Add mock tests for external API calls (GitHub, Groq, Supabase)
  2. Set up test infrastructure:

    • Add pytest configuration
    • Add test fixtures and mocks
    • Add CI integration for test runs

Acceptance Criteria

  1. Test file is updated to match current function signatures
  2. Tests can run without errors
  3. Basic test coverage is achieved
  4. Tests are integrated into CI/CD pipeline
  5. No emojis in any codebase changes or commits

Impact

MEDIUM - This affects:

  • Development workflow (tests don't work)
  • Code quality assurance
  • CI/CD pipeline reliability

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions