Skip to content

feat: wire native FME traffic type and rollout status lists - #838

Merged
puthrayaharness merged 9 commits into
harness:mainfrom
ravindraharness:fme-v4-traffic-type-rollout-status
Aug 20, 2026
Merged

feat: wire native FME traffic type and rollout status lists#838
puthrayaharness merged 9 commits into
harness:mainfrom
ravindraharness:fme-v4-traffic-type-rollout-status

Conversation

@ravindraharness

@ravindraharness ravindraharness commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to #806: wire existing fme_traffic_type.list and fme_rollout_status.list to public v4 when callers pass org_id+project_id. Legacy workspace_id Split Admin paths stay (dual-mode). These lists already existed in MCP; this PR does not drop them.

Get/create/update/delete are not added — the registry still only exposes list (agents discover that from the tool surface, not from description restatement).

Dual-mode routing — this PR only

Resource Legacy (workspace_id) Harness-native (org_id+project_id)
fme_traffic_type list (Split Admin, unchanged) list (GET /fme/api/v4/traffic-types)
fme_rollout_status list (Split Admin, unchanged) list (GET /fme/api/v4/rollout-statuses)

Native contracts

  • Pagination: offset / limit (default 100, max 100). harness_list size maps to limit.
  • Response: fmeV4PaginatedListExtract promotes dataitems and totalCounttotal (not a raw passthrough envelope).
  • Mixed workspace_id + org_id/project_id is rejected by the existing dual-mode helper.

Tool-facing descriptions cover dual-mode scope, how to use harness_list, and pagination. They do not include HTTP paths, list-only restatement, or native payload field names (displayAttributeId, {data, totalCount}, etc.). README still documents the native item fields for humans.

feature-flag-rollout step 4 lists fme_rollout_status in native mode (no longer treated as NYI).

Key implementation changes

  • src/registry/toolsets/feature-flags.ts — dual-mode routeResolver for both list ops; descriptions kept tool-facing.
  • src/registry/extractors.tsfmeV4PaginatedListExtract.
  • src/prompts/feature-flag-rollout.ts — native rollout-status list is usable.
  • README Feature Flags blurbs for both resources.
  • tests/registry/feature-flags.test.ts — native/legacy routing, FME scope params, and description guards (no HTTP paths / List-only / Native items / displayAttributeId).

Type of Change

  • New feature

Checklist

  • Unit: tests/registry/feature-flags.test.ts (fme_traffic_type and fme_rollout_status dual-mode list)
  • Tool descriptions do not expose HTTP paths or native payload schemas (review follow-up)

Coding Standards (registry-driven MCP model)

  • No new server.registerTool() calls — existing feature-flags toolset extended
  • operationPolicy on every changed endpoint
  • Shared response extractors from src/registry/extractors.ts
  • identifierFields and scope declared
  • No console.log() in src/

Test plan

  • Native list uses /fme/api/v4/traffic-types and /fme/api/v4/rollout-statuses with organization_identifier / project_identifier
  • Legacy list keeps Split Admin /internal/api/v2/... paths
  • Descriptions stay tool-facing
  • Live harness_list against QA with org_id+project_id for both resource types

List already existed on the Split Admin contract, so keep workspace_id dual-mode and add the public v4 org/project paths instead of dropping legacy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant

CLAassistant commented Aug 19, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

✅ puthrayaharness
❌ cursoragent
❌ ravindraharness
You have signed the CLA already but the status is still pending? Let us recheck it.

ravindraharness and others added 3 commits August 19, 2026 17:19
Map size to Java limit, promote totalCount/data to total/items, and lock Harness auth in tests so v4 lists are not sent to Split.

Co-authored-by: Cursor <cursoragent@cursor.com>
Java SegmentKind and EnvironmentListResponse are uppercase paginated
contracts. MCP listed/created with lowercase type and dropped totalCount.
Comment thread src/registry/toolsets/feature-flags.ts Outdated
displayName: "FME Rollout Status",
description:
"Rollout status definitions for a workspace (e.g. Killed, Permanent, Ramping). Use to discover valid rollout_status_id UUIDs for filtering fme_feature_flag lists. Note: this endpoint may not be available on all account types — rollout status IDs are also returned inline with fme_feature_flag list results.",
"Rollout status definitions (e.g. Killed, Permanent, Ramping). Dual-mode list: org_id+project_id (Harness-native GET /fme/api/v4/rollout-statuses) or deprecated workspace_id (Split Admin). Use to discover rollout_status_id UUIDs for filtering fme_feature_flag lists. Native response is {data, limit, offset, totalCount}; each item is {type: \"ROLLOUT_STATUS\", id, name, description?}. List-only — no get/create/update/delete.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid exposing the details of endpoint in the description.

Comment thread src/registry/toolsets/feature-flags.ts Outdated
displayName: "FME Traffic Type",
description:
"Traffic type in a workspace (e.g. 'user', 'account'). List traffic types to discover traffic_type_id values needed for identity queries and flag/segment creation.",
"Traffic type (e.g. 'user', 'account'). Dual-mode list: org_id+project_id (Harness-native GET /fme/api/v4/traffic-types) or deprecated workspace_id (Split Admin). Use to discover traffic_type_id / name values for flag and segment create. Native items are {type: \"TRAFFIC_TYPE\", id, name} — no displayAttributeId. List-only — no get/create/update/delete.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here let's avoid exposing the details of the underlying end points. Provide details of tool.

Also it is clear that is listing and has not GET/CREATE etc

cursoragent and others added 2 commits August 20, 2026 00:56
Remove API path and response envelope details from the resource
description per review feedback; keep dual-mode scoping guidance.

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Replace resource description with tool-focused wording: list-only via
harness_list, dual-mode scoping, and pagination. Removes underlying
API path and Split Admin references per review feedback.

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
ravindraharness and others added 2 commits August 20, 2026 14:43
Review asked for MCP tool semantics (scope, pagination, item fields), not HTTP paths or list-only restatement.
Review asked for tool semantics (scope and pagination), not wire-shape fields such as displayAttributeId.

Co-authored-by: Cursor <cursoragent@cursor.com>
@puthrayaharness

Copy link
Copy Markdown
Contributor

@cursor Can you resolve the merge conflicts and push?

@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

I've successfully resolved the merge conflicts and pushed the changes.

What I did:

  • Merged main into the fme-v4-traffic-type-rollout-status branch
  • Resolved a conflict in README.md by:
    • Keeping the more detailed fme_feature_flag_definition description from main (which includes info about native-only operations)
    • Keeping the updated fme_rollout_status dual-mode list implementation from this branch (which is what this PR adds)
  • Committed the merge with a descriptive message
  • Pushed the changes to the remote repository

Current status:

  • Branch: fme-v4-traffic-type-rollout-status
  • PR: #838
  • State: OPEN and MERGEABLE
  • Latest commit: 3c227df7 (merge commit)

The PR is now ready for further review and can be merged when approved.

Open in Web Open in Cursor 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants