fix(binary): read the stale-series retry from the typed problem - #134
Merged
Merged
Conversation
is_stale_series_rejection searched the raw body for "unknown-timeseries" or "external-id-mismatch", the idiom from before ResponseError::problem() existed. That also matched the SDK's own pre-flight 404, which names the series it could not resolve, so an external id spelling one of those tokens earned a pointless second attempt. It reads the problem type now. Platform #120 gave each binary refusal the type its status calls for, so the slug discriminates here the way it does on every other endpoint: unknown-timeseries and external-id-mismatch are the two that a re-resolve can fix. The single datapoint-block-rejected that preceded them is deliberately not matched, and a test says so: the binary path has never been in a release, so nothing can be sending it. The retry had no live coverage because the SDK resolves every series before sending. test_insert_datapoints_binary_re_resolves_a_recreated_series deletes and recreates a series under the same external id, so the server refuses the cached id. It needs a backend at platform #120 or later, hence the #[ignore], next to test_datapoints_binary which needs the endpoint at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
olavgg
approved these changes
Sep 18, 2026
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.
Replaces #131, which was opened six hours before the api changed under it.
What
is_stale_series_rejectionsearched the raw response body forunknown-timeseriesorexternal-id-mismatch, the idiom from beforeResponseError::problem()existed. That alsomatched the SDK's own pre-flight 404, which names the series it could not resolve, so an
external id spelling one of those tokens earned a pointless second attempt.
It reads the problem type now. Platform #120
(
b3412ec0) gave each binary refusal the type its status calls for, so the slug discriminateshere the way it does on every other endpoint:
invalid-frameunknown-timeseriesrequest-too-largeunsupported-media-typevalue-type-mismatchexternal-id-mismatchtoo-many-in-flightpost_frames, as beforeThe single
datapoint-block-rejectedthat preceded them is deliberately not matched, and atest says so: the binary path has never been in a release, so nothing can be sending it to a
caller of this SDK.
reasonsurvives server-side as the kebab-case sub-case and is what tellsthe thirteen malformed-frame cases apart, but it is no longer the discriminator.
Why #131 could not just be merged
It gated on
problem.slug() == Some("datapoint-block-rejected"), a slug the api no longeremits, so merging it would have silently disabled the retry rather than fixed it. Its unit
test passed only because the fixtures hand-built the old body.
Verification
only_a_stale_series_problem_rebuilds_the_requestpasses offline. Four cases, two of themnegative on purpose:
value-type-mismatch(re-resolving cannot make a value fit) and theretired
datapoint-block-rejected, so a future compat fallback has to delete a test to land.test_insert_datapoints_binary_re_resolves_a_recreated_seriesis the first live coverage ofthe retry at all: every other path resolves before it sends. It is
#[ignore]d next totest_datapoints_binaryand needs a backend at platform test(python): POLICY type-labels are matchable now #120 or later — on an older oneit fails with the pre-split body, which is the correct report, not a flake.
cargo test --no-run, so green checks mean it compiles. They did on fix(binary): decide the stale-series retry from the problem document #131 too.Notes for the reviewer
#80.
docs/sync-with-sdk, so whichever landssecond takes a small conflict. That branch also drops the stale "Not in the Python bindings
yet" sentence, left alone here on purpose.
🤖 Generated with Claude Code