Skip to content

sdk: Expose accepted flag and config inventory snapshots - #35

Open
schaudhry-figma wants to merge 6 commits into
mainfrom
schaudhry/labmate-inventory-sdk
Open

schaudhry-figma wants to merge 6 commits into
mainfrom
schaudhry/labmate-inventory-sdk

Conversation

@schaudhry-figma

@schaudhry-figma schaudhry-figma commented Nov 13, 2026 •

Copy link
Copy Markdown

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:

  • 13 targeted Rust tests passed with both testing and with_zstd,testing.
  • Native FFI build, full Go suite, Go race suite (excluding existing TestMemoryLeak, which passed in the normal suite), go vet, and changed-file formatting passed.
  • With Labmate's older native pin, SDK construction still works and the accessor returns ErrInventorySnapshotUnsupported.
  • Actionlint passes for Main and its reusable workflows after repairing workflow startup.
  • Whole-workspace formatting and strict all-feature Clippy passed with Rust 1.99; 49 Rust regression tests passed, including gRPC in an isolated network.

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.

@schaudhry-figma
schaudhry-figma marked this pull request as ready for review November 16, 2026 22:03
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