Repository navigation
feat: Evaluate flags that depend on other flags - #120
Conversation
Segment conditions can read another flag's evaluated result through `$.flags.<feature>.enabled`, `.value` or `.variant`, as in flagsmith-engine. Flags are resolved lazily and transitively; a flag in a dependency cycle is served its default with reason `ERROR; code=CIRCULAR_DEPENDENCY`. Also aligns with engine-test-data v3.12.1: - Segments are evaluated without an identity. - Every flag result carries a `variant`. - Features without segment overrides report `STATIC`. - Overrides without a priority rank last instead of raising `NameError`. Local `get_environment_flags` now applies segments that need no identity (`$.environment.*`, `$.flags.*`), as the Flagsmith API does, and skips mapping identity overrides. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
Merging this PR will improve performance by 55.53%1 warning
Performance Changes
Tip Curious why performance improved? Comment Comparing |
Local evaluation ignores conditions on other flags, so a flag that depends on another flag is served as if it didn't.
Closes SDK-5. Tested by engine-test-data v3.12.1 and sdk-spec v0.7.0.
Changes
$.flags.<feature>.enabled) are now evaluated; circular dependencies serve the default with reasonERROR; code=CIRCULAR_DEPENDENCY.STATICinstead ofDEFAULT.🤖 Generated with Claude Code