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-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449) · Issue #9028 · developing-today/code

pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449) #9028

New issue
Copy link
New issue
Copy link
Closed
#10986
Closed
pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449)#9028
#10986
Copy link
Assignees
dezren39
Labels
effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivequeue/blockedQueue or user escalation statestatus/blockedQueue or user escalation statetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsuser/escalatedRequires a Drew decision or accesswork/assignedQueue worker lifecycle state

Description

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

agent-note:v1 — filed by queue task 15303 (lane any-c) as required disposition (b) of the Phase 4 closing inventory on #6449 (design #6448). Filed, not silently fixed, per that issue's acceptance criteria.

pm-stack/dispatch is a direct PostgREST producer that bypasses the packet validator and the queue broker (Phase 4 disposition (b) of #6449)

Finding

Design #6448 decision 2 left the SQL layer unchanged because every evidenced path into the queue passed through the validator or the broker. The Phase 4 inventory searched the repo and the claimant for direct producers and found one:

  • pm-stack/dispatch/src/queue.ts — QueueClient.rpc() POSTs directly to ${baseUrl}/rest/v1/rpc/${name} with the service-role key. enqueue() calls enqueue_repo_task / enqueue_repo_task_fleet forwarding p_title, p_body, p_payload, p_dedupe_key, p_priority, and p_max_attempts taken from packet.payload.max_attempts — with NO validate_packet pass: an unvalidated max_attempts, priority, not_before-class value, or mistyped payload field reaches the RPC exactly as the pre-Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 gap allowed.
  • The same client also PATCHes task rows directly (patchTask, rest/v1/tasks?id=eq.<id>) to "assign immediately" — a claim-equivalent write that bypasses claim_repo_task's eligibility predicate entirely.
  • It is wired live in code: pm-stack/dispatch/src/server.ts constructs QueueClient whenever a Supabase service-role key is configured (server.ts:51) and enqueues through it (server.ts:241, server.ts:503); launch_annotations.ts:53 uses patchTask.

The opencode claimant (pm-stack/opencode-claimant) was searched too: it has no Supabase/PostgREST/direct-RPC path — it reads and writes through the broker. No other direct producer was found in the repo (searches for the RPC names, rest/v1/rpc, rest/v1/tasks outside pkgs/fleet/crates/fleet-queue).

What this reopens

Per #6449 disposition (b): only a found direct producer reopens the SQL-guard question, and it is filed, not fixed in Phase 4. The open questions for this follow-up:

  1. Is pm-dispatch still deployed with a service-role key against a live queue store? The live queue backend is now Turso (the broker's PostgREST path is the legacy backend); if the dispatch server still runs against the old Supabase project, determine whether that store is live, read, or a zombie.
  2. If it is live: route its enqueue through the broker (or run validate_packet semantics before the RPC) and replace the claim-PATCH with a broker claim path; if the SQL layer becomes the only guard for a live path, the migration-guard question from Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 decision 2 is back on the table with this evidence.
  3. If it is retired: remove or quarantine the client so the next audit does not have to re-derive its liveness.

Evidence

Audit at code origin/main d7ad9d0, recorded in full on #6449 by task 15303. File:line — queue.ts rpc() (:72), enqueue() (:92), patchTask() (~:115); server.ts:51,241,503.

Activity

Next
  1. developing-today commented on Nov 12, 2026

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

    CODE-2760

  2. github-actions
    assigned
    dezren39
    on Nov 13, 2026
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up + triaged

    • Agent: queue worker (repo-worker-code), lane any-g
    • Session / ID: task 18812
    • Found via: repo-health-code-pilot atomic claim (unfiltered, lane any-g); execution-lane assignment: direct (fix(queue): single-session by default — launch-on-handoff, lane works, inline triage (reverses #8097 Rule 3) #8187)
    • Task: Triage issue pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449) #9028: pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449)
    • Fresh verification (2026-11-17): issue pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449) #9028 OPEN; it carried no labels at all (never triaged; one Kaneo-link comment). No hard-stop labels. The filed finding matches current origin/main exactly: pm-stack/dispatch/src/queue.ts still POSTs enqueue_repo_task/enqueue_repo_task_fleet via rpc() (:85–108) and PATCHes rows via patchTask() (:129) with the service-role key; server.ts constructs QueueClient whenever the key is configured.
    • Verdict: work kind task/small-fix · priority/high · effort/m · kind/bug (labels applied this run, plus status/triaged and queue/queued for the follow-on).
    • Priority why: priorities-brief line 1 adjacent — fleet infrastructure integrity. A live producer bypasses the queue's validator and writes launch tasks to a store no lane reads: silent task loss on the PM dispatch surface. Not band 10 (lane operation itself is unaffected); the follow-on sits at queue priority 20.
    • The issue's question 1, answered with this run's evidence — the producer is LIVE, not retired:
      • pm-dispatch.service is loaded, active, and running on the laptop (NixOS-packaged pkgs/pm-dispatch; restarted 2026-11-16 18:24 in a deploy switch; bun running server.ts).
      • Its process environment contains both SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY (variable names read from the /proc environ key list only — values never read), so QueueClient is constructed at startup and every dispatch session launch enqueues + claim-PATCHes through it (launch flow: enqueueDispatchTask, worker dispatch-opencode).
      • The store it writes is the legacy one: the live fleet queue resolves via Turso (fleet queue health: project fleet-queue-…turso.io, claim events claim_repo_task_turso); the fleet-queue client's docs state "no direct Supabase access", queue_broker.rs labels the Supabase PostgREST path the legacy backend, and no Supabase↔Turso bridge exists in the repo. Dispatch's tasks therefore land where no lane will ever claim them — zombie writes, and unvalidated ones (max_attempts, priority forwarded with no validate_packet pass).
    • Disposition (the issue's "live" fork): route dispatch's queue writes through the queue broker (validated enqueue + broker claim in place of the PATCH), preserving the launch UX; the minimum quarantine, if rerouting is disproportionate, is removing the service-role key from the deployment env so the client is null and intake fails loudly. The follow-on also records the Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 decision-2 SQL-guard disposition on Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449.
    • Fix packet: repo-health:v1:fix:developing-today/code:issue:9028 → enqueued as task 20268 (queue repo-health-code-pilot, status queued, priority 20).
  4. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/highImportant and time-sensitive
    effort/mMedium: expected under 1 day of work
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    status/triagedTriaged and routed (see agent note)
    queue/queuedHas a queued queue task
    on Nov 17, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · in-progress (parked for capacity — resume state below)

    • Agent: queue worker (repo-worker-code), lane code-c
    • Session / ID: task 20268
    • Found via: queue claim
    • Task: Fix issue pm-stack/dispatch is a direct PostgREST producer bypassing the packet validator and the queue broker (Phase 4 disposition (b) of #6449) #9028 (pm-dispatch QueueClient is a live direct PostgREST producer) — diagnosis re-verified fresh this pass; the fix itself is parked for capacity, not attempted in the remainder of this shift.
    • Expectation: done (for this pass) = evidence + resume state recorded (this note), task 20268 parked with a capacity ready-condition (required budget 120 min).

    Verified fresh (2026-11-16):

    • pm-dispatch is running on the laptop (user service, active).
    • pm-stack/dispatch/src/queue.ts is exactly the filed defect: its header reads "Supabase queue client (PostgREST, agent schema)"; enqueue() POSTs rpc enqueue_repo_task / enqueue_repo_task_fleet (queue.ts:107) to the Supabase store; patchTask (queue.ts:129) PATCHes task rows directly. server.ts:51 constructs it whenever the service-role key is present: cfg.supabaseServiceRoleKey ? new QueueClient(...) : null. The live queue store is Turso (fleet queue health/claims resolve there), so these writes land in the legacy store where no lane claims — as filed by task 18812's triage.

    Why parked, and the resume plan:

    • Both sanctioned routes exceed what remains of this shift, and route B touches a live service's secret env: Route A (the real fix) rewrites QueueClient to enqueue through the queue broker with validator semantics and replaces patchTask's assign-immediately write with a broker claim (worker dispatch-opencode), then restarts pm-dispatch and verifies a dispatch-path enqueue lands in fleet queue list on Turso, plus the Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449 disposition note. Route B (minimum quarantine) removes SUPABASE_SERVICE_ROLE_KEY from the pm-dispatch deployment env (SOPS render) so QueueClient is null and intake fails loudly — a live-service secrets change that should be done deliberately, with the dispatch UX impact accepted knowingly, not in a shift's last minutes.
    • Resume: a lane with a full window takes Route A first; choose Route B only if rerouting proves disproportionate, and record the choice + the Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 decision-2 disposition on Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449 either way.

    Issue #9028 stays open; task 20268 is parked (capacity) and will surface to a fresh full-budget shift.

  6. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued queue task
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 17, 2026
  7. 152 remaining items

    Load more actions
  8. dezren39
    added
    status/in-progressQueue worker lifecycle state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 19, 2026
  9. dezren39 commented on Nov 19, 2026

    @dezren39
    dezren39
    on Nov 19, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task: 20268
    issue: #9028
    lane: oc-code-05
    worker: repo-worker-code
    origin: openchamber-scheduled-lane
    stage: picked-up -> verified

    Claimed and checkpointed task 20268. Fresh GitHub checks confirm #9028/#6449 are CLOSED, PR #10986 is MERGED at bb02d18, and #6449 records the #6448 decision-2 disposition. Latest #9028 operator evidence remains the 2026-11-19T21:43:33Z note, which says the deployment gate is unresolved. Still required: NixOS switch/restart on the merged build, deployed-build health, absence of SUPABASE_* process-environment names (names only), and a dispatch enqueue visible in Turso. No deploy, secret-value inspection, production dispatch, source change, or protected-worktree access. I will preserve the existing branch/worktree and re-park pending verifiable operator evidence.

  10. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 19, 2026
  11. dezren39 commented on Nov 19, 2026

    @dezren39
    dezren39
    on Nov 19, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task: 20268
    issue: #9028
    lane: oc-code-05
    worker: repo-worker-code
    origin: openchamber-scheduled-lane
    stage: verified -> parked

    Fresh GitHub verification confirms #9028/#6449 CLOSED and PR #10986 MERGED; #6449 records the #6448 decision-2 disposition. No operator evidence resolves the live deployment gate: NixOS switch/restart on the merged build, deployed-build health, absence of SUPABASE_* process-environment names (names only), and a dispatch enqueue visible in Turso. Task 20268 parked for 30 minutes. No deploy, secret-value inspection, production dispatch, source changes, or protected-worktree access. Preserve branch queue/20268-9028-deploy-verification and worktree /home/user/git/fleet/queue-20268-9028-deploy-verification. Resume only after verifiable operator evidence for all four checks, then revalidate. Sandbox bookkeeping deferred to fleet reconciliation.

  12. dezren39 commented on Nov 19, 2026

    @dezren39
    dezren39
    on Nov 19, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task: 20268
    issue: #9028
    lane: oc-code-05
    worker: repo-worker-code
    origin: openchamber-scheduled-lane
    state: picked-up -> escalated-to-user (blocked)

    Fresh revalidation (2026-11-19T22:55Z, laptop-local, read-only): #9028 and #6449 remain CLOSED, PR #10986 MERGED at bb02d18, #6448 decision-2 disposition recorded on #6449. The live deployment gate is still unmet, verified directly: pm-dispatch.service active since Nov 16 18:24 CST on the pre-merge build (/health version 7d3dceb, not the merge commit), and its process environment still contains SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY (names only; values never read). No dispatch enqueue was exercised; no deploy, restart, secret-value inspection, or source change performed.

    Why blocking instead of re-parking: this task has cycled park→reclaim→park across five-plus lanes since 13:00Z today with no operator evidence arriving. The four outstanding checks (NixOS switch/restart on the merged build, deployed-build health, SUPABASE_* names absent, Turso-visible dispatch enqueue) all require a privileged live-service deploy on this laptop — a decision and action that is genuinely the operator's, per the fleet's standing no-unauthorized-deploy discipline.

    My read for Drew: the code outcome is done and merged (dispatch now talks only to the queue broker; the direct PostgREST producer is gone from source). Two ways to close this out:

    1. Operator performs (or explicitly authorizes a lane to perform) the recorded deploy sequence: amd switch from primary at origin/main → pm-stack/dispatch/install.sh env render + tree copy → systemctl --user restart pm-dispatch.service → verify /health commit, SUPABASE_* names absent, and a test enqueue visible in fleet queue list (Turso). Note lane any-x's 2026-11-17 attempt: switch attempt 1 failed on the mcpx reap-timing test under load (code#8900 family); retry past that stage was left running detached (~/.local/state/amd-switch-20268-retry.log) — check whether it ever completed before redoing it.
    2. Or decide the post-deploy verification is operator-owned follow-up, accept the merged code outcome as the task terminal, and this task closes with the deploy tracked as an operator action item.

    Task 20268 blocked (escalated-to-user) with this evidence; branch queue/20268-9028-deploy-verification and worktree /home/user/git/fleet/queue-20268-9028-deploy-verification preserved. Sandbox bookkeeping deferred to fleet reconciliation.

  13. dezren39
    added
    status/blockedQueue or user escalation state
    queue/blockedQueue or user escalation state
    user/escalatedRequires a Drew decision or access
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 19, 2026
  14. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    agent-note:v1
    task: 20268
    issue: #9028
    lane: oc-code-05
    worker: repo-worker-code
    origin: openchamber-scheduled-lane
    state: claimed -> hands-blocked

    The code change is already merged (#10986), while the remaining post-merge gate requires a live NixOS operator login and deployment action. Reclassified only that step as an interactive-login hands item; task 20268 is blocked in the queue, not waiting on a decision. Required evidence remains the merged-build switch/restart and health, absence of SUPABASE_* environment names (names only), and a Turso-visible dispatch enqueue. No deployment, secret-value inspection, production dispatch, or protected-worktree access was performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

effort/mMedium: expected under 1 day of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivequeue/blockedQueue or user escalation statestatus/blockedQueue or user escalation statetask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsuser/escalatedRequires a Drew decision or accesswork/assignedQueue worker lifecycle state

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.