Skip to content

test: Update at-capacity test for BACKLOG-001 behavior change #338

Closed

Description

@vybe

Summary

The test test_async_mode_at_capacity_returns_429_upfront expects HTTP 429 when submitting a task to an at-capacity agent, but BACKLOG-001 changed this behavior to return 200 with status: "queued".

Reproduction

pytest tests/test_parallel_task.py::TestAsyncModeUnifiedExecutor::test_async_mode_at_capacity_returns_429_upfront -v

Error Details

Expected 429, got 200 with {"status":"queued",...}

Context

BACKLOG-001 implemented a persistent backlog queue for tasks submitted to at-capacity agents. Instead of immediately rejecting with 429, tasks are now queued and processed when capacity becomes available.

Fix Options

  1. Update the test to expect 200 + status: "queued" response
  2. Rename the test to reflect the new behavior (e.g., test_async_mode_at_capacity_queues_task)
  3. Add a config option to bypass backlog for testing (if 429 behavior is still needed in some cases)

Recommendation

Update the test to match the current API contract. The BACKLOG-001 behavior is correct — tests should reflect reality.

Affected Tests (1)

  • test_parallel_task.py::TestAsyncModeUnifiedExecutor::test_async_mode_at_capacity_returns_429_upfront

Activity

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

    @vybe
    ContributorAuthor

    Fixed in commit 4445193 (PR #343) — updated test to expect status: queued instead of 429, reflecting BACKLOG-001 behavior change.

  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-p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions