Skip to content

feat: support configurable lanes in agent queue APIs #384

@joryirving

Description

@joryirving

Parent: #381

Goal

Make agent queue APIs work with any configured lane set, including single-lane deployments and deployments with more than two claimable lanes.

Current problem

Queue behavior is currently built around the existing fixed lane names. Dispatch should instead treat lane IDs as configured routing metadata.

Requirements

  • Keep /api/agents/{agentName}/queue?lane={lane} support.
  • Validate requested lane against configured lanes.
  • If a lane is omitted, preserve current compatible behavior for default config.
  • Exclude non-claimable lanes from worker queues by default.
  • A non-claimable lane such as backlog must not be claimable worker work.
  • Preserve existing behavior for:
    • excluding done issues
    • excluding non-claimable backlog work from default worker queues
    • including work already assigned to the requesting agent
    • excluding work assigned to other agents
    • excluding Renovate issues unless explicitly included
  • Support a config with exactly one claimable lane plus backlog.
  • Support a config with three claimable lanes plus backlog.

API behavior notes

  • If lane is provided and valid, filter to that lane.
  • If lane is provided and unknown, return a clear 400 error.
  • If lane is omitted, default behavior should remain backward-compatible.
  • Queue response should include the issue lane value as before.

Non-goals

  • Do not change external workflow repos.
  • Do not redesign issue status handling.
  • Do not make queues ignore lanes entirely.
  • Do not make no-status/untriaged issues claimable worker work.

Acceptance criteria

  • Default normal queue behavior still works.
  • Default escalated queue behavior still works.
  • A custom configured lane can be queried successfully.
  • Unknown lane query returns a clear error.
  • Single claimable lane config works.
  • Three claimable lane config works.
  • Non-claimable lanes are excluded from worker queues unless an explicit grooming/intake path requests them.
  • Tests cover default lanes and custom lanes.

Validation

  • npm run lint
  • npm run typecheck
  • npm run test
  • npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions