Skip to content

test: cover FME rollout prompt, governance CRUD scopes, infra deep links - #829

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-ae6a
Closed

test: cover FME rollout prompt, governance CRUD scopes, infra deep links#829
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/missing-test-coverage-ae6a

Conversation

@cursor

@cursor cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for three recently merged high-risk code paths that lacked write-operation and prompt-level coverage.

Risky behavior now covered

  1. FME dual-mode rollout prompt (feat: [FME-17249]: FME dual-mode Harness-native scope migration #806) — feature-flag-rollout must reject missing/partial scope, interpolate workspace_id vs org_id/project_id correctly, and surface the Harness-native NYI caveat when appropriate.
  2. Governance multi-scope CRUD (feat: allow account and org scope for OPA policies and policy sets #819) — policy and policy_set get/create/update/delete must inject the same resource_scope account/org/project query params as list (previously only list was tested).
  3. Infrastructure deep links (feat: [AIPLAT-1334]: Point infrastructure openInHarness at environment Infrastructure section #809) — openInHarness must resolve environmentIdentifier from nested infrastructure.environmentRef and from the environment_id input param when the API response omits environmentRef.

Test files added/updated

File Change
tests/prompts/feature-flag-rollout.test.ts New — 7 tests for dual-mode scope validation and prompt content
tests/registry/governance.test.ts Updated — 10 tests for get/create/update/delete multi-scope dispatch
tests/registry/infrastructure.test.ts Updated — 2 tests for nested envRef aliasing and param fallback

Why these tests materially reduce regression risk

  • FME rollout prompt steers agents through kill/restore workflows; wrong scope interpolation sends them to the wrong API branch (legacy Split.io vs Harness-native v4).
  • Governance CRUD scope symmetry was the exact bug class fixed in feat: allow account and org scope for OPA policies and policy sets #819 — agents creating account-level policies must be able to get/update/delete at the same scope.
  • Infrastructure deep links regress silently (broken UI links) when environmentRef is nested or only present in request params.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (test coverage)

Checklist

  • pnpm test passes (78 targeted tests)
  • pnpm build passes
  • pnpm typecheck passes
  • pnpm standards:check passes
  • pnpm docs:check passes (no registry changes)

Coding Standards

No production code changes — test-only PR.

Open in Web View Automation 

Add regression tests for recently merged high-risk paths:

- feature-flag-rollout prompt: dual-mode scope validation (workspaceId vs
  orgId+projectId) and Harness-native NYI caveat surfacing (#806)
- policy/policy_set get/create/update/delete: verify resource_scope
  account/org/project param injection matches list behavior (#819)
- infrastructure deep links: nested environmentRef aliasing and
  environment_id param fallback when API omits environmentRef (#809)

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
@CLAassistant

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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing as superseded by newer follow-ups #842 and #845, which cover the same FME rollout, governance CRUD, and infrastructure paths against current main.

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.

3 participants