Skip to content

fix(delivery): add message recovery after container restart [Sprint 2.5 D13] #42

@Piboonsak

Description

@Piboonsak

Sprint 2.5 — D13: Fix Delivery-Recovery หลัง Restart

Branch: feat/sprint-2.5-d13-delivery
Base: main
Depends on: none

Task

Fix the message delivery recovery mechanism that fails after container restart.

Investigation needed:

  1. Find message delivery and queue logic in runtime
  2. Find container shutdown hook (graceful shutdown handler)
  3. Find startup initialization logic

Fix requirements:

  • Persist pending delivery queue to disk before shutdown (graceful shutdown hook)
  • On startup, check for pending deliveries and retry them automatically
  • Implement delivery idempotency — no duplicate messages sent
  • Messages older than 15 minutes: log as failed, do NOT retry
  • Add clear logging of recovery events on startup

Acceptance Criteria

  • Pending messages persisted before shutdown
  • On restart, pending messages retried automatically
  • Delivery idempotency — no duplicate messages
  • Messages older than 15 min logged as failed (not silently dropped)
  • Clear logging of recovery events on startup

Commit Message

fix(delivery): add message recovery after restart (#183)

Reference

  • Issue: Piboonsak/Openclaw#183

Labels

  • sprint-2.5
  • copilot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions