feat: create model flags enabled with 100% rollout by default#828
feat: create model flags enabled with 100% rollout by default#828Gkrumbach07 merged 1 commit intomainfrom
Conversation
Model flags are now created enabled in the environment with 100%
rollout instead of disabled at 0%. This means newly discovered models
are available to users immediately after the flag sync, rather than
requiring manual enablement in the Unleash admin UI.
Add EnabledByDefault field to FlagSpec. When true, addRolloutStrategy
uses 100% rollout and enableFlagInEnv toggles the flag on in the
environment after creation. Non-model flags (from flags.json) retain
the existing disabled/0% behavior.
Add enableFlagInEnv helper that calls POST .../environments/{env}/on.
Response body is only read on error to avoid unnecessary consumption.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude Code Review - PR 828 extends the flag sync tooling to create model feature flags enabled at 100 percent rollout by default. Adds EnabledByDefault to FlagSpec, parameterizes rollout in addRolloutStrategy, introduces enableFlagInEnv. Only newly created flags are affected. Change is clean and follows existing patterns. NO BLOCKERS. NO CRITICALS. NO MAJORS. Minor 1 - sync_flags.go line 545 - Accepting http.StatusCreated 201 without verification. Unleash POST environments-env-on returns 200 not 201. Restrict to StatusOK only or add a 201 test. Violates CLAUDE.md avoid over-engineering. Minor 2 - sync_flags_test.go - No test for FlagsFromManifest EnabledByDefault field. Function changed to set EnabledByDefault true for model flags but not tested. Add TestFlagsFromManifest_EnabledByDefault. Minor 3 - sync_flags.go line 503 - Non-idiomatic param grouping in addRolloutStrategy. Token is separated as standalone token string after rollout string. Group all string params together. Positives - body-drain behavior documented in PR description, consistent non-fatal warning error handling, correct string rollout param, tests follow httptest patterns, clear log messages for both states. Recommendations - 1 drop StatusCreated or test it, 2 add TestFlagsFromManifest_EnabledByDefault, 3 group token param. Generated by Claude Code claude-sonnet-4-6 |
RHOAIENG-52102
Model flags are now created enabled in the environment with 100% rollout instead of disabled at 0%. This means newly discovered models are available to users immediately after the flag sync, rather than requiring manual enablement in the Unleash admin UI.
Add EnabledByDefault field to FlagSpec. When true, addRolloutStrategy uses 100% rollout and enableFlagInEnv toggles the flag on in the environment after creation. Non-model flags (from flags.json) retain the existing disabled/0% behavior.
Add enableFlagInEnv helper that calls POST .../environments/{env}/on. Response body is only read on error to avoid unnecessary consumption.