feat(queue): phase 2 — Postgres durable queue + http handler (fleet work queue) #1

Open
opened 2026-07-11 18:21:03 +02:00 by arcodange · 0 comments
Owner

Already phase 2 of this repo's own roadmap (README) — now also load-bearing for the AI back-office PRD (agent-architecture, decision D1, operator-endorsed 2026-07): the gateway's durable queue becomes the fleet's work queue (pipeline stages communicate through it; erp#47/#52 consume it).

Deliverables (per the existing phase-2 plan + fleet needs):

  • Postgres-backed durable queue (the compose stack already ships Postgres); http forward handler.
  • DLQ semantics: an item failing N times parks in a dead-letter state with its error trail; queue items carry type, payload ref, deadline, and aging (visible age drives the digest's "M to resolve").
  • At-least-once delivery with idempotent consumers assumed downstream (the erp side handles dedupe — erp#44).
  • Ops: liveness/readiness already exist; add queue-depth + oldest-item-age metrics (the fleet's silence alarms read these).

Acceptance: an enqueued item survives a gateway restart; a poisoned item lands in DLQ with its trail; metrics exposed.


Execution — Blocked by: none · Blocks: #2, erp#47 (approval channel), erp#52 · Human gates: none.
Start: claude --worktree queue-phase2 from the telegram-gateway repo root (note: repo owner is arcodange, not arcodange-org); read its README phase plan + compose stack first.
Done means: evidence comment here (restart-survival + DLQ test logs, metrics sample) → PR merged with Closes #1 → D1 ADR-line via arcodange-org/factory#22.

Already phase 2 of this repo's own roadmap (README) — now also load-bearing for the **AI back-office PRD** ([agent-architecture](https://gitea.arcodange.lab/arcodange-org/factory/src/branch/main/vibe/PRD/ai-back-office/agent-architecture.md), decision **D1, operator-endorsed 2026-07**): the gateway's durable queue becomes the fleet's work queue (pipeline stages communicate through it; erp#47/#52 consume it). **Deliverables (per the existing phase-2 plan + fleet needs):** - Postgres-backed durable queue (the compose stack already ships Postgres); `http` forward handler. - **DLQ semantics**: an item failing N times parks in a dead-letter state with its error trail; queue items carry type, payload ref, deadline, and aging (visible age drives the digest's "M to resolve"). - At-least-once delivery with idempotent consumers assumed downstream (the erp side handles dedupe — erp#44). - Ops: liveness/readiness already exist; add queue-depth + oldest-item-age metrics (the fleet's silence alarms read these). **Acceptance:** an enqueued item survives a gateway restart; a poisoned item lands in DLQ with its trail; metrics exposed. --- **Execution** — Blocked by: none · Blocks: #2, erp#47 (approval channel), erp#52 · Human gates: none. **Start:** `claude --worktree queue-phase2` from the **telegram-gateway** repo root (note: repo owner is `arcodange`, not arcodange-org); read its README phase plan + compose stack first. **Done means:** evidence comment here (restart-survival + DLQ test logs, metrics sample) → PR merged with `Closes #1` → D1 ADR-line via arcodange-org/factory#22.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange/telegram-gateway#1