Skip to content

feat(orchestration): admission queue with deferred pickup #441

Description

@krokoko

Context: ROADMAP.md → Admission queue with deferred pickup
Related: #331 (closed bug—this is the feature successor)


Component

API or orchestration

Describe the feature

When admission is at capacity, persist tasks in a durable queue instead of failing them (see #331 live epic failure). Automatically re-attempt admission and continue processing in FIFO order with optional priority lanes as concurrency becomes available.

Must preserve: cancel semantics, idempotency semantics.

Must expose: queue position and ETA in task status / bgagent status.

Use case

#331 demonstrated mass failure when fan-out releases more children than the per-user concurrency cap. Hard-failing subtasks wrecks entire epics (#247). Users expect queueing, not 429-style task death.

Proposed solution

  1. New state or sub-status: QUEUED / SUBMITTED with admission_pending: true.
  2. Durable queue (DynamoDB GSI or SQS) polled by admission worker.
  3. createTaskCore returns 201 with queue position when capped—not terminal failure.
  4. Cancel removes from queue; idempotency keys dedupe.
  5. API + CLI expose queue_position, estimated wait.
  6. Regression test reproducing Fan-out orchestration mass-fails against the per-user concurrency cap (no queue/retry) #331 scenario.

Other information

Metadata

Metadata

Assignees

Labels

P0highest priorityapprovedWhen an issue has been approved and readyenhancementNew feature or requestorchestrationTask lifecycle, REST API handlers, orchestrator Lambdas, durable execution

Type

No type

Fields

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