Skip to content

feat: propagate FDv1 fallback directive from FDv2 polling and streaming sources#538

Draft
beekld wants to merge 1 commit into
beeklimt/SDK-2379from
beeklimt/SDK-2379-2
Draft

feat: propagate FDv1 fallback directive from FDv2 polling and streaming sources#538
beekld wants to merge 1 commit into
beeklimt/SDK-2379from
beeklimt/SDK-2379-2

Conversation

@beekld
Copy link
Copy Markdown
Contributor

@beekld beekld commented May 23, 2026

Summary

Stacked on #537. Each FDv2 source now inspects the X-LD-FD-Fallback response header (value "true", case-insensitive) and stamps FDv2SourceResult.fdv1_fallback on every emitted result. The orchestrator does not yet consume the flag — that comes in a follow-up.

Design notes

  • fdv1_fallback is hoisted from per-variant (was on ChangeSet, Interrupted, TerminalError, Goodbye) to a top-level field on FDv2SourceResult. The flag is a property of the HTTP response, not of the result kind. Touches every existing construction site (mechanical: drop trailing false arg, the top-level default does the rest).
  • Streaming synchronizer holds a latest_fdv1_fallback_ bool on State. Each OnResponse overwrites it from the incoming headers, so a fresh response without the directive clears it. Events between two responses share the flag from the most recent response.

Test plan

  • New fdv2_polling_impl_test.cpp covers propagation across all variants + value comparison
  • New streaming tests cover wiring + clearing on subsequent response
  • Full server + SSE suites green

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.

1 participant