GeezerVison is showing github.com — pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 · Issue #6992 · developing-today/code
pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 #6992DescriptionProblem
The pm-dispatch service answers HTTP 502 to both of its write endpoints, and has for at least four consecutive days. Every consumer that dispatches through it is dead, including its own failure-recovery path.
Evidence (verified fresh 2026-11-08T00:25Z, gh run logs)
Jules Daily Upstream Sync (OpenChamber) in developing-today-forks/openchamber, scheduled runs on main:
- 2026-11-04 run 41828572424:
pm-dispatch-start: pm-dispatch POST /v1/sessions failed (HTTP 502); failure-queue step POST /v1/tasks also 502.
- 2026-11-05 run 42028456274: identical 502 pair.
- 2026-11-06 run 42216683583: identical 502 pair.
- 2026-11-07 run 42367237603: identical 502 pair.
Setup and checkout pass; the dispatch step is the first failure. Because POST /v1/tasks 502s too, the workflow cannot even queue its own failure follow-up — the failure is silent unless someone reads the run logs.
Impact
Acceptance
Filed by the openchamber queue worker (lane openchamber-b) escalating the repeated pattern, per the resume instruction recorded on openchamber#1450 (2026-11-05): "if dispatch 502s recur, escalate the repeated infrastructure pattern rather than editing this repository." Activitydeveloping-today commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 dezren39 commented on Nov 8, 2026 🤖 Agent note · done
Triage verdict: not reproducing on current state (2026-11-08T01:12Z), fault hop narrowed.
Verified fresh from the laptop, twice (local + public paths):
pm-dispatch.service is running (bun, src/server.ts) and listening on 127.0.0.1:4879 and the tailnet address. Local GET /health → 200; local unauthenticated POST /v1/sessions → 401 missing bearer (the designed auth response, not a 502).
- Public path consumers actually use —
https://dispatch.security.cab via pm-tunnel.service (Cloudflare Tunnel, running): GET /health → 200 ok; unauthenticated POST /v1/sessions → 401, i.e. the request reaches the service.
- So right now neither write endpoint 502s at the transport/auth hop. An authenticated end-to-end dispatch was NOT attempted in triage (it would launch a real session).
What this rules in/out: the Nov 4–7 502s did not come from the endpoint code paths exercised above; the answering hop in that window was the proxy/tunnel/upstream side (the service process answers correctly today). Root cause for the historical window is not provable from current state — if the 502 recurs, capture pm-tunnel.service and pm-dispatch.service journals at the failing run's timestamp before restarting anything.
Ordering / next proof: acceptance on issue #6992 still requires a green scheduled Jules Daily Upstream Sync (OpenChamber) run (or equivalent live dispatch). That run is the deciding evidence: green → issue #6992 and openchamber#1450 / openchamber#1570 can close; another 502 → escalate with the tunnel journal from that timestamp. Not converted to a small_fix packet: no code defect is identified — this is an infrastructure availability pattern, and inventing a code fix would be manufacturing work.
dezren39 commented on Nov 8, 2026 🤖 Agent note · triage findings for task 11437
- Agent: queue worker (repo-worker-code, lane code-n)
- Session / ID: task 11437
- Found via: queue claim
- Task: Triage issue pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 #6992 — identify which hop answers HTTP 502 for pm-dispatch
POST /v1/sessions / POST /v1/tasks.
- Expectation: met for triage — hop identified with live evidence below; the fix is routed to a follow-up task, and the acceptance's green-run proof is still outstanding (nothing has been fixed yet — the path is currently up on its own).
Which hop answers 502: the Cloudflare edge, when the tunnel has no live connector
The dispatch application never emits 502. Verified live 2026-11-07 ~19:00 CST from two networks (sandbox + laptop):
GET https://dispatch.security.cab/health → 200 {"ok": true, "status": "ok", "version": "d94b895…"} — the same version the loopback bind reports.
- Unauthenticated
POST https://dispatch.security.cab/v1/sessions and /v1/tasks → 401 {"error": "missing bearer token"} — the app's own JSON error shape, reached through the full public path (Cloudflare → pm-tunnel → pm-dispatch on port 4879). The workflow's actions call exactly this hostname (vendored pm-dispatch-start/action.yml line 143).
- Both laptop units are up with long-lived processes:
pm-dispatch.service running since 2026-11-06 01:14:15 CST (bun, port 4879 loopback + tailnet), pm-tunnel.service since 01:14:11 CST. Those start times are BEFORE the Nov 6 (06:18 CST) and Nov 7 (05:12 CST) failures — so the path recovered without any restart, and no code change explains the recovery.
In the failure windows, the requests never reached the laptop. For the Nov 6 06:18 CST and Nov 7 05:12 CST windows (and the matching Nov 4/5 morning windows), journalctl --user for BOTH pm-tunnel.service and pm-dispatch.service contains no entries at all — no request, no error, no reconnect. A 502 under those conditions is generated by the Cloudflare edge itself when no tunnel connector is connected/able to serve — the edge is the answering hop; the aggregator/upstream (dispatch app, OpenCode server) is never reached, which is also why the failure-queue POST /v1/tasks fails identically.
Contributing evidence — the laptop's network is not ready when these units start, and the resolver flakes: at the current boot (2026-11-06 01:13 CST), pm-dispatch first crashed with EADDRNOTAVAIL in Bun.serve (server.ts:663 — the tailnet address 100.99.113.103 was not yet assigned when the unit started; systemd restart counter reached 4 before it bound cleanly at 01:14:15), and cloudflared logged repeated DNS failures against the local resolver (lookup _v2-origintunneld._tcp.argotunnel.com on 127.0.0.53:53: server misbehaving — edge discovery failing) before connecting at 01:14:11. The tunnel journal also shows repeated edge-connection churn later on Nov 6 (14:00/14:27 CST: "connection with edge closed", "client disconnected").
Evidence limit, stated plainly: the retained journal starts at the 2026-11-06 01:13 boot (journalctl --list-boots shows only that boot), so the Nov 4 and Nov 5 failures cannot be proven from this machine — the boot-time pattern above is the demonstrated mechanism for this failure class, not a proven cause for those two days.
What remains (acceptance)
Routed fix (follow-up task enqueued from this triage)
Harden the pm-stack laptop units against network-not-ready startup and silent tunnel death, in developing-today/code (nixos/services/pm-stack + pm-stack/dispatch): pm-dispatch should not crash-loop on a missing tailnet bind (wait/retry for the address, or bind after tailscale readiness), pm-tunnel should be resilient to the local resolver failing at start, and an OUTSIDE health probe of https://dispatch.security.cab/health should alert when the public path is down — today the only detector is the next morning's failed workflow run. Task 11437 completes as triaged.
dezren39 commented on Nov 8, 2026 🤖 Agent note · correction to the task 11437 findings note above
- Agent: queue worker (repo-worker-code, lane code-n)
- Session / ID: task 11437
- The triage findings in pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 #6992 (comment) stand as written. Two bookkeeping facts to correct/complete them:
- The routed follow-up is task 11451 (small_fix: harden pm-dispatch/pm-tunnel startup + outside health probe for dispatch.security.cab), enqueued and queued.
- The queue claim on task 11437 was lost before its terminal verb landed (checkpoint and complete both returned the verdict "task 11437 is not claimed by repo-worker-code" at ~01:05Z, ahead of the 01:42Z lease expiry — presumably reclaimed by the fleet's reconciliation). So task 11437 does NOT carry my
triaged completion; whoever holds it now: the work is done on this issue — findings posted, follow-up task 11451 enqueued — and the task can be completed as triaged with follow_up_task_ids [11451] without repeating the investigation.
dezren39 commented on Nov 26, 2026 OpenChamber recurrence (2026-11-26): Jules Daily Upstream Sync run 45837017849 (schedule, main, SHA 3719511b1e993091fe82eabfc655895994624c4d) failed at pm-dispatch: POST /v1/sessions returned HTTP 502 and the fallback POST /v1/tasks also returned HTTP 502. This is the shared pm-dispatch failure tracked here; the workflow-specific tracker remains openchamber#1450. No duplicate issue/task filed. dezren39 commented on Nov 26, 2026 🤖 Agent note — live deploy recheck (lane oc-code-04, 2026-11-26)
Task 22901 rechecked the served deployment and public path. fleet dispatch status reports HTTP-successful service health at version nix-fk6a8b77681h (direct local transport); https://dispatch.security.cab/health returns 200 with that same version. This is still the pre-#13377 build (a752545c8f8b9038a5da45500741a7c82fad6a3d), so acceptance item 1 is unmet. Unauthenticated public POST /v1/sessions returns the expected 401 missing bearer credential; that proves reachability only, not an authenticated full-chain dispatch.
Latest recurrence comments already report POST /v1/tasks HTTP 502 at 16:09Z and 16:18Z today. I did not trigger the manual workflow against the stale served build. No code changes and no duplicate tasks/issues. Recheck the served version after 2 hours; once #13377 is served, trigger the manual workflow and record its full-chain outcome. On recurrence, capture per-leg LaunchLog evidence as specified in task 22901. dezren39 commented on Nov 26, 2026 Main-CI watch recurrence (2026-11-26): Daily Codebase Innovation & Maintenance run 45859891405 failed job codebase-ideation-and-maintenance, step Run Codebase Innovation & Review Agent via pm-dispatch: POST /v1/sessions HTTP 409, task 24292 no longer queued; another worker holds it. Fresh queue read confirms 24292 CLAIMED by repo-worker-code (lease until 20:36:21Z), so the requested work actually has a live lane. Reuse this shared dispatch collision track for the workflow defect; task 24292/#15656 remains the maintenance work, not a duplicate fix. No duplicate issue/task/session or blind retry. dezren39 commented on Nov 26, 2026 Main-CI watch recurrence (2026-11-26): Code run 45859891405, workflow Daily Codebase Innovation & Maintenance, failed at Run Codebase Innovation & Review Agent via pm-dispatch: POST /v1/sessions returned HTTP 409 (task 24292 is no longer queued; another worker holds it). This is the shared pm-dispatch collision family already tracked here; no duplicate issue/task/session. dezren39 commented on Nov 26, 2026 🤖 Agent note — live deploy recheck (lane DH, 2026-11-26)
Queue task 22901 rechecked the served deployment at ~20:20Z (after the prior 2-hour park expired at 20:16:43Z):
Served build is still the pre-#13377 build nix-fk6a8b77681h, so criterion 2's served-build half remains unmet. No manual pm-dispatch workflow was triggered against the stale build (prior recurrences already show POST /v1/sessions and /v1/tasks 502 on this build, most recently 17:44Z today), and no duplicate issue/task was created. No code changes.
Resume condition (non-person): recheck served version after 2 hours; only trigger the manual workflow once the service reports the #13377 build, then record the green full-chain dispatch (or per-leg LaunchLog attribution on a 502 recurrence) here. developing-today-fleet commented on Nov 26, 2026 🤖 Agent note — code-f live recheck (task 22901, 2026-11-26)
developing-today-fleet commented on Nov 26, 2026 Main-CI watch recurrence (same pm-dispatch 502 family, no new task/session).
developing-today commented on Nov 27, 2026 1952-M evidence — queue task 22901 live-proof recheck (2026-11-26 20:05 CST / 2026-11-27T02:05Z, bravo SUSTAIN)
Fresh firsthand reads:
- Public health just now:
GET https://dispatch.security.cab/health → HTTP 200 {"ok":true,"status":"ok","version":"nix-554wzr00b3jb"} — served version UNCHANGED from the 22:24Z code-f recheck (comment 7204647212). The version string still exposes no deployed source SHA, so the deployed-fix(pm-dispatch): bound the gh subprocess, log launch legs, probe sessions at the server cap #13377 proof (PR fix(pm-dispatch): bound the gh subprocess, log launch legs, probe sessions at the server cap #13377 merged at a752545c8f8b9038a5da45500741a7c82fad6a3d) remains unestablished.
- Direct check from this seat:
fleet dispatch status → tunnel to pm-dispatch not permitted from the sandbox (Operation not permitted) — public health is the available served-state evidence.
- New recurrence since the version change: 2026-11-26T22:51Z openchamber main run 45907374316 —
pm-dispatch POST /v1/sessions HTTP 502 on attempts 1-3, then failed (comment 7205224527, tracker openchamber#1642). So the new build has already produced a 502 in a live chain; no green full-chain dispatch exists yet.
- Issue pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 #6992: OPEN, labels kind/bug, status/triaged, queue/parked — no live competing claim in its comments beyond this task's own rechecks; no Drew-decision gate.
Disposition: task 22901 PARKED (recheck). Manual workflow was NOT triggered: acceptance requires first verifying the service serves #13377, which the unmapped version string cannot establish, and triggering against an unverified build that 502'd at 22:51Z would not produce the required green proof. Ready condition: served version changes from nix-554wzr00b3jb or a deployed-SHA mapping is exposed, AND no 502 recurrence after that change — then trigger the manual pm-dispatch workflow and record the green full-chain dispatch (or per-leg LaunchLog attribution) here. developing-today-fleet commented on Nov 27, 2026 agent-note:v1 — recurrence (main-ci watch)
New main-branch failure run https://github.com/developing-today/code/actions/runs/45939985133 — workflow pm-dispatch, branch main, event workflow_dispatch, head SHA cccb4ef, completed 2026-11-27T04:43:03Z. Failed job: manual (job 140311842329) at step 'Dispatch manual prompt via pm-dispatch': pm-dispatch POST /v1/sessions failed with HTTP 502 (error code: 502 in the failed-step log).
This was the manual live-proof dispatch for this very issue (queue task 22901): the proof run itself hit the same 502 family. Deduped to this tracker; task 22901 remains live (CLAIMED, lease to 2026-11-27T08:25:38Z). No duplicate issue/task/session. developing-today-fleet commented on Nov 27, 2026 agent-note:v1 — recurrence (main-ci watch)
New main-branch failure run https://github.com/developing-today/code/actions/runs/45973638553 — workflow agents, branch main, event schedule, head SHA 725dfe2, completed 2026-11-27T09:29:47Z. Failed job: scheduled / run (job 140419869550) at step 'Dispatch bolt': pm-dispatch POST /v1/sessions failed with HTTP 502 after 4 attempts (attempts at 09:26:54Z, 09:27:36Z, 09:28:26Z, final error 09:29:42Z, exit 1).
Deduped to this tracker (shared pm-dispatch outage); this issue is OPEN (re-verified this pass). No duplicate issue/task/session; live fix retained. developing-today-fleet commented on Nov 27, 2026
🤖 Agent note — live proof and 502 attribution (task 22901, 2026-11-27)
- Public health and direct
fleet dispatch status agree on active service version nix-2wny9rsrrsa3 (HTTP 200). The active pm-dispatch.service ExecStart points at package /nix/store/ci4ygn0j2zg7x40gkw158p9hhhdy96ap-pm-dispatch-0.1.0; its deployed source contains the fix(pm-dispatch): bound the gh subprocess, log launch legs, probe sessions at the server cap #13377 bounded GitHub subprocess behavior and the /v1/sessions and /v1/tasks LaunchLog instrumentation. The package has later source changes, so full file hashes do not equal merge commit a752545c.
- Main scheduled run 45973638553 tried
POST /v1/sessions four times at 09:26–09:29Z; each got HTTP 502. The live service journal recorded per-request totals and legs:
- 09:26:54Z: total 50,917ms; issue 1,255ms; enqueue 860ms; worktree 29,919ms; session 515ms; task 26176.
- 09:27:36Z: total 36,734ms; issue 941ms; enqueue 1,112ms; worktree 13,534ms; session 829ms; task 26177.
- 09:28:26Z: total 34,596ms; issue 1,065ms; enqueue 920ms; worktree 12,852ms; session 1,021ms; task 26178.
- 09:29:42Z: total 46,435ms; issue 1,327ms; enqueue 861ms; worktree 11,258ms; session 78ms; task 26179.
- The
task= suffix is the created task ID, not a leg duration. All four requests got through issue/enqueue and session creation, then returned 502 before the claim phase was logged. The exact failing subcall inside that phase is not identified by the current logs. The associated queue tasks 26176–26179 are all cancelled, with no live claims.
- Cleanup emitted a separate warning for each retained worktree: OpenCode session listing reached the maximum completeness limit (200), so cleanup could not prove a worktree unoccupied. This is confirmed as a cleanup-safety limitation, not proven as the 502 cause.
No new workflow was dispatched: the post-deploy scheduled run already exercised the full live path and produced leg-attributed 502 evidence, satisfying the packet's recurrence alternative. A green full-chain dispatch remains unobserved; #6992 stays open for the unresolved post-session/claim failure. developing-today-fleet commented on Nov 27, 2026 agent-note:v1
state: deduped recurrence
Found via: main-ci watch (2026-11-27 16:00 CST pass)
Recurrence of the tracked pm-dispatch outage on a late-completing run:
developing-today-fleet commented on Nov 28, 2026
state: deduped recurrence
Found via: main-ci watch (main-ci-failure-fix-trigger)
Recurrence of the pm-dispatch outage tracked here: main-branch run 46126928484 (agents, schedule, head SHA 61026d4, completed 2026-11-28T08:44:12Z) failed job scheduled / run at step Dispatch bolt — pm-dispatch POST /v1/sessions HTTP 502 after 4 attempts (attempts at 08:41:34Z, 08:42:12Z, 08:43:04Z, final failure 08:44:09Z, error code: 502).
This run was late-completing (id below the watch watermark, still running at the prior pass). Deduped to this live track — no duplicate issue, queue task, or dispatch session filed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|