Skip to content

chore: Update sdk_metadata features#115

Merged
aaron-zeisler merged 5 commits intomainfrom
devin/1773423182-update-sdk-metadata-features
Mar 19, 2026
Merged

chore: Update sdk_metadata features#115
aaron-zeisler merged 5 commits intomainfrom
devin/1773423182-update-sdk-metadata-features

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 13, 2026

Requirements

  • I have added test coverage for new or changed functionality — N/A, metadata-only change
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions — N/A, metadata-only change

Related issues

Part of a cross-repo effort to populate features in .sdk_metadata.json for all LaunchDarkly SDKs.

Describe the solution you've provided

Adds a features map to the lua-server-sdk entry in .sdk_metadata.json, documenting which SDK features are supported and the version they were introduced. Feature keys use the canonical camelCase names from sdk-meta/feature_info.json, and introduction versions are sourced from the SDK features documentation table (server-side SDKs L-Z, Lua column) and verified against CHANGELOG.md and source code.

Features included (13 total, alphabetical): allFlags, appMetadata, contexts, experimentation, inlineContextCustomEvents, offlineMode, privateAttrs, relayProxyDaemon, relayProxyProxy, storingData, storingDataRedis, track, variationDetail.

Updates since last revision

  • Added contexts with introduced version "2.0" — verified against CHANGELOG.md entry under ## [2.0.0].
  • Added storingDataRedis with introduced version "1.0" — verified against CHANGELOG.md entry under 1.0.0-beta.3. Version 1.0 used since pre-1.0 releases were betas.
  • Added appMetadata and offlineMode — inherited from the C++ server SDK. The Lua SDK wraps the C++ server SDK and exposes config.appInfo and config.offline fields.
  • Corrected appMetadata from "1.0" to "2.0" — git history shows config.appInfo was first introduced in commit 95e9718 (feat!: use C++ Server-side SDK 3.0 bindings), whose earliest tag is v2.0.0. offlineMode remains at "1.0" because config.offline was present since 1.0.0-beta.3.

Human review checklist

  • Verify the introduction versions match expectations — most were sourced from the docs table; contexts at "2.0" and storingDataRedis at "1.0" were verified against CHANGELOG.md
  • Confirm storingDataRedis: "1.0" — the Redis module was introduced in 1.0.0-beta.3. Verified that 1.0 is the correct version to use (consistent with the convention that pre-1.0 betas are not counted)
  • Verify appMetadata: "2.0" — corrected from 1.0 after review. Commit 95e9718 (C++ SDK 3.0 bindings) is the first to add config.appInfo, and the earliest tag containing it is v2.0.0
  • Verify offlineMode: "1.0"config.offline was present in 1.0.0-beta.3 (commit c4917d9), so 1.0 is correct
  • Verify inlineContextCustomEvents version "2.1.3" — this is a patch-level version; confirm it is correct
  • Confirm no other features are inherited from the C++ server SDK that should also be listed (hooks, bigSegments, webProxy were checked and are not exposed in the Lua SDK code)

Additional context

Link to Devin session
Requested by: Aaron Zeisler


Note

Low Risk
Low risk metadata-only update; no runtime code paths change, but downstream consumers of .sdk_metadata.json may alter behavior based on the newly declared feature set/versions.

Overview
Adds a features map to the lua-server-sdk entry in .sdk_metadata.json, documenting supported SDK capabilities and the version each was introduced (e.g., contexts at 2.0, inlineContextCustomEvents at 2.1.3, plus other core features like allFlags, track, and variationDetail).

Written by Cursor Bugbot for commit 3bf8bb0. This will update automatically on new commits. Configure here.

Co-Authored-By: Aaron Zeisler <azeisler@launchdarkly.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: Aaron Zeisler <azeisler@launchdarkly.com>
@aaron-zeisler
Copy link
Copy Markdown

aaron-zeisler commented Mar 16, 2026

Devin: I believe the storingDataRedis feature should be supported in v 1.0, based on the changelog from 1.0.0-beta.3 (specifically the line "Added launchdarkly_server_sdk_redis module to support Redis as an external feature store"). Can you verify and update the code?

Co-Authored-By: Aaron Zeisler <azeisler@launchdarkly.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Done — added storingDataRedis at version 1.0. Verified via CHANGELOG entry under 1.0.0-beta.3: "Added launchdarkly_server_sdk_redis module to support Redis as an external feature store." Since 1.0 is the first stable release, used 1.0 as the introduced version.

@aaron-zeisler aaron-zeisler marked this pull request as ready for review March 16, 2026 19:14
@aaron-zeisler aaron-zeisler requested a review from a team as a code owner March 16, 2026 19:14
@kinyoklion
Copy link
Copy Markdown
Member

Devin, this SDK is a wrapper around the C++ server SDK, so some features are inherited from it. In this SDK you may have to check the code for some features. For example "appMetadata" is supported in our C++ server SDK, and lua has @tparam[opt] table config.appInfo Specify metadata related to your application., which lets you use that feature of the C++ SDK.

@kinyoklion
Copy link
Copy Markdown
Member

 FIELD("offline", LUA_TBOOLEAN, parse_bool, LDServerConfigBuilder_Offline)

Co-Authored-By: Aaron Zeisler <azeisler@launchdarkly.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Good catch — added both inherited features from the C++ server SDK:

  • appMetadata at 1.0 — confirmed via config.appInfo field in launchdarkly-server-sdk.c (lines 942-947, 972)
  • offlineMode at 1.0 — confirmed via FIELD("offline", LUA_TBOOLEAN, parse_bool, LDServerConfigBuilder_Offline) (line 974)

