Skip to content

fix: resolve test suite failures (Epic #342) - #343

Merged
vybe merged 1 commit into
mainfrom
feature/342-fix-test-suite-failures
Apr 14, 2026
Merged

vybe merged 1 commit into
mainfrom
feature/342-fix-test-suite-failures

Conversation

@vybe

@vybe vybe commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes 7 distinct test failures identified in Epic #342. All tests now pass.

Changes

Issue Problem Fix
#335 UnboundLocalError: execution_id in agent container Fixed by rebuilding base image with correct code
#336 Exit code 1 "General error" hides billing errors Added billing_error detection in _diagnose_exit_failure()
#337 Deploy-local missing response fields Added credentials_imported and credentials_injected to response
#338 Test expects 429 at capacity, now queues Updated test to expect 200 with status: "queued" per BACKLOG-001
#339 Agent notification endpoints return 404 Fixed test to use created_agent["name"] instead of dict directly
#340 Subscription assignment missing injection_result Added injection_result field; fixed auto-assign to skip invalid tokens
#341 Slack watchdog test collection error Changed relative path to __file__-based path

Files Modified

  • docker/base-image/agent_server/services/claude_code.py - billing_error handling
  • src/backend/db/subscriptions.py - Skip subscriptions with invalid/legacy tokens
  • src/backend/models.py - Added credential fields to deploy-local models
  • src/backend/routers/subscriptions.py - Added injection_result to response
  • src/backend/services/agent_service/deploy.py - Credential injection support
  • tests/test_notifications.py - Fixed created_agent fixture usage
  • tests/test_parallel_task.py - Updated at-capacity test expectations
  • tests/unit/test_slack_watchdog.py - Fixed relative path

Test Plan

  • test_notifications.py::TestAgentNotifications (4 tests) - PASS
  • test_subscriptions.py::TestCredentialInjection::test_injection_on_assignment - PASS
  • test_subscriptions.py::TestSubscriptionAutoAssign::test_round_robin_distribution - PASS
  • test_parallel_task.py::test_async_mode_at_capacity_queues_task - PASS
  • unit/test_slack_watchdog.py (28 tests) - PASS
  • Smoke tests: 677 passed, 22 skipped, 0 failed

Closes #342, #335, #336, #337, #338, #339, #340, #341

🤖 Generated with Claude Code

Fixes:
- #335: Add billing_error detection in Claude Code execution
- #336: Surface credit balance errors with helpful message
- #337: Add credentials_imported/injected fields to deploy-local response
- #338: Update at-capacity test for BACKLOG-001 queuing behavior
- #339: Fix created_agent fixture usage (dict → dict["name"])
- #340: Add injection_result to subscription response; skip invalid tokens in auto-assign
- #341: Fix relative path in slack_watchdog test using __file__

Smoke tests: 677 passed, 22 skipped, 0 failed

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

epic: Fix test suite failures (13 failing tests)

1 participant