feat: add FDv1 fallback directive parsing and TTL data model#1781
feat: add FDv1 fallback directive parsing and TTL data model#1781joker23 wants to merge 2 commits into
Conversation
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/js-client-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk size report |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b232737. Configure here.
b232737 to
10296f6
Compare
10296f6 to
c902a80
Compare
first set of changes to let client side fdv2 handle fdv1 fallback ttl. This PR adds logic to read FDv1 fallback values from both header and goodbye body.
Note
Low Risk
Additive types and parsing with tests; no orchestrator or runtime behavior changes in this diff.
Overview
Adds shared parsing for server-directed FDv1 fallback and how long to stay on FDv1 before retrying FDv2.
New
fallbackDirectivehelpers readx-ld-fd-fallback/x-ld-fd-fallback-ttl(seconds → ms, case-insensitive"true", invalid TTL omitted, negatives clamped to indefinite) andprotocolFallbackTTLon goodbye payloads for clients that cannot read stream headers (e.g. browserEventSource).FDv2SourceResultnow carries optionalfdv1FallbackTtlMson change-set and status results; factory helpers (changeSet,interrupted,terminalError,goodbye) accept the same TTL semantics (undefined= caller default,0= indefinite).Reviewed by Cursor Bugbot for commit c902a80. Bugbot is set up for automated code reviews on this repo. Configure here.