GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-claimant: poll.py fetch_sessions requests /api/session at limit 1000+; OpenCode caps limit at 200 — every fire fail-closed (cap_room null), stuck_bound blind · Issue #12223 · developing-today/code

opencode-claimant: poll.py fetch_sessions requests /api/session at limit 1000+; OpenCode caps limit at 200 — every fire fail-closed (cap_room null), stuck_bound blind #12223

New issue
Copy link
New issue
Copy link
Closed
#12225
Closed
opencode-claimant: poll.py fetch_sessions requests /api/session at limit 1000+; OpenCode caps limit at 200 — every fire fail-closed (cap_room null), stuck_bound blind#12223
#12225
Copy link
Labels
status:done

Description

@dezren39
dezren39
opened on Nov 21, 2026
Issue body actions

Symptom

Every opencode-claimant fire ends fail-closed: fires.jsonl records
cap_room: null and the claimant can never launch an opencode-lane task,
even when candidates exist. poll.py's fetch_sessions() — the read
behind the 36-root concurrency cap AND the #4758 stuck-bound supervision
classification — requests GET /api/session with limit values the
OpenCode server now rejects, so the read 400s on every probe and the
fail-closed design correctly refuses to act on an unknown session set.

Same root cause as #12122 (conductor census helper, fixed 2026-11-20
17:38Z): OpenCode enforces a limit <= 200 ceiling on
GET /api/session — documented in OpenChamber commit b003844b3
("OpenCode rejects a session.list limit above this with a 400"). That
fix covered the conductor's helper; the claimant's poll.py was missed.

