Skip to content

fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction #1289

Closed

Description

@dezren39

fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction

Three frictions hit while sequencing the Path-to-Phase-12 queue (2026-10-26), each verified live:

  1. No way to see the queue. repo-queue.py has validate/enqueue/claim/.../health, but health is counts only. Answering "what is queued, in what order?" required direct SQL against agent.tasks via the Supabase Management API. Add list --queue <q> [--status ...] printing id, priority, status, dedupe key, title, age — ordered the way claim_repo_task will claim them.
  2. Enqueue dedupe is silent and cross-queue. Enqueueing a packet whose dedupe key matches an existing task returns that task — including tasks in OTHER queues (a completed repo-health-code-shadow investigation ate the id(ci): F11.4 fast CI lane under 15 minutes #551 triage packet) and terminal states (a done Oct 25 task ate the Stabilize shared-state failures in Firefox E2E CI #229 packet). The caller can't tell "created" from "deduped against task N in queue Q with status S". Print that explicitly, and warn when the match is terminal or in a different queue.
  3. Priority semantics are undocumented and coarse. claim_repo_task orders priority ASC, created_at ASC (lower = sooner) — the helper never says so, and the validator's scale [10,20,30,40,50,70,90] has too few rungs to encode a 14-step sequence (we used 10–22 by direct DB update). Document the direction in the helper + schema, and either widen the scale or document the intended sequencing mechanism (same-priority FIFO by enqueue order).

None of these blocked the work — the DB is fully accessible and was used — but every fleet operator re-derives them by hand today.

Acceptance criteria

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    priority/normalOrdinary priority (the default)
    effort/sSmall: expected under 2 hours of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet monitor intake pass (protocol §5), 2026-10-27.

    Still live: verified this run — issue is OPEN, no merged PR references or closes it (0 closing-PR references), and it was filed within the last day, so nothing has had time to supersede it.

    Related: Filed from Path-to-Phase-12 queue sequencing (2026-10-26). Related: #1298 (the dedupe one-way-door bug — this issue is the visibility half, #1298 the semantics half), #1274 (ID prefix convention). Worked examples in the body: #551 and #229 packets eaten by cross-queue/terminal dedupe hits.

    Notes / risks: Still live — this run's monitor work hit friction #1 directly (queue contents required a hand-rolled task query; health is counts only) and friction #2's family (dedupe returns are indistinguishable from fresh enqueues without inspecting status/created_at). Effort/s: the helper is a single script; list is a read query + formatting.

    Suggested approach: Suggested approach: list via the same PostgREST path health uses; dedupe surfacing by comparing the returned row's created_at/status against the enqueue instant and printing an explicit 'dedupe hit' line.

    Labels normalized this pass; acceptance criteria appended to the body (original text preserved verbatim above it).

  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Transition: picked up
    Worker: repo-worker-code (openchamber-scheduled-lane), task 2540
    Next: Revalidate current helper behavior and ownership; route or close based on evidence.

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    Transition: blocked — packet_defect (task 2540; repo-worker-code)
    Triage: The laptop helper still rejects list; its enqueue path prints the RPC result without identifying dedupe hits. The priority help does not explain claim direction. The related merged pm-dispatch change does not change this helper.
    Routing blocker: The installed ~/hatch/tools/repo-queue.py and schema are tracked in dezren39/hatch, not developing-today/code; the packet schema does not allow hatch as the follow-up repository. Please identify the source of truth and authorized cross-repository route before a scoped fix packet is created. No implementation was attempted.

  7. 17 remaining items

  8. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), openchamber scheduled lane aea12c82
    • Session / ID: follow-up task 8538 claimed by lane code-o at 2026-11-03T16:43:49Z (24 s after enqueue), lease to 17:28:49Z
    • Task: the previous verdict said queue/queued; the follow-up is now live in another lane, so labels were restored to mirror the claimed state (queue/claimed, work/assigned, status/in-progress). No other change.
  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-o
    • Session / ID: task 8538
    • Found via: queue claim
    • Task: Implementing the repo-queue.py slice for issue fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction #1289: add a list verb, surface enqueue dedupe hits, and document priority direction (lower priority claims first, FIFO within a priority) in the helper.
    • Expectation: effort/s — done when the helper change is verified live (py_compile, list, enqueue dry-run/dedupe readback, health unchanged) and committed to dezren39/hatch main with (#1289) in the subject.
    • Links: task 8538 (queue repo-health-code-pilot)
  11. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: reviewed (coverage loop-back)
    Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 2540 (triage, queued, priority 40) in repo-health-code-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
    Found via: coverage loop-back 2026-11-03

  12. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-o
    • Session / ID: task 8538
    • Found via: queue claim
    • Task: Implemented all three frictions for issue fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction #1289 in the live helper tools/repo-queue.py (dezren39/hatch), committed and pushed to hatch main as commit e9e812138404a3e0add3f3371b27143ce4a79c86 — "repo-queue: add list verb, surface enqueue dedupe hits, document priority direction (fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction #1289)" (1 file, +154/−4, strictly additive).
    • What landed:
      1. New list --queue <q> [--status <s>] [--limit N] [--not-before <ISO>]: prints task <id> (per Fleet reporting convention: queue task IDs and GitHub issue numbers collide — always prefix #1274), priority, status, age, dedupe key, title, in exact claim order (priority ASC, created_at ASC); --not-before applies the claim due-filter when given. Read-only via the same PostgREST path health uses.
      2. enqueue now prints an explicit outcome line before the row JSON — enqueued new task <id> (queue <q>, status <s>), dedupe hit: existing task <id> (queue <q>, status <s>, created <ts>), or revived: existing task <id> (...) (pre-existing row back to queued with updated_at at/after the call, migration 0014 semantics) — plus warning: lines for cross-queue and terminal-state hits.
      3. Priority direction (lower number claims first; same-priority FIFO by created_at) documented in the module docstring, the top-level --help description, the claim/enqueue help, and a comment beside PRIORITY_SCALE (values unchanged: 10/20/30/40/50/70/90).
    • Verification transcript (live, 2026-11-03):
      • python3 -m py_compile ~/tools/repo-queue.py — clean.
      • repo-queue.py list --queue repo-health-code-pilot --limit 5 — renders task 1111 / task 1254 / task 2745 … at priority 10 in created_at order.
      • repo-queue.py list --queue repo-health-code-pilot --status parked — parked rows only (task 2988, task 5801, task 6303 …).
      • repo-queue.py list … --status queued --not-before 2026-11-03T00:00:00Z — future-not_before task 3018 correctly excluded.
      • repo-queue.py enqueue packet-pcr-4515.json --queue repo-health-code-pilot → dedupe hit: existing task 6430 (queue repo-health-code-pilot, status queued, created 2026-11-02T18:13:07.967177+00:00); the same packet with --dry-run still prints the would-be task and makes no network call.
      • repo-queue.py health — output unchanged. repo-queue.py --help and claim --help both state the priority direction.
      • Push verified independently: git ls-remote origin main on dezren39/hatch returns e9e812138….
    • Expectation: done — closing issue fleet(queue): repo-queue.py — add list/inspect, surface dedupe hits, document priority direction #1289; queue task 8538 completes with outcome fixed_merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

effort/sSmall: expected under 2 hours of workkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedmode/onlineFully doable remotely: design, config, code, cloudpriority/normalOrdinary priority (the default)source/humanFiled directly by a humantask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions