Repository navigation
feat: Add environment ID support for hooks. - #594
Draft
kinyoklion wants to merge 8 commits into
Draft
kinyoklion wants to merge 8 commits into
kinyoklion wants to merge 8 commits into
Conversation
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.
Summary
Server SDK: the
X-LD-EnvIDresponse header now reachesEvaluationSeriesContext/TrackSeriesContext, for both FDv1 and FDv2 data systems.SDKDataSet::environment_id(FDv1Init) andChangeSet::environment_id(FDv2Apply).MemoryStoreretains it while applying the payload — absent/empty values leave a previously reported ID in place — and reports nothing before initialization.IDataSystem::EnvironmentId()is whatClientImplpasses into the hook contexts (std::nulloptfor offline/lazy load).Screenshots and a staging preview don't apply: SDK-internal data path, no UI.
Implementation details
FDv1 polling attaches the header of a successful response to the parsed data set; FDv1 streaming attaches the connection's header to the
putpayload it hands to the destination; the FDv1 fallback adapter stamps it onto the change sets it synthesizes for FDv2, retaining it for subsequent partials.kEnvironmentIdHeaderand theReadEnvironmentIdoverloads (HTTP result and Beast headers) live indata_systems/environment_id_header.hppand are shared by all four data sources.Verified with harness
hooks/evaluation/provides the environment ID(default + polling) against both v2.39.0 (FDv1) and v3.2.0-alpha.6 (FDv2), plus the server unit suite and the full v3 contract suite.Link to Devin session: https://app.devin.ai/sessions/bfe54128e2804a96bb100e6120e9a3ef
Requested by: @kinyoklion