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 — pm-dispatch(sessions): a GitHub comment/label failure after the claim PATCH cancels a live session's queue task — the launched session keeps running untracked · Issue #2660 · developing-today/code

pm-dispatch(sessions): a GitHub comment/label failure after the claim PATCH cancels a live session's queue task — the launched session keeps running untracked #2660

New issue
Copy link
New issue
Copy link
Closed
#4231
Closed
pm-dispatch(sessions): a GitHub comment/label failure after the claim PATCH cancels a live session's queue task — the launched session keeps running untracked#2660
#4231
Copy link
Assignees
dezren39
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 30, 2026
Issue body actions

Problem

In pm-dispatch (pm-stack/dispatch/src/server.ts, main 732ca26), the steps after a session is already launched and its queue task already claimed are not failure-isolated, so a GitHub API hiccup at the very end of a successful launch is reported — and acted on — as a launch failure:

  • launchSession creates the OpenCode session and sends the prompt (server.ts:117-123), registers the worker and PATCHes the task to status: claimed with the session id in progress (server.ts:130-143).
  • The lane-ledger call right after IS guarded: its failure is noted on the task with "launch unaffected" (server.ts:148-158).
  • But the final GitHub calls are NOT guarded: github.comment(...) (server.ts:161-165) and github.addLabels(...) (server.ts:166) throw straight out of launchSession. (GitHubClient.comment/addLabels in src/github.ts do fall back from the app route to the gh CLI, but a failure of both routes throws GitHubError.)

Consequences by caller mode:

  • wait: true (default): handleSessions treats any launchSession throw as a launch failure, calls cancelTask on the task (server.ts:253) and returns 502 {task_id, error}. The OpenCode session, however, was already created and prompted — it keeps running the work, now untracked: its queue task is cancelled, and the caller was told the dispatch failed, inviting a duplicate retry dispatch.
  • wait: false: the async continuation catches the same throw and PATCHes last_error: "dispatch launch failed: …" (server.ts:225-234) onto a task that is in fact claimed with a live, running session — the task record actively misstates the state of the work.

This also contradicts the README contract for POST /v1/sessions: "a task is never left queued for a session that launched, nor claimed without a session id" — the cancel path leaves a launched session with a cancelled task, which is the mirror-image violation.

Evidence

  • Code trace at main 732ca26 (file:line above): prompt is sent BEFORE the claim PATCH, the claim PATCH precedes the unguarded comment/label calls, and both caller paths treat a post-claim throw as launch failure. The guarded assignLane block (server.ts:148-158) shows the intended pattern for post-launch steps.
  • No test covers launchSession's failure ordering: pm-stack/dispatch/test/ contains only auth.test.ts, packet.test.ts, validate.test.ts — server.ts/queue.ts/github.ts have no tests.

Why it matters

pm-dispatch is the fleet's authenticated launch intake (merged 2026-10-30, PRs #2652/#2655/#2658). A transient GitHub failure at the last step converts a healthy, running session into a cancelled tracking task + a 502 that invites a duplicate dispatch of the same prompt — exactly the double-booking the service exists to prevent.

Acceptance criteria

  • A failure in the post-claim issue comment or label calls does NOT cancel the task and does NOT change the success response: the launch still returns 201/claimed (wait:true) with the failure surfaced as a warning and/or recorded on the task (e.g. last_error/progress note), mirroring the existing assignLane guard.
  • In the wait:false path, a post-claim note/label failure is not recorded as "dispatch launch failed" on a claimed task.
  • Cancellation + 502 remains reserved for failures before/at the actual launch and claim (session create, prompt send, claim PATCH).
  • A test (stubbed GitHub client failing on comment/addLabels after a successful claim) pins the behavior for both wait modes.
  • Existing dispatch tests still pass.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    effort/xsTrivial: expected under 30 minutes of work
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Oct 30, 2026
  2. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane B, new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run 2026-10-30 04:20 CDT
    • Found via: filed this run
    • Task: Triage the post-claim failure ordering in pm-dispatch launchSession (server.ts): pin that post-claim GitHub note/label failures warn instead of cancelling a live session's task, then route a small_fix packet.
    • Expectation: effort/xs — done looks like the acceptance criteria on this issue being pinned and a fix packet routed.
    • Links: evidence in the issue body (file:line at main 732ca26); probe notes in the creator backlog entry.
  3. dezren39
    added a parent issue on Oct 30, 2026
    • design(pm-dispatch): launch pipeline, staged — validate the whole request at the boundary, one commit point, nothing after it can fail the launch #2668
  4. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Oct 30, 2026
  5. dezren39 commented on Oct 30, 2026

    @dezren39
    dezren39
    on Oct 30, 2026
    MemberAuthor
    More actions

    agent-note:v1 — design-architect adoption (pass 19, 2026-10-30): this issue is Phase 2 (commit point) of design #2668, "pm-dispatch launch pipeline, staged". Design doc: files/designs/code-pm-dispatch-launch-pipeline.md in the keep-the-four-repos-healthy goal workspace.

    Recorded decision for triage (do not re-file, re-scope, or split this issue; record the phase structure instead): the claim PATCH is the launch's commit point. Every step after it (lane ledger — already conforming; issue comment; issue labels) is individually guarded: a failure is recorded as a response warning (wait: true) and a task note phrased as an annotation failure with the launch unaffected, and the remaining annotation steps still run. cancelTask + 502 stays correct only for failures at or before the commit point; the wait: false continuation stamps dispatch launch failed only for pre-commit failures. This phase also carries the truth-up: the README flow section gains the stage/failure table and its invariant sentence extends to "nor claimed-and-running reported as failed".

    This issue already carries a queued triage packet; no new packet was enqueued by the architect.

  6. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  7. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  8. 9 remaining items

  9. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  10. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: handed off

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e69850e4cffe0Uz3xXzb37V1 / triage task 3897 → small-fix task 5414
    • Found via: repo-health-code-pilot atomic claim
    • Task: Current main contains the merged PR fix(pm-dispatch): wait:false launch failure cancels the task and notes the issue (#2901) #2911 fix, so post-claim GitHub failures no longer reject/cancel the live launch. However, the settled phase-2 decision in the earlier design comment requires independent guards, continued annotation attempts, and a wait:true response warning; current code shares one try/catch and only records last_error.
    • Expectation: Follow-up fix stays on this issue (no duplicate issue/split); it adds independent annotation handling and wait-mode tests while preserving pre-commit failure behavior.
    • Links: PR fix(pm-dispatch): wait:false launch failure cancels the task and notes the issue (#2901) #2911 fix(pm-dispatch): wait:false launch failure cancels the task and notes the issue (#2901) #2911 · fix task 5414 in repo-health-code-pilot
  11. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  12. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Lane E claimed task 5414: implementing the settled design — post-claim issue comment and label annotations independently guarded, each failure recorded as a task note, wait:true success responses carry a warning, remaining annotation steps still run. Worktree on laptop, branch queue/5414-2660-guard-post-claim-annotations.

  13. dezren39
    added a commit that references this issue on Nov 2, 2026

    Merge pull request #4231 from developing-today/queue/5414-2660-guard-…

    9456d01
  14. dezren39
    closed this as completedin #4231on Nov 2, 2026
  15. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Done: PR #4231 merged (merge commit 9456d01); issue #2660 closed by the merge. Post-claim comment/label annotations are now independently guarded via annotateLaunch, failures noted on the task and surfaced as wait:true warnings, remaining steps still run; README stage/failure truth-up included. bun test 105 pass; Codex review on head 8500d47 clean.

  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 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/codeeffort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

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.