fix(worker): bug-bash — forwarder batch halt, restore finalize ctx, deploy email slug - #77
Merged
Merged
Conversation
…ctx, deploy email slug Three bugs from the 2026-06-02 platform bug bash: - event_email_forwarder: the unsubscribe fail-CLOSED branch used `continue` instead of `break batchLoop`. Because the cursor is advanced per-row inline (unconditional Set, not max), a later sendable row in the same batch advanced the watermark PAST the held row — stranding it forever and silently dropping a legitimate transactional email during a transient unsubscribe-lookup DB blip. Now halts the batch like the SendClassTransient case. Adds a multi-row regression test (the single-row test couldn't distinguish continue/break). - customer_restore_runner: the finalize UPDATE used parentCtx, so a worker shutdown (rolling deploy / drain) after pg_restore succeeded would fail the UPDATE and mark a SUCCESSFUL restore as 'failed'. Now uses a fresh context.Background()+10s like the customer_backup_runner P2-W4 fix. - lifecycle_emails (deploy.created/healthy, shipped earlier today): the opaque 8-char hex app_id slug was rendered as a prose deployment "name" in the subject. Now shown only as a labeled `App` identifier in the body (the live URL identifies the app); subjects are generic. Mirrors the deploy-TTL builders that deliberately avoid app_id-as-name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mastermanas805
enabled auto-merge (squash)
June 2, 2026 16:33
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.
Three confirmed bugs from the 2026-06-02 platform bug bash (multi-agent, adversarially verified).
P1 — forwarder silently drops email (
event_email_forwarder.go): unsubscribe fail-closed usedcontinuenotbreak batchLoop; a later sendable row advanced the per-row cursor past the held row, stranding it forever during a transient DB blip. Now halts the batch. + multi-row regression test (single-row couldn't catch it).P2 — successful restore marked failed (
customer_restore_runner.go): finalize UPDATE usedparentCtx, so a worker shutdown after pg_restore succeeded recorded the restore asfailed. Now uses a detachedcontext.Background()+10slike the backup runner's P2-W4 fix.P3 — deploy email slug-as-name (
lifecycle_emails.go, regression in today's deploy-email work): the opaque hexapp_idrendered as a prose deployment name. Now a labeledAppidentifier only; subjects generic. Mirrors the deploy-TTL builders.Local: build + vet +
internal/jobstests green. 🤖 Generated with Claude Code