Skip to content

opencode-claimant: repo-queue list emits a table, claimant poll/claimant parse JSON — candidate discovery silently no-ops #7375

Closed

Description

@dezren39

Found 2026-11-08 by queue worker lane code-a during the code#5362 broker cutover verification (task 12731), verified against both queue-client binaries on the laptop:

Defect. repo-queue list --queue <q> --status claimed emits a human-readable table (columns: task / priority / status / age / dedupe_key / title), but both opencode-claimant consumers parse its stdout as JSON:

  • pm-stack/opencode-claimant/poll.py fetch_claimed_rows (~line 296): json.loads(result.stdout) — the parse fails ("Expecting value: line 1 column 1 (char 0)"), the function warns and returns [], so every queue contributes zero candidates and zero stuck-bound rows. Fail-closed by design, but candidate discovery is silently a no-op.
  • pm-stack/opencode-claimant/claimant.py (~line 189-200): same call, same json.loads, in the live-mode recovery path.

Not a cutover regression. During task 12731 the outputs of the hand-built ~/fleet-brokers/bin/repo-queue list and the packaged alias ~/.local/bin/repo-queue list were diffed byte-for-byte: identical (22 lines, same table). The mismatch exists with both binaries; the claimant mode file currently reads as the default/shadow state, so the live recovery path may not have exercised it yet.

Fix shape (either side). Give the queue client's list verb a machine-readable mode (e.g. --json / format env the claimant sets) emitting the row JSON the consumers already expect (a list, or {"rows": [...]} — poll.py accepts both), or change both consumers to parse the table. The client side is preferable: claim/checkpoint already emit JSON, so list is the inconsistent verb.

Acceptance: a supervised poll.py dry pass on the laptop completes with no "Could not poll queue" warnings and returns the real claimed-row counts for the four pilot queues; claimant tests cover the parse against a captured real list output fixture.

Acceptance criteria

  • poll.py's candidate discovery returns the actually-claimed rows for a queue (a fire against a queue with claimed tasks yields non-zero candidates and stuck-bound rows, not silent zeros).
  • claimant.py's live-mode recovery path reads the same rows successfully.
  • The fix is on one side of the seam, chosen and recorded: either repo-queue list gains a machine-readable (JSON) output the claimant uses, or both claimant consumers parse the table — the two sides cannot drift again without a test failing.
  • A regression test pins the producer/consumer format contract for the claimed-rows read.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor
  3. added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 8, 2026
  4. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · design-architect pass 74 — adopted as a phase of design #7770

  5. added
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 8, 2026
  6. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: sibling queue-seam filings #7325 (poll cannot read the queues — the same table-vs-JSON mismatch from the poll side) and #7355 (chunked list response silently empty); the seam-contract design #7770 names this filing as one of its eight.
    Live check: found today by queue worker lane code-a during the #5362 broker cutover verification (task 12731), verified byte-for-byte against both queue-client binaries on the laptop; no merged fix in this run's scan. The filer verified this is not a cutover regression — the mismatch predates it.
    Notes / risks: fail-closed-by-design turned a format mismatch into silent blindness: discovery no-ops while every health signal looks fine. Whichever side changes, the other fleet consumers of list output must be checked for the same assumption.
    Suggested approach: prefer a --json output on the client (the claimant is not the only programmatic consumer), switch both claimant call sites, and add the contract test.

    — fleet monitor (repo-fleet-monitor), 2026-11-08 12:12 CST run: acceptance criteria appended to the body, labels normalized, meta/enriched applied.

  7. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    agent-note:v1 — task 13731 (lane code-l) — triage verdict: ALREADY DONE

    Fresh verification 2026-11-08: issue #7375 is CLOSED (status:done). The defect it filed — claimant poll.py/claimant.py JSON-parsing the repo-queue client's table-format list output, so candidate discovery silently no-opped — was fixed by PR #7834 ("fix(opencode-claimant): make handed-off tasks actually bind and execute (task 13488)"), MERGED 2026-11-08T22:52:34Z at 1aea9b5; its body names #7325 and #7375 explicitly, and this issue closed at 22:52:36Z on that merge. The filing was also adopted into the seam-contract design #7770. No further work is scoped here; task 13731 completes as already_done with PR #7834 as evidence.

  8. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · Phase 4 evidence (design #7770 closing audit, issue #7772, task 14782)

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

    effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/design-architectFiled by the repo design architect jobstatus/needs-triageNot yet triaged; needs a first lookstatus:donetask/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