Repository navigation
trunk-merge/pr-120691/800b90a2-2046-4753-a786-d70c06fbd2ea - #123121
Closed
trunk-io[bot] wants to merge 14 commits into
Closed
trunk-io[bot] wants to merge 14 commits into
trunk-io[bot] wants to merge 14 commits into
Conversation
MCP tools that return a flag's release conditions add a condition_id to each one: the flag read, create, update, delete, and rollout tools, my-flags, and the experiment tools that return the linked flag. update-feature-flag accepts condition_id on each condition, removes it before the PATCH, and its description tells agents to send it back unchanged and leave it off a new condition. The flag eval scorer ignores condition_id when it compares written filters. Claude-Session: https://claude.ai/code/session_016Awscf6jzRL847o3w729PS
- services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: a group property whose sent or stored index differs from the group type its source aggregates on keeps that index, so the API rejects the stored shape instead of the merge changing which group the filter reads - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: typed group properties that repeat the source's filters no longer move the set to their group type
- services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: a stored group property with no group_type_index follows its set, because the evaluator reads it on the set's group type - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: a person-aggregated source's group property keeps its index when the set moves to a group type - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: when the stored filters on a key sit on different group types and the agent sends no index, the property stays as the agent sent it, so an untyped echo fails the API's type check under every enforcement setting - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: the matched-set calls pass each set's own aggregation
- services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: groupTypeIndexFor maps each stored index through one rule before picking a typing, so a filter on the source's group type and one without an index agree - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: the stored-set list for the echo check comes from one place and includes the source at any aggregation - services/mcp/tests/unit/preserve-group-targeting.test.ts: the legacy table drops its constant expected column
- services/mcp/src/tools/featureFlags/updateFeatureFlagHooks.ts: the API's group_property_type_index_mismatch rejection gains a recovery step that tells the agent to ask the user which group type the condition should target instead of changing either index itself
- services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: without condition_id, a set keeps a group type its source holds only when it repeats the source's filters and no other stored set has them, so a deletion or a swap no longer moves another condition's older group type onto a filter - services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: mergeProperty takes the property's source as one object, and groupTypeIndexFor names its keep rule - services/mcp/tests/unit/preserve-group-targeting.test.ts: rows for a deletion and a swap without condition_id, a retarget of a key stored on two group types, and an index the agent sends on another group type - services/mcp/tests/unit/update-feature-flag-preserving-groups.test.ts: the describe block covers every rejected property error
- services/mcp/src/tools/featureFlags/preserveGroupTargeting.ts: typeSetProperties builds one PropertySource, groupTypeIndexFor uses one index closure, and matchSetsByPositionAndContent computes each filter signature once - services/mcp/tests/unit/preserve-group-targeting.test.ts: drop the swap row, which takes the deletion row's path, and derive the sent property from the fixture
On a flag whose group-aggregated condition holds a group property on another group type, a payload without condition_id is refused unless each condition repeats the filters of the stored condition at its index and no other stored condition has the same filters. A group_type_index the agent sends stays unless it equals its source's aggregation.
A stacked follow-up PR adds it to the experiment tools.
Author
trunk-io
Bot
deleted the
trunk-merge/pr-120691/800b90a2-2046-4753-a786-d70c06fbd2ea
branch
October 25, 2026 03:13
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.
This pull request was created and is being managed by Trunk Merge.
This pull request is based on the master branch at SHA 3dcce7bc74903c4593e2382b18937e3bafad00dd.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 120691.