Agent Chat Respond
POST /internal/agent-chat-respond
Cloud Tasks HTTP handler — runs the agent’s chat reply.
Envelope dep guarantees: * signature verified * not a completed duplicate (command_id, command_type) * command_type == AGENT_CHAT_MESSAGE * processing lease claimed (or reclaimed from stale; fail-open on race)
Response contract (Phase 2: processing-lease semantics)
Retryable outcomes return 503 and release the idempotency lease so Cloud Tasks (100 attempts, 0.1s–3600s exp backoff per wave20_live_resources.tf) can genuinely retry. Terminal outcomes (producer defect, permanent not-found, isolation) return 202 and mark the lease completed so a replayed command short-circuits to 200 duplicate.
Phase 1 honesty is preserved: each outcome still logs a distinct event at the appropriate level and records a best-effort drop ledger row for terminal 202 paths.
Authorizations
Responses
202
Successful Response