Skip to content

bug: queue status reports the newest slot as the "current execution", not the oldest #3319

Closed

Description

@vybe

Summary

services/slot_service.py::acquire_slot gives each new slot the number count + 1, so numbers get reused after out-of-order releases. services/capacity_manager.py::get_status sorts by that number and takes the first entry, but its comment promises "the oldest active slot".

Repro: cap 3. Acquire A, B and C; release A and B; acquire D. The status shows D as current instead of C.

Context

This is display only: GET /api/agents/{name}/queue. Monitoring reads only is_busy, so it isn't affected. Found by the 2026-10-06 /edge-cases sweep.

Acceptance Criteria

  • get_status picks the slot with the smallest start score, not the lowest slot number. Alternatively, slot numbers become unique.
  • tests/unit/test_ec_capacity_slots_edges.py::test_r56_get_status_current_execution_is_the_oldest_slot passes with its marker removed.

Activity

  1. added
    status-readyGreenlit and ready for development (vetted; counterpart to status-incubating)
    on Oct 7, 2026
  2. vybe commented on Oct 8, 2026

    @vybe
    ContributorAuthor

    Draft PR: #3415 — queue status reports the oldest running slot; reading review MERGEABLE, evidence sweep green. Waits for CI and the operator's merge. (trinity-pm, build-chain run chain-easy-1008)

  3. removed
    status-readyGreenlit and ready for development (vetted; counterpart to status-incubating)
    on Oct 9, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions