fix(ship): adapt batches after HTTP 413 - #56
Draft
ronheichman wants to merge 2 commits into
Draft
ronheichman wants to merge 2 commits into
ronheichman wants to merge 2 commits into
Conversation
Retry rejected batches at NDJSON boundaries and persist each accepted prefix before sending its suffix. Keep single-record rejections durable and retain replay safety for all other delivery failures. Built with Codex
Separate the rejection and retention messages with a period. Built with Codex
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.
Why
numbat shiptargets 4 MiB batches, but complete-record reads can exceed that target by one record.Receivers may reject those requests with HTTP 413.
Release v0.2.0 treats every non-2xx response as a terminal batch failure.
The durable checkpoint then remains behind the entire rejected batch.
Deployment
Deployment status is INFERRED.
A downstream image configuration pins public release v0.2.0.
No deployed binary was inspected.
What changed
shipbisects only rejected 413 batches at complete NDJSON boundaries.Direct HTTP output outside
shipkeeps its existing buffering behavior.No wire, schema, configuration, or successful-delivery behavior changes.
Public references include the v0.2.0 shipping path.
The new adaptive implementation handles 413 responses.
The synthetic tests cover ordering and durability.
Actual red and green
All behavior evidence below uses local synthetic HTTP servers and temporary NDJSON files.
RED before implementation:
GREEN after implementation:
Verification
Every fuzz target listed in
.github/workflows/ci.ymlpassed for 30 seconds.Coverage was 84.6%.
GitHub reports no hosted check runs or status contexts for the final commit.
Native Windows tests and native macOS race tests remain unverified.
The Windows and macOS commands above use
-exec=truefor cross-compilation only.They do not execute tests on those platforms.
Built with Codex