Repository navigation
sdk: Expose accepted flag and config inventory snapshots - #35
Open
schaudhry-figma wants to merge 6 commits into
Open
schaudhry-figma wants to merge 6 commits into
schaudhry-figma wants to merge 6 commits into
Conversation
schaudhry-figma
marked this pull request as ready for review
November 16, 2026 22:03
jmcfarland-figma
approved these changes
Nov 17, 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.
Expose a metadata-only snapshot of the configuration currently accepted by the evaluation SDK through Rust, C FFI, and typed Go. In figma/statsig-server-core, expose GetInventorySnapshot() on the evaluation SDK instance.
Reference: Step 1.2 in Move feature-flag and config lists from Sinatra to Labmate
Written with AI
Testing
Added Rust and real-native Go/FFI tests for metadata-only output, coherent refresh/versioning, rejected updates, snapshot ownership, concurrent reads, per-instance isolation, JSON/protobuf CDN fallback, and absence of exposure side effects.
Validated locally:
testingandwith_zstd,testing.TestMemoryLeak, which passed in the normal suite),go vet, and changed-file formatting passed.ErrInventorySnapshotUnsupported.CI: Main passes all seven lint checks and the full Go suite, including the new inventory tests and existing memory test. Python, Java, .NET, and Elixir test jobs also passed. CI repairs include workflow startup, baseline formatting/Clippy fixes, the missing Node option default, and scoped exceptions for generated async-trait/Tonic code and the existing public Tonic error type.
Remaining CI limits: 47 checks fail on missing/unusable Statsig, registry, or repository credentials/access. The Node benchmark failed below its lower bound (faster than the JS reference); the PHP debug RSS cutoff also fails on the base SDK (10.98 MiB growth versus 10.16 MiB with this PR). Both published release libraries passed that workload locally. The full workflow remains non-green; these findings classify the failures rather than turn them into passes.
Devenv01 validation — November 20
The matching Go/native test release served existing evaluations across all three clusters during the two-hour observation, with the inventory interface inactive. Average latency and CPU did not show a sustained regression; the higher health-check 500 counts matched intentional pod draining. An additional old/new comparison performed 8.64 million evaluations against a 4.85 MB synthetic configuration with accepted refreshes and found no repeatable slowdown. The exact live config latency outliers remain unattributed.
Before/after graphs, follow-up evidence, and merge assessment. This validates existing evaluation behavior with the rebuilt SDK; inventory activation needs separate validation.