Skip to content

feat: create model flags enabled with 100% rollout by default#828

Merged
Gkrumbach07 merged 1 commit intomainfrom
feat/model-flags-enabled-by-default
Mar 5, 2026
Merged

feat: create model flags enabled with 100% rollout by default#828
Gkrumbach07 merged 1 commit intomainfrom
feat/model-flags-enabled-by-default

Conversation

@maskarb
Copy link
Copy Markdown
Contributor

@maskarb maskarb commented Mar 5, 2026

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.

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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2026

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

@Gkrumbach07 Gkrumbach07 merged commit 647947d into main Mar 5, 2026
22 checks passed
@Gkrumbach07 Gkrumbach07 deleted the feat/model-flags-enabled-by-default branch March 5, 2026 22:39
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