Repository navigation
Description
Filed from fleet epic #5412 step 4 (#5432, the dispatch thin client), per that step's rule: interface gaps found while building the verbs are filed against pm-stack, not absorbed into the client.
Gap 1 — no read/status endpoint on pm-dispatch
pm-stack/dispatch/src/server.ts exposes exactly three routes: GET /health (unauthenticated), POST /v1/sessions, POST /v1/tasks. A caller that launched or enqueued work has no way to ask pm-dispatch about it afterwards — no GET /v1/tasks/<id>, no GET /v1/sessions/<id>. The thin client shipped in #5432 therefore answers "what happened to task N?" by crossing domains into the queue (fleet queue list / the queue store), which works but couples every dispatch caller to queue internals and to a second credential path.
A minimal fix on the pm-stack side would be one authenticated read route reusing the existing auth (authenticate() already gates the POSTs), e.g. GET /v1/tasks/:id returning the task row's status/worker/progress (the row dispatch itself created and claimed), and ideally GET /v1/sessions/:id proxying the session's existence/state from the OpenCode server. Read-only, no new write surface.
Gap 2 — DISPATCH_API_TOKEN had no by-name vault home (already fixed in the vault; recorded for the docs)
The dispatch README states pm-stack's secrets are filed in Bitwarden/1Password under dotted names. The bearer token was the exception: it existed only in the laptop's ~/secrets/dispatch.env, so the fleet-secrets resolver chain (the fleet's one secrets-by-name path) could not resolve it for a client. It has been filed in Bitwarden as pm-dispatch.api-token (value verified byte-identical to the service's, by hash) as part of #5432. The durable part of this gap is documentation: pm-stack/dispatch/install.sh / the dispatch README should name the token's vault home alongside the other pm-stack secrets so a future rotation updates both places.
Not gaps (checked and fine)
- Auth shapes: the static bearer is sufficient for local clients; GitHub Actions OIDC remains the CI form.
- Dedupe:
POST /v1/taskswith a consumeddedupe_keyreturns the pre-existing task withpre_existing: true— exactly what a thin client needs. - The design note for the fleet epic claimed a rendered state dir at
~/.local/state/pm-dispatch/; none exists. Not a pm-stack defect — the note was wrong; corrected on fleet step 4: dispatch thin client domain over pm-stack #5432.
Acceptance criteria
- pm-dispatch exposes an authenticated read route for a launched/enqueued task (and ideally a session) returning status/worker/progress
- The dispatch README / install docs name the
pm-dispatch.api-tokenvault home alongside the other pm-stack secrets - A thin client can answer "what happened to task N?" from pm-dispatch alone, without crossing into queue internals
Activity
dezren39 commentedon Nov 4, 2026
Intake review
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
245 remaining items
dezren39 commentedon Nov 11, 2026
agent-note:v1
state: in-progress
lane: code-c (task 10962)
issue: #5555 — PR: #8053
Picked up task 10962 resuming from checkpoint targeted_tests_passed: PR #8053 (head 3025e03) already implements the read/status endpoints; bun test 188 pass recorded, all 8 CodeRabbit threads fixed and resolved. Fresh revalidation this shift: issue #5555 OPEN, no hard-stop labels; PR #8053 OPEN; all 7 CI checks still QUEUED (repo-wide runner stall).
Remaining step found on fresh review: one unresolved Codex P2 on the current head — the session repo gate relies only on the live progress.session_id binding, which the queue clears on park/lease-expiry (migration-0023), so a session whose repo leaves the allowlist could stay readable. Fixing in-PR: findTaskBySessionId will also match the durable progress.session_cleared binding the queue preserves on the task row, then re-run dispatch tests, disposition the Codex thread, and merge under standing authority once verified.
fix(pm-dispatch): keep session repo gate after the queue clears the l…
dezren39 commentedon Nov 11, 2026
agent-note:v1
state: done
lane: code-c (task 10962)
issue: #5555 — PR: #8053
fixed_merged d555a80 — PR #8053 MERGED (head fafcc12). pm-dispatch now serves authenticated GET /v1/tasks/:id (safe status projection, never the payload) and GET /v1/sessions/:id, with README/install.sh naming Bitwarden item pm-dispatch.api-token as the token source of truth.
This shift's closing work: the one unresolved Codex P2 on head 3025e03 — the session repo gate matched only the live progress.session_id binding, which the queue clears on park/lease-expiry — is fixed in fafcc12: findTaskBySessionId falls back to the durable progress.session_cleared.session_id record migration-0023 preserves on the task row, still failing closed on lookup errors. Codex thread replied + resolved; 0 unresolved threads at merge. Verification: bun test 190 pass (2 new tests for the fallback + fail-closed path), bunx tsc --noEmit clean (this PR's head previously had 4 pre-existing fetch-stub cast errors, fixed in the same commit). GitHub CI checks never started (repo-wide runner stall, all QUEUED); main CI exercises the merge when the stall clears. Closing #5555 as complete.