fix: accept native FME flag create aliases and align leftover agent docs - #830
Closed
ravindraharness wants to merge 2 commits into
Closed
fix: accept native FME flag create aliases and align leftover agent docs#830ravindraharness wants to merge 2 commits into
ravindraharness wants to merge 2 commits into
Conversation
Public v4 create already shipped in harness#806, but agents still pass traffic_type_id the way they do for legacy create, and the rollout prompt plus test plan still claimed kill/restore were NYI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
Those markdown files are not part of the create-alias change, and rewriting NYI rows or pass counts without a fresh live run only adds review noise. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Closing as duplicate of the remaining product fix, which is now on #831 ( Kept: native Dropped from this PR:
|
17 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 (
feat: FME dual-mode Harness-native scope migration).#806 already wired Harness-native
fme_feature_flagcreate / update (JSON Merge Patch) / archive / unarchive, plus kill / restore / reallocate aliases onto/fme/api/v4/feature-flag-definitions/{name}/…. This PR does not re-implement those routes. It lands leftover agent-facing create input gaps that still produce wrong calls after that merge.Why this follow-up exists
Agents that already know the legacy create contract pass
traffic_type_idat the top level (it is a path param on Split v2). Native v4 requirestrafficTypein the JSON body, not in the path. After #806, that top-level field was ignored and create failed with “trafficType is required in body”, even though the caller had a traffic type. Native create could also POST{ name: undefined }ifbody.namewas omitted.feature-flag-rolloutno longer tells agents that native definitions or kill/restore are unimplemented. On this branch,fme_rollout_status.listin native mode is still called out as a remaining gap (wired separately in #838).Key implementation changes
src/registry/toolsets/feature-flags.ts— nativecreatebodyBuilderresolvestrafficTypefrombody.trafficType, thentraffic_type_id,traffic_type, orbody.traffic_type. Missing traffic type or missingnamethrows a clear error. The wire body is still{ name, trafficType, description?, tags?, owners? }onPOST /fme/api/v4/feature-flags(no traffic type in the path). Tag wrapping continues to usenormalizeFmeTags.src/prompts/feature-flag-rollout.ts— native-mode caveat no longer claims definitions or kill/restore are unimplemented.tests/registry/feature-flags.test.ts—traffic_type_id→body.trafficTypeand missing-name fail-closed.tests/registry/registry.test.ts— fixture provingResolvedRoute.headersoverrideEndpointSpec.headers(route wins). Dispatch merge itself shipped in feat: [FME-17249]: FME dual-mode Harness-native scope migration #806; this is the missing unit coverage.This PR does not change
docs/testing/fme_feature_flag/test_plan.mdortest_report.md.Explicitly unchanged (already on
mainvia #806)PATCH /fme/api/v4/feature-flags/{name}withContent-Type: application/merge-patch+jsononrouteResolver.headers.POST …/archiveand…/unarchive.environment_idas a query param.server.registerTool(). Nofme_environmentCRUD beyond list on this branch. No nativefme_traffic_type/fme_workspace/fme_identity/fme_rollout_statuson this branch (feat: wire native FME traffic type and rollout status lists #838 / feat: add native-only FME environment get, create, update, and delete #833 cover those).Native create body (after this PR)
namebody.nameorinput.nametrafficTypebody.trafficType|traffic_type_id|traffic_type|body.traffic_typedescriptionbody.descriptiontagsbody.tags{ name }ownersbody.owners{ type: "USER", id | email }or{ type: "GROUP", identifier }Type of Change
Checklist
tests/registry/feature-flags.test.ts+tests/registry/registry.test.tsbodyBuilder+ prompt onlyCoding Standards (registry-driven MCP model)
server.registerTool()callsfeature-flagstoolsetconsole.log()insrc/Test plan
body.trafficTypestill matches the feat: [FME-17249]: FME dual-mode Harness-native scope migration #806 v4 body shapetraffic_type_idPOSTs/fme/api/v4/feature-flagswith{ name, trafficType }ResolvedRoute.headerswin overspec.headersharness_createfme_feature_flagwithorg_id+project_id+traffic_type_idagainst QA