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 — fix(pm-dispatch): launch-failure note says a session 'may still be live' even when its cleanup succeeded — and the cleanup-success path has no test · Issue #10632 · developing-today/code

fix(pm-dispatch): launch-failure note says a session 'may still be live' even when its cleanup succeeded — and the cleanup-success path has no test #10632

New issue
Copy link
New issue
Copy link
Closed
#10634
Closed
fix(pm-dispatch): launch-failure note says a session 'may still be live' even when its cleanup succeeded — and the cleanup-success path has no test#10632
#10634
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Finding

Merged PR #4350 made dispatch clean up orphaned OpenCode sessions after a failed launch: handleLaunchFailure cancels the queue task, DELETEs the created session, then posts a note on the issue. The note is composed after the cleanup outcome is known, but both of its session wordings lead with the same hedge:

  • cleanup succeeded: OpenCode session <id> may still be live; session cleanup succeeded.
  • cleanup failed: OpenCode session <id> may still be live; session cleanup failed: <error>

When the DELETE succeeded, "may still be live" is simply wrong — the session was deleted by the handler itself moments earlier. An operator reading the note on the issue cannot tell from its first clause whether a live session needs hunting down, which is exactly the orphan-session ambiguity #3009 (closed by #4350) existed to remove. The cleanup-success branch is also the one branch of the new code with no test: the test suite's deleteSession stub always throws, so only the cleanup-failure wording is pinned.

Evidence

  • PR fix(pm-dispatch): clean up orphaned launch sessions #4350 (MERGED, merge commit dff881b8b1c2b64cd637c9a46f1f5080f684233b, commit 076822dd9), closes pm-dispatch(sessions): a failure between createSession and the claim PATCH orphans a live OpenCode session — task cancelled, 'launch FAILED' noted, session id recorded nowhere #3009: fix(pm-dispatch): clean up orphaned launch sessions #4350
  • Still on current main (91df8555386eb8347ce4f0842c396be42e44cfa4): pm-stack/dispatch/src/launch_failure.ts:127 — `OpenCode session ${sessionId} may still be live; session cleanup succeeded.` (cleanup-failure twin at :128). The note is built at :123-128, after deleteSession has run at :106-115 (cancel → delete → note order), so the outcome is known when the wording is chosen.
  • The cancel reason (launch_failure.ts:102, written before the DELETE runs) legitimately says "may still be live" — at that point it is true. Only the post-cleanup issue note misreports.
  • Test gap on main: pm-stack/dispatch/test/launch_failure.test.ts — the shared failure harness's deleteSession stub (line ~104) always throws delete failed; the only session-note assertion (line ~165) pins "session cleanup failed: delete failed". No test exercises a successful deleteSession, so the success wording is unpinned. PR fix(pm-dispatch): clean up orphaned launch sessions #4350's own evidence lists the same five cases (prompt/claim failures, ordering, cleanup failure, original-error preservation) — no cleanup-success case.

Why it matters

The issue note is the operator's record of whether a failed dispatch left a live OpenCode session behind. A note that claims a deleted session "may still be live" sends operators hunting for orphans that do not exist, and trains readers to ignore the warning in the failure case where it is real. It also leaves the one untested branch of the #4350 cleanup path free to drift.

Acceptance criteria

  • When session cleanup succeeds, the issue note states the session was deleted (or otherwise drops the "may still be live" claim for that branch); the "may still be live" wording remains only where cleanup failed or no deletion callback was available.
  • A test covers the cleanup-success path: deleteSession resolves, and the note's session wording is asserted (and the cancel-before-delete-before-note ordering still holds).
  • Existing launch-failure tests keep passing (bun test test/launch_failure.test.ts).

Shadow verdict (PoC)

Stage A window already closed (summary on #2313) — no shadow verdict recorded.

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/pr-diff-reviewFiled by the pr-diff-review job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 16, 2026
  2. developing-today commented on Nov 16, 2026

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

    CODE-3859

  3. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: pr-diff-review-b
    State: filed
    Repo: developing-today/code
    Source PR: #4350 (MERGED, commit 076822d, merge dff881b, ancestor-verified on main, compare behind=0) — closes #3009 (CLOSED, verified)
    Finding: PR #4350's handleLaunchFailure composes the issue note after session cleanup runs, but the cleanup-success branch still reads "OpenCode session may still be live; session cleanup succeeded." (pm-stack/dispatch/src/launch_failure.ts:127 on main) — a deleted session reported as possibly live. The cleanup-success branch is also untested: test/launch_failure.test.ts's deleteSession stub always throws, so only the cleanup-failure wording is pinned.
    Verified against main: 91df855 (raw-file read of launch_failure.ts :102/:127-128 and launch_failure.test.ts deleteSession stub/assertions; dedupe: gh search "may still be live" returned only closed #3009; "launch failure session cleanup note" returned nothing)
    Evidence: hidden_files/pr-review-b-2026-11-16-0118-code/issue-launch-failure-note-body.md + pr-4350.diff + pr-4350.json

    kind/bug,task/triage,status/needs-triage,source/pr-diff-review,priority/low,queue/queued,app/pm-stack

  4. 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 16, 2026
  5. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code/code-j (openchamber-scheduled-lane)
    State: picked_up
    Task: 17423 (triage)
    Claim: 2026-11-16T07:51:03Z, lane code-j
    Verified so far: issue OPEN; PR #4350 MERGED; success-branch wording at pm-stack/dispatch/src/launch_failure.ts:127 and always-throws deleteSession stub in pm-stack/dispatch/test/launch_failure.test.ts confirmed on main 91df855. No competing PR or branch for this fix.
    Next: verify evidence, route small_fix follow-up, complete triage.

  6. 4 remaining items

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

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code/code-j (openchamber-scheduled-lane)
    State: picked_up
    Task: 17424 (small_fix, follow-up of triage 17423)
    Claim: 2026-11-16T07:54:04Z, lane code-j
    Next: worktree + branch, wording fix at launch_failure.ts:127, cleanup-success test, targeted bun tests, PR.

  9. dezren39
    added a commit that references this issue on Nov 16, 2026

    fix(pm-dispatch): note deleted session as deleted on cleanup success (#…

    32d7129
  10. developing-today
    added
    status:in-review
    on Nov 16, 2026
  11. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code/code-j (openchamber-scheduled-lane)
    State: pr_opened
    Task: 17424 (small_fix)
    PR: #10634 (branch queue/17424-10632-launch-note-wording, commit 32d7129)
    Tests: bun test test/launch_failure.test.ts — 9 pass, 0 fail.
    Next: watch CI; merge under standing criteria when green.

  12. dezren39
    added a commit that references this issue on Nov 16, 2026

    Merge pull request #10634 from developing-today/queue/17424-10632-lau…

    f2b4512
  13. dezren39
    closed this as completedin #10634on Nov 16, 2026
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 16, 2026
  15. dezren39 commented on Nov 16, 2026

    @dezren39
    dezren39
    on Nov 16, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code/code-j (openchamber-scheduled-lane)
    State: done
    Task: 17424 (small_fix)
    PR: #10634 MERGED (merge f2b4512, 2026-11-16T07:58:35Z)
    Tests: bun test test/launch_failure.test.ts — 9 pass, 0 fail. Checks on merge commit: only CodeRabbit neutral; mergeStateStatus CLEAN at merge time.
    Change: cleanup-success note now states the session was deleted; hedge kept for failure/no-callback branches and the pre-DELETE cancel reason.

  16. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 16, 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

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobstatus: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

      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.