Skip to content

reliability: add claim recovery, retries, and dead letters - #10

Merged
PeterGuy326 merged 1 commit into
masterfrom
agent/task-reliability
Aug 11, 2026
Merged

PeterGuy326 merged 1 commit into
masterfrom
agent/task-reliability

Conversation

@PeterGuy326

Copy link
Copy Markdown
Owner

Summary

  • replace non-atomic queue transitions with Redis Lua contracts for enqueue, claim, acknowledge, retry, release, and replay
  • add timestamped dispatch leases, bounded exponential backoff, retry budgets, and a queryable generation-safe dead-letter queue
  • preserve active task-id idempotency across legacy waiting/running data and late check/expire responses
  • expose authenticated DLQ query/replay APIs through the hardened dashboard proxy
  • document configuration, failure semantics, upgrade behavior, and operator workflows

Reliability and compatibility

  • acknowledged long-running tasks are not reclaimed by the dispatch lease
  • expired pending claims consume the same retry budget as callback failures
  • legacy waiting migration is FIFO-preserving, bounded to 1,000 entries per tick, and steady-state enqueue remains O(1)
  • bounded running HSCAN supplies grace leases without per-tick full hash scans
  • stale claim tokens and stale DLQ entry generations cannot mutate a newer task generation

Verification

  • WAITQUEUE_REDIS_INTEGRATION_URL=redis://127.0.0.1:36379/15 pnpm test — 65/65, including real Redis 7 dual-client and migration/ABA cases
  • dashboard pnpm typecheck && pnpm build
  • production dependency audits for backend and dashboard — no known vulnerabilities
  • Compose build/health plus runtime failure → retry → DLQ → replay → stale-generation rejection smoke
  • Compose config, workflow YAML, ShellCheck, and git diff --check

Closes #4

@PeterGuy326
PeterGuy326 merged commit 048c43e into master Aug 11, 2026
5 checks passed
@PeterGuy326
PeterGuy326 deleted the agent/task-reliability branch August 11, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reliability: 增加 claim 恢复、退避与死信队列

1 participant