Repository navigation
fix: send the slug on feature flag update, so the flag keeps it - #7
Merged
Merged
Conversation
Alex (Alexkuva)
previously approved these changes
Oct 16, 2026
feature_flags.update sent no slug, because the path already names the flag. Kaiten writes the body's slug as the flag's own, so every update through the SDK blanked it: the flag could no longer be read, updated or deleted, and the next such update failed with a 500 (kaitencloud/kaiten#55 fixes the server side). update now always sends a slug: the path's, or the new one passed as slug=, which is how a flag is renamed. Flags are the only resource whose update writes the slug; the others keep ignoring it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: tomflenner <flennertom@gmail.com>
backtrack5r3 (tomflenner)
force-pushed
the
fix/flag-update-sends-slug
branch
from
October 16, 2026 17:52
e176860 to
0e85a7c
Compare
backtrack5r3 (tomflenner)
enabled auto-merge (squash)
October 16, 2026 17:56
Alex (Alexkuva)
self-requested a review
October 16, 2026 17:57
Alex (Alexkuva)
approved these changes
Oct 16, 2026
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.
What does this PR change?
feature_flags.update(sync and async) always sends aslug: the path's by default, or a new one passed asslug=, which renames the flag. Intest_contract.py,update-feature-flagmoves fromforbidden={"slug"}torequired={"slug"}, and there is a CHANGELOG entry under Unreleased.Why?
Kaiten's
PUT /feature-flags/{slug}writes the body's slug as the flag's own. The SDK sent none, because the path already names the flag, so every update through the SDK blanked the flag's slug:uq_feature_flags_slug.Found while building the MCP server on this SDK (kaitencloud/mcp#1). kaitencloud/kaiten#55 fixes the server, so an omitted slug keeps the current one. This change makes the SDK correct against servers on either side of that fix.
I checked every update query in kaiten: flags are the only resource whose update writes the slug. The other resources keep
forbidden={"slug"}, and this PR doesn't touch them.Testing
task check: generate:check, ruff, mypy --strict, 748 passed.test_a_feature_flag_update_keeps_its_slug_unless_renamed: the default sends the path's slug;slug=sends the new one while the PUT still addresses the old.updateleft the flag withslug = ''.Checklist
CONTRIBUTING.md.Signed-off-byline.🤖 Generated with Claude Code