fix: accept native FME flag create aliases and align leftover agent docs - #830
Draft
ravindraharness wants to merge 2 commits into
Draft
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>
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 takes currentmain(including the #806 squash) and lands the leftover agent-facing gaps that still produce wrong calls or stale “not yet implemented” guidance after that merge.Dual-mode routing — current
main+ this PRLegend: ✅ wired to a real endpoint · 🚫 throws a clear “not yet implemented” error in that mode · ⛔ rejected outright — deprecated resource, use its replacement · — not applicable · bold = changed in this PR
workspace_id)org_id+project_id)fme_workspaceworkspace_id)fme_environmentfme_feature_flagtraffic_type_id/traffic_typeas aliases forbody.trafficType, and fails closed ifnameis missingfme_feature_flag_definitionfme_rollout_statusfme_rule_based_segment(deprecated)fme_segmentfme_rule_based_segment_definition(deprecated)fme_segment_definitionfme_traffic_typefme_identityfme_standard_segment(deprecated)fme_segmentfme_segment_keysfme_segment/fme/api/v4/segments)fme_segment_definition/fme/api/v4/segment-definitions)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.Separately,
feature-flag-rolloutand thefme_feature_flagtest plan/report still described native update / kill / restore / archive / unarchive as NYI, which is no longer true onmain.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 use the existingnormalizeFmeTagshelper from feat: [FME-17249]: FME dual-mode Harness-native scope migration #806.src/prompts/feature-flag-rollout.ts— native-mode caveat no longer tells agents that definitions or kill/restore are unimplemented. The remaining native gap called out isfme_rollout_status.list.docs/testing/fme_feature_flag/test_plan.md/test_report.md— native update / kill / restore / archive / unarchive cases are success paths against the real v4 URLs (kill/restore → definition routes), not NYI errors. AddsTC-026cfor thetraffic_type_idalias.tests/registry/feature-flags.test.ts— coverage fortraffic_type_id→body.trafficTypeand missing-name fail-closed. Existing feat: [FME-17249]: FME dual-mode Harness-native scope migration #806 tests for merge-patch update, archive/unarchive, and native kill/restore aliases are unchanged.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.Explicitly unchanged (already on
mainvia #806)PATCH /fme/api/v4/feature-flags/{name}withContent-Type: application/merge-patch+jsononrouteResolver.headers, notspec.headers(legacy JSON Patch array is unchanged).POST …/archiveand…/unarchive./fme/api/v4/feature-flag-definitions/{name}/kill|restore|reallocatewithenvironment_idas a query param (POST, not legacyPUT).workspace_idpaths, Split product auth, and JSON Patch update bodies stay as feat: [FME-17249]: FME dual-mode Harness-native scope migration #806 left them.server.registerTool(). Nofme_environmentCRUD beyond list. No nativefme_traffic_type/fme_workspace/fme_identity/fme_rollout_status.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 }— not a string arrayType of Change
Checklist
pnpm exec vitest run tests/registry/feature-flags.test.ts tests/registry/registry.test.ts— 248 passedpnpm test— full suite not run in this worktree (pnpm typecheck/pnpm buildstill fail here on missing@huggingface/transformersin the sharednode_modules; same as the feat: [FME-17249]: FME dual-mode Harness-native scope migration #806 worktree note)pnpm typecheck— blocked on@huggingface/transformers(pre-existing, not introduced here)pnpm build— samepnpm standards:checkpnpm docs:checkCoding Standards (registry-driven MCP model)
server.registerTool()calls — only toolset definitions insrc/registry/toolsets/ALL_TOOLSETSandToolsetNameunion (unchanged — existingfeature-flagstoolset)operationPolicyon every new/changed endpoint (no new endpoints; createbodyBuilderonly)src/registry/extractors.tsidentifierFieldsandscopedeclared on new resources (none added)console.log()insrc/Test plan
body.trafficTypestill matches the feat: [FME-17249]: FME dual-mode Harness-native scope migration #806 v4 body shapetraffic_type_idand nobody.trafficTypePOSTs/fme/api/v4/feature-flagswith{ name, trafficType }and notrafficTypespath segmentResolvedRoute.headerswin overspec.headersharness_createfme_feature_flagwithorg_id+project_id+traffic_type_idagainsthttps://qa.harness.io(Cursor MCPharness-fme-pr1isHARNESS_READ_ONLY=true; flip that server or use a non-read-only stdio process)Made with Cursor