I also checked for other C++ server SDK features (hooks, bigSegments, webProxy, testData, fileData) but none of those are exposed in the Lua SDK code. Now 13 features total.

Co-Authored-By: Aaron Zeisler <azeisler@launchdarkly.com>
@aaron-zeisler
Copy link
Copy Markdown

I used Cursor to prove that the version numbers are correct for these features:

Architecture context: In v1.x the Lua SDK wrapped the C server SDK (#include <launchdarkly/api.h>). In v2.0.0 (commit 95e9718), it switched to wrapping the C++ server SDK. Proof for v1.x features comes from examining the pre-transition source code via git show 95e9718^:launchdarkly-server-sdk.c.

Feature Version Proof
allFlags 1.0 v1.x source: Function LuaLDClientAllFlags calls LDAllFlags(*client, *user), registered as { "allFlags", LuaLDClientAllFlags }. [1.2.0]: "Fixed memory leak in AllFlags API" — confirms feature existed before 1.2.
appMetadata 2.0 [2.0.0]: "use C++ Server-side SDK 3.0 bindings" (commit 95e9718). Current source: config.appInfo with identifier and version fields; DEFINE_CONFIG(appinfo_config, "appInfo", appinfo_fields). v1.x source: No appInfo field present. Reviewer kinyoklion confirmed this is not 1.0 by pointing to commit 95e9718.
contexts 2.0 [2.0.0]: "added makeContext for constructing single or multi-kind contexts"; "Variation and VariationDetail now take contexts"; "remove alias function, replace usage with multi-kind contexts". v1.x used makeUser/LDUser; v2.x uses makeContext/LDContext.
experimentation 1.0 v1.x source: LuaLDClientTrack supports LDClientTrackMetric(*client, key, *user, value, metric) (5-arg form with metricValue). Combined with variationDetail (also v1.x), experimentation capabilities were fully present from the first release.
inlineContextCustomEvents 2.1.3 [2.1.3]: "Bump launchdarkly-cpp-server to v3.9.0". C++ SDK v3.9.0 release notes: "Inline context for custom events ([#477])". The Lua SDK inherits this behavior via the C++ SDK dependency bump — it is not directly implemented in the Lua wrapper code.
offlineMode 1.0 v1.x source (makeConfig): lua_getfield(l, i, "offline")LDConfigSetOffline(config, lua_toboolean(l, -1)). [1.0.0-beta.3]: C module introduced with config options including offline.
privateAttrs 1.0 v1.x source (makeUser): Reads privateAttributeNames table and calls LDUserAddPrivateAttribute(user, LDGetText(iter)) for each entry. Also makeConfig reads config.privateAttributeNames.
relayProxyDaemon 1.0 v1.x source (makeConfig): lua_getfield(l, i, "useLDD")LDConfigSetUseLDD(config, lua_toboolean(l, -1)). useLDD = LaunchDarkly Daemon mode = Relay Proxy in daemon mode. In v2.0+ this was replaced by config.dataSystem.lazyLoad, but the capability remained.
relayProxyProxy 1.0 v1.x source (makeConfig): lua_getfield(l, i, "baseURI")LDConfigSetBaseURI; streamURILDConfigSetStreamURI; eventsURILDConfigSetEventsURI. Custom service endpoints for connecting via the Relay Proxy.
storingData 1.0 v1.x source (makeConfig): lua_getfield(l, i, "featureStoreBackend")LDConfigSetFeatureStoreBackend(config, *storeInterface). [1.0.0-beta.3]: "Added featureStoreBackend option to configuration object."
storingDataRedis 1.0 v1.x Redis module (launchdarkly-server-sdk-redis.c): makeStore creates LDStoreInterfaceRedisNew(config). [1.0.0-beta.3]: "Added launchdarkly_server_sdk_redis module to support Redis as an external feature store." Version 1.0 used because pre-1.0 releases were betas.
track 1.0 v1.x source: LuaLDClientTrack implements LDClientTrack and LDClientTrackMetric, registered as { "track", LuaLDClientTrack }.
variationDetail 1.0 v1.x source: boolVariationDetail, intVariationDetail, doubleVariationDetail, stringVariationDetail, jsonVariationDetail — each uses LD*Variation(..., &details) and LuaPushDetails(l, &details, result). All registered in launchdarkly_client_methods.

Feature lineage summary:

  • v1.x (C SDK) — 10 features at "1.0": allFlags, experimentation, offlineMode, privateAttrs, relayProxyDaemon, relayProxyProxy, storingData, storingDataRedis, track, variationDetail
  • v2.0 (C++ SDK transition) — 2 features at "2.0": appMetadata, contexts
  • v2.1.3 (C++ SDK dependency bump) — 1 feature at "2.1.3": inlineContextCustomEvents

No discrepancies remain. The appMetadata: "2.0" correction (from the original "1.0") was confirmed by reviewer kinyoklion and by git history analysis.


Devin: No changes are necessary.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Acknowledged — all 13 features verified, no changes needed. Thanks for the thorough analysis!

@aaron-zeisler aaron-zeisler merged commit d8020b0 into main Mar 19, 2026
19 checks passed
@aaron-zeisler aaron-zeisler deleted the devin/1773423182-update-sdk-metadata-features branch March 19, 2026 19:12
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.

2 participants