fix(batch): publish only fully initialized batches - #455
Merged
Conversation
This was referenced Jul 29, 2026
ubettigole
marked this pull request as ready for review
July 29, 2026 00:40
ubettigole
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
July 29, 2026 00:40
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
July 31, 2026 01:02
3c288dd to
ebe1008
Compare
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
July 31, 2026 01:04
ebe1008 to
d361e46
Compare
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
July 31, 2026 06:27
d361e46 to
5f05d6a
Compare
behinddwalls
approved these changes
Jul 31, 2026
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
July 31, 2026 22:38
5f05d6a to
f0f210d
Compare
github-merge-queue
Bot
removed this pull request from the merge queue because the pull requests in the stack were not ordered correctly in the queue
Aug 1, 2026
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
August 1, 2026 17:41
f0f210d to
a3ec3e8
Compare
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
August 1, 2026 17:54
a3ec3e8 to
2186188
Compare
ubettigole
force-pushed
the
abettigole/idempotent_batch_creation
branch
from
August 1, 2026 18:25
2186188 to
c2c3a8a
Compare
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.
Summary
Prevent partially initialized batches from becoming visible to downstream processing or dependency analysis.
New batches are first persisted in the Creating state. The batch controller then creates the batch’s reverse-index row, registers it with each dependency, and transitions it to Created only after structural initialization succeeds. Request-log and speculate publication happen only after that transition.
Retries continue to mint fresh batch IDs. Failed attempts may leave unpublished Creating or Created batches behind, but these attempts remain inert; metrics track their creation so a cleanup job can be added later if necessary.
Test Plan
Unit tests
Issues
#354