Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
enabled auto-merge (squash)
September 18, 2026 18:27
Contributor
A job that fails before a Dawn research attempt is submitted carries no research_attempt deadline, so the only terminal condition never applied and the job deferred every fifteen seconds forever. Four production jobs reached ~2,400 attempts. Reconciliation now backs off exponentially to a fifteen minute ceiling and fails for manual review after a bounded number of attempts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
force-pushed
the
blove/enrich-retry-cap
branch
from
September 18, 2026 18:33
923e9c6 to
3b79389
Compare
Contributor
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The
enrichhandler'sdeferhelper inapps/lifecycle/src/enrichment/dawn-jobs.tsdeferred with a fixed 15 second delay, and its only terminal condition was theresearch_attempt.expiresAtdeadline in the job payload. That key only exists once a Dawn research attempt has been submitted. Production evidence: every runaway job hadpayload ? 'research_attempt'= false, soexpiresAtwas undefined, the guard never fired, and the job re-deferred every 15 seconds indefinitely ondawn_reconciliation_required. Four jobs reached 2,267-2,414 attempts over six days and were only stopped by an operator suppressing the contacts.Changes
Two changes, to the
enrichhandler'sdeferhelper only (theresearch_cleanuphandler's separatedeferis untouched):MAX_RECONCILIATION_ATTEMPTS = 20; oncejob.attemptsreaches it the job fails withdawn_reconciliation_exhaustedfor manual review instead of deferring.min(15 min, 15s * 2 ** min(attempts, 10)).The existing
expiresAtdeadline check stays first and unchanged, so nothing regresses for jobs that do carry an attempt.Test plan
New tests in
dawn-jobs.spec.ts, reusing the file's existingfixture()harness:research_attemptdefers, and theavailableAtdelay grows withattemptsand never exceeds the 15 minute ceiling.research_attemptat the cap fails withdawn_reconciliation_exhaustedand does not defer. Confirmed failing before the fix (returneddeferred).dawn_recovery_deadlinetest still passes.nx test lifecycle --skip-nx-cache,nx lint lifecycle,nx build lifecycleall green.🤖 Generated with Claude Code