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 — design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) · Issue #4912 · developing-today/code

design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912

New issue
Copy link
New issue
Copy link
Closed
4 / 44 of 4 issues completed
Closed
design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned)#4912
4 / 44 of 4 issues completed
Copy link
Assignees
dezren39
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeepicMeta-issue grouping multiple items (org Project Type=Epic)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingsource/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Design (fleet design architect, pass 44): the claimant judges and drives sessions per-id under the v2 contract, and every bound state has a named next step. Full design doc: files/designs/code-claimant-session-contract.md in the keep-the-four-repos-healthy goal workspace.

Problem

The opencode-claimant (pm-stack/opencode-claimant/ — poll.py + prompt.md, #3026 slice 1) talks to the OpenCode v2 server through three seams whose contract was never stated, and each has now filed:

  1. Judging from a list page — opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757: poll.py treats one GET /api/session read as the complete list; it truncates at 50, so cap accounting overstates cap_room (launching past the 12 cap becomes possible) and supervision reads live bound sessions as gone — against the claimant's own "never relaunch over a live session" rule.
  2. Creating under the wrong contract — opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870: prompt.md step 4b's create body sends a top-level directory, which v2 strips; launched workers land in /home/user, not the repo primary. The dispatch client already sends the correct shape (location: { directory }, pm-stack/dispatch/src/opencode.ts:52-58).
  3. A bound state with no next step — opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758: a bound session that is alive with zero messages (task 6722, resend already spent, lease expired) is reachable by no rule: not a candidate (bound), not gone (answers per-id), resend exhausted. Claimed forever.

Recorded decisions

  1. Per-id judging. Cap counts from the /api/session/active id set directly (per-id GET for root-ness); supervision existence/progress is a per-id read in poll.py and in prompt.md steps 1 + 5. Any list read that remains fails closed (cap_room: null) when the returned count equals the page size — the same treatment summarize_cap already gives an unreadable active set.
  2. Verify before bind. Step 4b's body becomes the v2 shape (location: {directory}), and the create response's location.directory must equal the requested repo primary before binding; a mismatch is a creation failure (task stays unbound, failure checkpointed) and the misplaced session is deleted per-id. Mechanical, because two text-only shape fixes in this prompt (model object, task 5857; now directory) have each cost a launch window.
  3. Every bound state has one disposition (table in the design doc). For the never-prompted state (zero messages, no markers, 30 min inactive — reusing poll.py's ACTIVE_WINDOW_MS — lease expired): reclaim to unbound while attempts remain (DELETE the verified-empty session first — delete failure keeps the binding; checkpoint launch_failed, prior session id kept in an audit field), and terminally fail at attempts >= max_attempts with the session id in --execution (task 6722's case). The outcome lands on the task's progress, which is what Tend's fleet-watchdog reads — agreement via the shared record, no new channel.

Alternatives and why they lose (paginate-the-list; text-only create fix; fail-only recovery; reclaim without delete) are recorded in the design doc, as are the open questions (queue-read page-size rule — no evidence; active-set read bound — no evidence).

Phases (adopted origins — do not re-file or split)

  • Phase 1 = opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757 — per-id judging: cap + supervision.
  • Phase 2 = opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870 — v2 create shape + verify-before-bind (independent).
  • Phase 3 = opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758 — never-prompted recovery as decided above (independent).
  • Phase 4 = closing audit (new, filed with this design) — server-call inventory against the contract, state table into the claimant README, origin closure; gated on Phases 1–3.

Originated on the trigger recorded at design pass 42 (a third claimant-contract filing); #4757/#4758 re-verified this pass as still status/needs-triage, unsplit, unclaimed.


agent-note:v1 — filed by the fleet design architect (pass 44) from an audit of pm-stack/opencode-claimant/{poll.py,prompt.md} and pm-stack/dispatch/src/opencode.ts at origin/main c3c9423.

Sub-issues

Collapse Sub-issuesSub-issues

4 of 44 of 4 Issues completed
Loading 4 sub-issues

Activity

Next
  1. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    source/design-architectFiled by the repo design architect job
    on Nov 3, 2026
  2. dezren39
    added sub-issues on Nov 3, 2026
    • opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757
    • opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870
    • opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758
    • Phase 4 (audit) of #4912 — closing server-call inventory + contract statement for the opencode-claimant #4916
  3. dezren39 commented on Nov 3, 2026

    @dezren39
    dezren39
    on Nov 3, 2026
    MemberAuthor
    More actions

    Filed by the fleet design architect, pass 44 (2026-11-03), on the trigger recorded at pass 42: a third claimant-contract filing (#4870, filed 2026-11-03T11:36Z). Audit at origin/main c3c94238 (claimant + dispatch trees unchanged from a8aa52dc, verified by diff): poll.py fetch_sessions()/summarize_cap, prompt.md steps 1/4b/5 + constants, pm-stack/dispatch/src/opencode.ts:52-58 as the in-tree v2 embodiment.

    Phases are sub-issues of this issue (verified by independent readback: 4757, 4870, 4758, 4916): Phase 1 = #4757 (adopted), Phase 2 = #4870 (adopted), Phase 3 = #4758 (adopted, its either/or pinned on the issue), Phase 4 = #4916 (new closing audit, status/blocked on Phases 1–3). Adoption notes are posted on all three origins instructing triage not to re-file/re-scope/split. Register entry added in files/potential-projects.md (status: proposed).

    agent-note:v1 — design-architect origination note, pass 44.

  4. developing-today
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 3, 2026
  5. developing-today commented on Nov 3, 2026

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

    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 8545 (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

  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 3, 2026
  7. 268 remaining items

    Load more actions
  8. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    agent-note:v1
    lane: code-u
    task: 14438
    issue: #4912
    stage: handed_off
    note: Task 14438 (small_fix, issue #4912) verified fresh by lane code-u: issue OPEN, no hard-stop labels, no status/needs-triage. Execution lane row 5651 = opencode; handed off per runbook 1b Rule 4 (scheduled shift is time-bounded; claimant is the persistent execution session). Attempts 3/3. Parking 1200s for the claimant window.

  9. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 14438
    • Found via: queue claim
    • Task: task 14438 (small_fix) for issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912 — opencode-claimant session contract design. Claimed and revalidated fresh (issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912 OPEN, no held/user/owned/do-not-merge/do-not-auto-edit labels, no status/needs-triage), then handed off to the opencode claimant (lane row 5651). Handoff reason: this scheduled shift is time-bounded and the claimant is the persistent execution session. Note: attempts 3/3 — AT the attempt cap, so the claimant should bind this task promptly before it exhausts.
    • Expectation: claimant launches the bound opencode session for task 14438; this lane does not work issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912 directly.
    • Links: issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
  10. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: repo queue worker, lane code-w (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-w run 2026-11-10; task 14438
    • Found via: claimed task 14438 this shift; execution-lane assignment returned opencode (row 5651)
    • Task: task 14438 for issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912 (small_fix). Fresh check 2026-11-10T10:37Z: issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit), no status/needs-triage. Note: task 14438 attempts are 3/3 (at cap) — claimant should bind it promptly; it was also handed off by the previous lane-w shift. Handed off to the opencode claimant — scheduled shift is time-bounded; claimant is the persistent execution session. This lane does not work it directly.
    • Expectation: claimant session drives task 14438 to a terminal state.
    • Links: task 14438 · issue design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912
  11. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    state: done
    task: 13022
    lane: code-w
    issue: "#4916"
    pr: "#8224"

    Phase 4 (issue #4916) is complete in PR #8224, and this note records the closure on the parent design #4912 as Phase 4's scope requires:

    • All four phases are now landed or audited. Phases 1–3 (issues opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757, opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870, opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758) are CLOSED with their mechanisms live in pm-stack/opencode-claimant/; Phase 4's closing audit verified each against current code and posted an origin summary on each phase issue.
    • The contract now has a durable statement: README's new "The Session Contract (design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912)" section carries the three rules (judge a session by its own record; verify before bind; every bound state dispositioned), the 8-row bound-state table, and the full server-call inventory for poll.py / claimant.py / launch_one.py / prompt.md — every call dispositioned, none left silent, so no follow-up issues were required.
    • The one open question Phase 4 posed is answered in the same section: the queue-broker /list read at limit=500 is exempt from the session contract's fail-closed-at-equality rule, with the evidence and the revisit trigger recorded (details in PR docs(claimant): Phase 4 of #4912 - session contract + server-call inventory + limit=500 disposition (#4916) #8224).

    Design #4912 itself stays open as the design record; its implementation phases are done. Task 13022 completes as pr_opened (PR #8224).

  12. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: triaged
    queue: repo-health-code-pilot
    task: 14438 (small_fix, worker repo-worker-code, lane code-w)
    by: repo-worker-code lane code-w
    at: 2026-11-10T22:22:00Z

    Triage verdict for issue #4912 (task 14438, verified fresh this shift):

    • Phase 1 = issue opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757 (per-id judging): CLOSED.
    • Phase 2 = issue opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870 (v2 create shape + verify-before-bind): CLOSED.
    • Phase 3 = issue opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758 (never-prompted recovery): CLOSED.
    • Phase 4 = issue Phase 4 (audit) of #4912 — closing server-call inventory + contract statement for the opencode-claimant #4916 (closing audit): OPEN — this is the entire remainder of design: judge a session by its own record — the opencode-claimant's session contract (per-id reads, verified create, every bound state dispositioned) #4912. Its gate ("do not start before Phases 1-3 land") is now satisfied.

    Remainder conversion: rather than enqueueing a separate packet, lane code-w works the #4916 audit in this same claim (task 14438, small_fix): server-call inventory for pm-stack/opencode-claimant/poll.py + prompt.md with per-call dispositions, the contract statement + bound-state table into pm-stack/opencode-claimant/README.md, and the evidence-based disposition of poll.py's limit=500 queue read. #4916 has no queue task and no queue labels (checked fresh); #4912 closes when #4916 lands. Labels synced for claim on #4912.

  13. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 10, 2026
  14. dezren39
    added a commit that references this issue on Nov 10, 2026

    Merge pull request #8323 from developing-today/queue/14438-4916-claim…

    c994a7e
  15. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: done
    queue: repo-health-code-pilot
    task: 14438 (small_fix, worker repo-worker-code, lane code-w)
    by: repo-worker-code lane code-w
    at: 2026-11-10T22:45:00Z

    Closing design #4912 — all four phases are landed and closed, verified fresh 2026-11-10 by task 14438:

    • Phase 1 = opencode-claimant: cap and supervision read GET /api/session, which truncates at 50 — active roots undercounted, live bound sessions reported gone #4757 (per-id judging): CLOSED. Current form in poll.py: cap counts from the GET /api/session/active id set; the session list is an escalating-limit read that fails closed when completeness cannot be proven.
    • Phase 2 = opencode-claimant: session create sends a top-level directory, which the v2 API ignores — launched workers land in /home/user, not the repo primary #4870 (v2 create shape + verify-before-bind): CLOSED. claimant.py step 4b creates with {"location": {"directory": ...}} and verifies the response location before bind; a mismatch deletes the session and never binds.
    • Phase 3 = opencode-claimant: bound session that never received its prompt (task 6722) has no recovery path — stuck claimed forever #4758 (never-prompted recovery): CLOSED. README Recovery Rules + claimant.py: verified-empty DELETE, reclaim while attempts remain, terminal fail at the cap with the session id recorded.
    • Phase 4 = Phase 4 (audit) of #4912 — closing server-call inventory + contract statement for the opencode-claimant #4916 (closing audit): CLOSED by PR docs(claimant): session contract + server-call inventory in README (#4916, phase 4 of #4912) #8323 (MERGED, c994a7e) — contract statement + bound-state table + full server-call inventory now in pm-stack/opencode-claimant/README.md; the limit=500 queue read dispositioned EXEMPT with evidence and a named revisit trigger; no undispositioned calls, no follow-up issues owed.

    Task 14438 (the triage-remainder packet for this issue) completes as fixed_merged: the triage verdict (remainder = #4916 only) is recorded at comment 6780665926, and the remainder itself was worked in the same claim.

  16. dezren39
    closed this as completedon Nov 10, 2026
  17. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeepicMeta-issue grouping multiple items (org Project Type=Epic)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingsource/design-architectFiled by the repo design architect jobtask/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

    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.