feat: wire native FME feature flag definition list, delete, and execute - #831
Open
ravindraharness wants to merge 3 commits into
Open
feat: wire native FME feature flag definition list, delete, and execute#831ravindraharness wants to merge 3 commits into
ravindraharness wants to merge 3 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
ravindraharness
marked this pull request as ready for review
August 18, 2026 11:10
Contributor
Review —
|
docs: check failed because the README still omitted native-only list/delete/execute; this also adds identifier-guard tests and drops the stale native-mode caveat. Co-authored-by: Cursor <cursoragent@cursor.com>
Agents still pass legacy top-level traffic_type_id; native create only read body.trafficType and could POST a missing name. Co-authored-by: Cursor <cursoragent@cursor.com>
11 tasks
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.
Description
Follow-up to #806 for remaining FME feature flag definition operations, plus the leftover native flag create input aliases from #830 (that PR is closed as a duplicate of this delta).
#806 dual-moded get / create / update (
workspace_idororg_id+project_id). MCP never had list, delete, kill, restore, or reallocate onworkspace_idfor this resource, so those five operations are Harness-native only. This PR does not invent a legacy Split v2 MCP contract for them.Definition get/create/update are unchanged from #806 (legacy still uses
/internal/api/v2/splits/...; native still uses/fme/api/v4/feature-flag-definitionswith PATCH + JSON Merge Patch on update).Dual-mode routing — this PR only
Legend: wired · native-only (rejects
workspace_id) · unchanged from #806workspace_id)org_id+project_id)fme_feature_flag_definitionfme_feature_flagcreatetraffic_type_id/traffic_typealiases; fails closed ifnameis missingNative contracts (new in this PR)
GET /fme/api/v4/feature-flag-definitions. Requiresfeature_flag_name. Pagination islimit/offset(default 100, max 100). Noenvironment_id— definitions are listed across environments for that flag.DELETE /fme/api/v4/feature-flag-definitions/{feature_flag_name}withenvironment_idas a query param.POST /fme/api/v4/feature-flag-definitions/{feature_flag_name}/{kill|restore|reallocate}withenvironment_idas a query param. Optional bodycomment/title(same schema as flag-level kill/restore/reallocate). High-write, no retry.workspace_idon list/delete/kill/restore/reallocate throws: Harness-native (org_id/project_id) only — MCP never supportedworkspace_idfor this operation (get/create/update remain dual-mode). Mixedworkspace_id+org_id/project_idis still rejected by the existing dual-mode helper.Kill/restore/reallocate on this resource hit the same native endpoints as
fme_feature_flag; either resource works.Native flag create aliases (absorbed from #830)
Agents still pass legacy top-level
traffic_type_id. Native v4 requirestrafficTypein the JSON body. This PR mapsbody.trafficType|traffic_type_id|traffic_type|body.traffic_typeintotrafficTypeonPOST /fme/api/v4/feature-flags(never in the path), and throws ifnameis missing instead of POSTingundefined.Not included from #830: the rollout-prompt NYI rewrite (already handled here / in #838) and the generic
ResolvedRoute.headersfixture (merge already shipped in #806).Key implementation changes
src/registry/toolsets/feature-flags.tsplus unit tests. Noregistry/index.tsortypes.tschanges.resolveNativeOnlyDefinitionRoute(immediately abovefeatureFlagsToolset) for the five new ops. Get/create/update still useresolveFmeDualMode.listFilterFields: requiredfeature_flag_name, optionaloffset/limit.fmeFeatureFlagKillRestoreReallocateSchemaandfmeActionExtract.fme_feature_flag.createbodyBuilder accepts traffic-type aliases and requiresname.src/prompts/feature-flag-rollout.ts: native-mode caveat no longer claims definition ops are unimplemented (rollout-status still is on this branch; feat: wire native FME traffic type and rollout status lists #838 wires that list).docs/testing/fme_feature_flag_definition/test_plan.mdcover native-only list/delete/execute.Type of Change
Checklist
tests/registry/fme-feature-flag-definition-native-only.test.ts(identifier guards for list/delete/kill) +tests/registry/feature-flags.test.tsdual-mode get/create/update and create aliasespnpm docs:checkpasses (README matrix)Coding Standards (registry-driven MCP model)
server.registerTool()calls — only toolset definitions insrc/registry/toolsets/ALL_TOOLSETS(unchanged — existingfeature-flagstoolset extended)operationPolicyon every new/changed endpointsrc/registry/extractors.tsidentifierFieldsandscopedeclaredconsole.log()insrc/Test plan
feature_flag_name+limit/offsetand does not putenvironment_idin the pathworkspace_idrejected on list/delete/kill/restore/reallocate/fme/api/v4/feature-flag-definitions/{name}(with action suffix for execute)feature_flag_nameon list and missingenvironment_idon delete/kill fail before any requesttraffic_type_idPOSTs{ name, trafficType }with notrafficTypespath segment