fix: FDv2 fixes surfaced by v3 contract test harness#547
Open
beekld wants to merge 9 commits into
Open
Conversation
1714aee to
3488e09
Compare
kinyoklion
reviewed
Jun 5, 2026
| u.set_path(u.path() + kFDv2PollPath); | ||
| // A trailing '/' on the base URL appears as an empty final segment; | ||
| // remove it so subsequent push_backs don't produce a double slash. | ||
| auto segs = u.segments(); |
Member
There was a problem hiding this comment.
nit: Maybe this trimming could be a utility function?
kinyoklion
reviewed
Jun 5, 2026
| } | ||
| if (filter_key) { | ||
| u.params().append({"filter", *filter_key}); | ||
| if (detail::ValidateFilterKey(*filter_key)) { |
Member
There was a problem hiding this comment.
nit: Pre-existing, but this probably logs every poll?
kinyoklion
approved these changes
Jun 5, 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.
FDv2 fixes for issues found running the v3 contract test harness against the server SDK.
Note
Medium Risk
Changes core FDv2 sync behavior (multi-payload streams, error recovery, and reconnect triggers); mistakes could cause missed updates or extra reconnects, but scope is FDv2 data paths with expanded unit tests.
Overview
FDv2 protocol handler now matches streaming incremental semantics: after
payload-transferredit stays active inkPartialinstead of resetting, so later put/delete +payload-transferredcycles emit partial changesets without a newserver-intent. Put/delete are no longer dropped solely because state was inactive;errorclears in-flight changes but keeps protocol state so updates can continue. AddsIsKnownEventfor spec-defined ignore behavior.Polling and streaming build
/sdk/polland/sdk/streamby stripping a trailing-slash empty URL segment (avoids//), and apply the sameValidateFilterKeyused elsewhere—invalid filters are omitted with an error log and a full-environment request.MakeFDv2PollRequesttakes aLoggerfor that path.FDv2 streaming skips unknown SSE event types before JSON parsing, and calls
async_restarton malformed JSON or non-serverHandleEventprotocol errors so the next connection starts clean.Reviewed by Cursor Bugbot for commit 3488e09. Bugbot is set up for automated code reviews on this repo. Configure here.