Repository navigation
fix(sync): recover unbound enrichment dispatch obligations - #21862
Merged
Merged
Conversation
Persist unbound obligations safely, repair poisoned rows under CAS, and give the batch projection host a complete fresh-lane dispatch binding.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1 task
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.
Problem and change
Batch projection on backend-integration persisted sync enrichment obligations with an empty queue. Enqueue and every repair attempt then failed, leaving 11 conversations without summaries and producing thousands of repair errors per hour.
dispatch=nullwhen the calling host lacks a complete sync worker binding. The obligation remains durable and claimable; invalid configuration does not cause enqueue retries.sync-jobsqueue in the runtime overlay and regenerate the manifest. deploy-backend-stack already resolves the fresh backend-sync handler and invoker identity; both handler and OIDC audience use that receiving handler URL. The queue and audience names are explicitly classified as non-secret deployment configuration. No new workflow or IAM changes are needed. Reject incomplete backfill projection overrides before committing their ready receipt.Repair hosts: the batch projection pump invokes the shared sweep on backend-integration; the existing two-minute sequencer Scheduler target invokes it on backend-sync. Read-only production logs confirm successful backend-sync sweep requests, and its live dispatch environment is complete. Direct Scheduler describe was denied to the read-only account, so Scheduler cadence/state is source-confirmed only.
Product invariants affected
Failure-Class: none
This is incomplete durable-dispatch configuration recovery. The sibling-handler audience class is prevented by requiring the audience to equal the receiving sync handler, covered by regression tests.
Verification
Targeted tests only, using the required file-list runner (Python 3.11.15, two workers, nice 19):
281 passed: 39 outbox/coalescing; 24 projection; 50 renderer; 168 runtime validator. Covers poison rebind, quiet unbound skips, claimable marks, stale tasks, live leases, real CAS-conflict reread, processing crash retention, concurrent appends, valid backfill binding preservation, and injected transactional projection/ready-receipt replay. The strict Firestore fixture verifies read-before-write and shared-transaction writes; emulator contention and live task execution were not run. Emulator fixtures now declare complete bindings and matching handler audiences.
Also passed: runtime manifest composition check; dev/prod runtime validators with workflow checks; async blocker scanner (zero selected findings); diff whitespace check. Full-suite/pre-deploy scripts were intentionally not invoked because this task requires targeted tests only. Normal commit/push hooks remain enabled.
The two 05:21Z / 05:28Z conversations were re-read with metadata-only field projections: both now have nonempty title and overview, completed status,
sync_updaterelevance decisions, revisions 12/5, and no outbox row. This is consistent with successful consumption, not evidence of dropped work.run()deletes only after normal processing and matching owner/version; processor exceptions and lifecycle fences retain the obligation, and concurrent marks retain a follow-up. Their earlier summary-less snapshot cannot be attributed retrospectively from the current metadata. No transcript content was read or printed.After-deploy verification plan
event=sync_reprocess action=repair outcome=errorreaches zero for this failure, and checksync_reprocess_unbound_totalfor unexpected unbound hosts.No production writes, merge, or deployment performed. Reverting the code alone restores the poison behavior; keep the complete integration binding when rolling back.