Skip to content

fix(queue): renew live claim leases - #300

Merged
Joncallim merged 32 commits into
codex/pr198-producer-5a2-core-diagnosticsfrom
codex/pr198-producer-5a2-r3b-claim-renewal
Jul 29, 2026
Merged

fix(queue): renew live claim leases#300
Joncallim merged 32 commits into
codex/pr198-producer-5a2-core-diagnosticsfrom
codex/pr198-producer-5a2-r3b-claim-renewal

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

Source Issue

Issue: #179

Summary

  • renew active queue claim timestamps with Redis TIME while keeping the ownership nonce stable
  • make acknowledgement, release, retry, and dead-letter transitions authorize the stable nonce after renewal
  • start a bounded, non-overlapping heartbeat before task lookup or business work and drain it before terminal queue transitions
  • prove renewal, response loss, ownership loss, recovery, shutdown, and timer cleanup across task, approval, and answers queues

Stack

  • Base branch: codex/pr198-producer-5a2-core-diagnostics
  • Exact base SHA: 7facc2b25503bfeecf2ea19ab8a00dc9bc8fb1a5
  • This is a draft stacked child for PRODUCER-5A2-R3B-LIVE-CLAIM-RENEWAL.

Validation

  • npx vitest run __tests__/core-diagnostic-output-closure.test.ts — 23/23
  • dedicated Redis proof — 3/3 on Redis 8.8 using disposable database 13
  • npm test -- --reporter=dot — 1,691 passed, 30 skipped integration tests
  • npx eslint worker/queue.ts worker/runtime.ts __tests__/core-diagnostic-output-closure.test.ts __tests__/queue-occurrence-recovery.redis.test.ts
  • npx tsc --noEmit
  • npm run build
  • git diff --check

Mutation evidence

  • restoring full timestamp-plus-nonce equality made the source contract fail because all four terminal transitions must use stable nonce ownership
  • disabling periodic renewal made the runtime heartbeat test fail after only the initial renewal

Scope

Only the two queue/runtime modules and their two existing focused proof files change. No schema, documentation, workflow, UI, or new Redis key family is included.

@Joncallim
Joncallim marked this pull request as ready for review July 29, 2026 18:09
@Joncallim
Joncallim merged commit 1b686b6 into codex/pr198-producer-5a2-core-diagnostics Jul 29, 2026
4 checks passed
@Joncallim
Joncallim deleted the codex/pr198-producer-5a2-r3b-claim-renewal branch August 2, 2026 18:22
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.

1 participant