Evidence (2026-11-21, laptop-local, standing server :13420, opencode 2.0.30)

  • Live repro with the claimant's own credential path:
    GET /api/session?limit=1000 → HTTP 400
    {"_tag":"InvalidRequestError","message":"Expected a value less than or equal to 200\n at [\"limit\"]","kind":"Query"}.
    limit=200 → HTTP 200, 200 rows. limit=201 → 400.
  • pm-stack/opencode-claimant/poll.py:581 —
    SESSION_FETCH_LIMITS = (1000, 10000, 100000); fetch_sessions()
    (poll.py:584) escalates through exactly those limits, so every probe
    400s and the fetch fails closed to None ("completeness cannot be
    proven").
  • _server_get() (poll.py:557) swallows the HTTPError, so nothing
    surfaces the 400 — the fire log only shows the downstream symptom.
  • Fire log ~/.local/state/opencode-claimant/fires.jsonl: the last fire
    with a non-null cap_room is 2026-11-19T09:00:41Z (cap_room 36, which
    launched task 10501 / Migration M3: sandbox quota-recorder as first sandbox deploy target + generic unit restorer #5770); every fire since has cap_room: null.
    Conductor census helper session-count.py pages /api/session at limit=1000; the API caps limit at 200 — exit-3 census has stopped all conductor dispatch since 15:23Z #12122 pins the ceiling going live on the server fleet in the
    2026-11-20T15:05–15:23Z window; the standing server (pid running
    opencode 2.0.30) enforces it now (probe above).
  • Pagination alternatives probed: offset is still broken (page 2
    repeats page 1 — the long-standing opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757 behavior fetch_sessions
    documents); cursor takes the opaque anchor token the response
    returns (data.cursor.next, base64), not an integer or session id.
  • Server load: ~29k sessions today (Conductor census helper session-count.py pages /api/session at limit=1000; the API caps limit at 200 — exit-3 census has stopped all conductor dispatch since 15:23Z #12122's fixed census counted
    29,218 rows), so the 200-row page ceiling makes cursor pagination
    mandatory — a limit=200-only fetch could never prove completeness
    either.

Impact

  • Launches: summarize_cap() returns (None, None, None) → the cap
    step reads cap_room: null → "server unreadable" → launch nothing.
    The opencode execution lane is fully idle even with healthy queue
    backends and candidates present (the queue itself is fine: health
    runs, candidate discovery works).
  • Supervision: main() (poll.py:945-951) builds session_by_id
    only from a successful fetch; with sessions = None it is {}, so
    get_stuck_bound() (poll.py:912) silently reports stuck_bound: [] —
    the opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758 zero-message recovery rule and the gone-session relaunch
    rule can never fire. Blind, not just blocked.
  • The fail-closed behavior is correct as designed (no double-launch
    risk); the defect is that the read can never succeed.

Fix direction

Adopt the pattern verified in #12122's fix: page at limit=200
following the response's cursor.next anchor until a short page, with
an explicit max-pages guard that raises (fails closed) rather than
silently truncating. fetch_sessions()'s completeness-by-construction
contract stays: a page below its requested limit ends the walk; hitting
the page guard is the same "completeness cannot be proven" outcome as
today. Update test_poll.py / test_poll_transport.py to cover the
cursor walk (short page ends, page guard fails closed, cursor token
passed through verbatim).

Acceptance

  • A live fire on the laptop reports a non-null cap_room again
    (python3 pm-stack/opencode-claimant/poll.py against :13420).
  • stuck_bound reflects the real session set (empty because nothing is
    stuck, not because the read failed).
  • Hermetic tests for the cursor pagination pass; the fail-closed path
    (page guard exceeded) is covered.

Filed by the slice-1 claimant fire run (#3026) during its 2026-11-21
supervision pass; triage packet enqueued in the same pass per the
filing rule.

Activity

  1. developing-today commented on Nov 21, 2026

    @developing-today
    developing-todayBot
    on Nov 21, 2026 – with developing.today
    Contributor
    More actions

    CODE-4447

  2. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 21, 2026
  3. dezren39 commented on Nov 21, 2026

    @dezren39
    dezren39
    on Nov 21, 2026
    MemberAuthor
    More actions

    agent-note:v1
    kind: triage-findings
    task: 20912
    result: triaged, confirmed, routed to a follow-up fix task

    Verified on origin/main 91f650b:

    • pm-stack/opencode-claimant/poll.py SESSION_FETCH_LIMITS = (1000, 10000, 100000); fetch_sessions() requests /api/session?limit=<n> at each step.
    • _server_get() returns None on any exception, including the HTTP 400 from a limit above 200, so fetch_sessions() returns None. The silent-None path is the blind spot the issue describes.
    • Same root cause as Conductor census helper session-count.py pages /api/session at limit=1000; the API caps limit at 200 — exit-3 census has stopped all conductor dispatch since 15:23Z #12122 (conductor session-count.py), but a different file. Conductor census helper session-count.py pages /api/session at limit=1000; the API caps limit at 200 — exit-3 census has stopped all conductor dispatch since 15:23Z #12122 stays open for its own fix.
    • Fix shape: cursor-walk at limit 200 via cursor.next (the same verified approach as Conductor census helper session-count.py pages /api/session at limit=1000; the API caps limit at 200 — exit-3 census has stopped all conductor dispatch since 15:23Z #12122), plus a 400 surfaced as an error and not swallowed to None.

    Route: a small fix in poll.py with a regression test, enqueued as a follow-up task.

  4. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 21, 2026
  5. dezren39 commented on Nov 21, 2026

    @dezren39
    dezren39
    on Nov 21, 2026
    MemberAuthor
    More actions

    agent-note:v1
    kind: done
    task: 20912 (triage) complete, outcome triaged
    follow-up: task 20914 (small_fix) implements the poll.py cursor-walk fix at limit<=200 with the 400 surfaced. Issue stays open until that fix merges.

  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 21, 2026
  7. dezren39 commented on Nov 21, 2026

    @dezren39
    dezren39
    on Nov 21, 2026
    MemberAuthor
    More actions

    agent-note:v1
    kind: picked-up
    task: 20914
    worker: repo-worker-code
    lane: oc-code-07
    progress: Revalidating current GitHub state and preparing a dedicated worktree.

  8. developing-today
    added
    status:in-review
    on Nov 21, 2026
  9. dezren39 commented on Nov 21, 2026

    @dezren39
    dezren39
    on Nov 21, 2026
    MemberAuthor
    More actions

    agent-note:v1
    kind: done
    task: 20914
    result: PR opened
    pr: #12225
    checks: 239 unittest tests pass locally; GitHub checks report skipping (no running/failing checks)
    branch: queue/20914-12223-poll-session-limit
    commit: 6312ed1

  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 21, 2026
  11. dezren39
    closed this as completedin #12225on Nov 22, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 22, 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

    status:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.