Skip to content

fix(batch): publish only fully initialized batches - #455

Merged
ubettigole merged 1 commit into
mainfrom
abettigole/idempotent_batch_creation
Aug 1, 2026
Merged

fix(batch): publish only fully initialized batches#455
ubettigole merged 1 commit into
mainfrom
abettigole/idempotent_batch_creation

Conversation

@ubettigole

@ubettigole ubettigole commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

@ubettigole
ubettigole marked this pull request as ready for review July 29, 2026 00:40
@ubettigole
ubettigole requested review from a team, behinddwalls and sbalabanov as code owners July 29, 2026 00:40
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from 3c288dd to ebe1008 Compare July 31, 2026 01:02
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from ebe1008 to d361e46 Compare July 31, 2026 01:04
@ubettigole ubettigole changed the title feat(batch): make creation resumable feat(batch): gate publication on batch readiness Jul 31, 2026
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from d361e46 to 5f05d6a Compare July 31, 2026 06:27
@ubettigole ubettigole changed the title feat(batch): gate publication on batch readiness fix(batch): publish only fully initialized batches Jul 31, 2026
Comment thread submitqueue/orchestrator/controller/batch/batch.go Outdated
Comment thread submitqueue/orchestrator/controller/batch/batch.go
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from 5f05d6a to f0f210d Compare July 31, 2026 22:38
@ubettigole
ubettigole added this pull request to the merge queue Aug 1, 2026
@github-merge-queue
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
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from f0f210d to a3ec3e8 Compare August 1, 2026 17:41
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from a3ec3e8 to 2186188 Compare August 1, 2026 17:54
Base automatically changed from abettigole/cancel_batch_resolution to main August 1, 2026 18:25
@ubettigole
ubettigole force-pushed the abettigole/idempotent_batch_creation branch from 2186188 to c2c3a8a Compare August 1, 2026 18:25
@ubettigole
ubettigole added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 51a084b Aug 1, 2026
15 checks passed
@behinddwalls
behinddwalls deleted the abettigole/idempotent_batch_creation branch August 1, 2026 18:43
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.

2 participants