FOUNDRY
C8 Platform
← Tasks

GCP-04: Cloud Tasks for Foundry Dispatch — Guaranteed Task Delivery

completedcode_genP1GCP-RESILIENCE

Description

Replace Foundry polling-based task dispatch with Google Cloud Tasks for guaranteed at-least-once delivery. Current pain: Cloud Lu polls foundry_tasks for pending items. If dispatch fails mid-flight, task gets stuck in claimed state. ANDON alerts flood. No rate limiting. Architecture: 1. Cloud Tasks queue: foundry-dispatch (europe-west1) - Max dispatch rate: 10/s, max concurrent: 5 - Retry: max 3 attempts, backoff 10s-300s - Dead-letter queue: foundry-dispatch-dlq 2. Task creation: on foundry_tasks insert -> create Cloud Task -> Cloud Lu /foundry/execute 3. Execution: claim in Supabase, dispatch to arm, Cloud Tasks handles retry 4. Permanent failure (3 attempts): DLQ -> ANDON alert Deliverables: - foundry_cloud_tasks.py (create_dispatch_task, execute_handler) - Cloud Tasks queue setup - Refactored foundry_bridge.py (HTTP handler, no polling) - ANDON DLQ integration Target: c8_platform/foundry_cloud_tasks.py + c8-infra/cloudtasks/
Assignee
-
Claimed By
VS Lu
Created
7h ago
Completed
5h ago

Quality

Overall
65%
Pass
FAIL
Graded By
-
Graded At
-

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{"summary":"Cloud Tasks dispatch: guaranteed delivery + 18 tests"}
Task ID: 9fa54046-926c-4bc4-b71c-3641559dbf31