Skip to content

fix(worker): reconcile ambiguous retry outcomes - #298

Merged
Joncallim merged 2 commits into
codex/pr198-producer-5a2-r3a-retry-upgradefrom
codex/pr198-producer-5a2-r3a-r5-retry-reconcile
Jul 28, 2026
Merged

fix(worker): reconcile ambiguous retry outcomes#298
Joncallim merged 2 commits into
codex/pr198-producer-5a2-r3a-retry-upgradefrom
codex/pr198-producer-5a2-r3a-r5-retry-reconcile

Conversation

@Joncallim

@Joncallim Joncallim commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Source Issue

Issue: #179

Parent

Summary

When Redis may have applied retry-v3 but its response is lost, the worker replays the exact same retry transition once before closing the database attempt.

  • If the original call or reconciliation replay succeeds, the attempt finishes as failed with the retained business error and Redis’s authoritative nextRetryAt.
  • If both calls fail, the queue disposition remains unknown. The attempt now finishes honestly as terminal indeterminate, retaining the business error with no claimed retry deadline.
  • If that best-effort attempt finalization also fails, the worker emits the existing fixed attempt-infrastructure diagnostic without exposing the caught error or job payload.

The dashboard presents indeterminate as Retry status unknown with warning styling. Task-attempt logs use warning-level queue.attempt.indeterminate evidence and the existing safe compatibility message. The final-attempt dead-letter path and queue/Lua implementation remain unchanged. PostgreSQL already stores attempt status as unconstrained text, so this type/documentation refinement requires no migration.

Local evidence

  • Focused runtime and task-attempt suites: 25/25 passed
  • Existing real-Redis occurrence/recovery proof: 3/3 passed on a disposable nonzero database
  • Full unit command: 1,689 passed; only repository service-gated integrations were skipped locally
  • Targeted ESLint: passed
  • TypeScript --noEmit: passed
  • Production build: passed
  • git diff --check: passed
  • Bare-return mutation: focused suite failed 2 tests as intended
  • Ordinary failed plus null deadline mutation: focused suite failed 2 tests as intended

Hosted exact-head evidence

  • Web run 30386306983, job 90366365188: passed
    • complete zero-skip unit suite: 114/114 files, 1,699/1,699 tests
    • mandatory S4 PostgreSQL: 14/14
    • mandatory S4 Redis scrub: 3/3
    • mandatory S4 Redis ACL: 3/3
    • production build: passed
    • mandatory S3 PostgreSQL: 16 passed
    • disabled-ingress proof: passed
    • fail-closed E2E bridge: 17 passed
  • Contract run 30386325733, job 90366494118: passed
  • GitGuardian Security Checks: passed

Scope

Only:

  • web/worker/runtime.ts
  • web/worker/task-attempts.ts
  • web/db/schema.ts
  • web/app/dashboard/tasks/[id]/page.tsx
  • web/__tests__/core-diagnostic-output-closure.test.ts
  • web/__tests__/task-attempts.test.ts

This PR remains draft and stacked on #295. Its unresolved review thread is intentionally left unanswered and unresolved for the Reviewer gate.

@Joncallim
Joncallim marked this pull request as ready for review July 28, 2026 17:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 554b97de4a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/worker/runtime.ts
@Joncallim
Joncallim marked this pull request as draft July 28, 2026 18:03
@Joncallim
Joncallim marked this pull request as ready for review July 28, 2026 18:25
@Joncallim
Joncallim merged commit c74d427 into codex/pr198-producer-5a2-r3a-retry-upgrade Jul 28, 2026
5 of 6 checks passed
@Joncallim
Joncallim deleted the codex/pr198-producer-5a2-r3a-r5-retry-reconcile 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