Repository navigation
fix: treat failed feature flags as unavailable - #29
Merged
Merged
Conversation
ioannisj
approved these changes
Nov 12, 2026
ioannisj
left a comment
There was a problem hiding this comment.
🤖 An AI agent wrote this on behalf of @ioannisj.
No findings. I went through the failed-record handling in src/Server/FlagCache.luau and the $feature_flag_called path in src/Server/FeatureFlags.luau against the spec, and both look right to me.
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.
💡 Motivation and Context
Failed feature flag records can expose false or variant values and payloads instead of using the caller's default. This fixes the Roblox behavior described in PostHog/sdk-specs#211.
Records marked
failed: trueand their legacy flat mirrors no longer supply cached values or payloads. Boolean getters use the caller's default. The structured getter keeps its existing unavailable result with a false value and no payload. Failed reads emitevaluation_failedusing the existing false response sentinel, not the caller's default. Response-wide errors remain a separate diagnostic. Event deduplication and configuration still apply, and ordinary missing keys still emit nothing.Response-wide errored refreshes retain successful cached true, false and variant values with their paired payloads. Complete nonerrored refreshes still replace the cache. Successful recovery and quota clearing remove failure markers. Includes a Sampo patch-release changeset without a manual version bump.
💚 How did you test it?
lune run tests/runTests.luau: 116 passed, zero failed. The pure-module function-coverage gate passed at 43/43. This is not branch coverage or full runtime coverage.selene src testsandstylua --check src tests ExampleProjectpassed with the pinned tool versions.6974c12aef6547a013d85134b5a7ebd6d0f6d337against maincef6b1e8db9360acdb2f99a2cc993ab6d91a09ab, with no actionable findings.Validation used Lune 0.10.4 with mocked Roblox services, lifecycle and HTTP transport. Roblox Studio, live ingestion and the Rojo build were not run. These tests do not establish Studio or end-to-end wire conformance.
📝 Checklist
If releasing new changes
.sampo/changesets/🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented and published with Pi using local shell, Git and GitHub CLI, with an isolated autoreview helper. Scope was limited to failed-record handling, cache refresh behavior and regression tests. All commits are signed. Human review is required before merge. Remaining runtime validation is listed above.