Skip to content

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

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

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

Conversation

@cursor

@cursor cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for recently merged production paths that lacked CRUD/prompt-level coverage:

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other — test coverage

Checklist

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

Risky behavior now covered

  1. FME rollout prompt scope gate — agents calling the prompt without valid scope get a clear error instead of generating broken rollout instructions; Harness-native mode surfaces the NYI caveat for steps that still require legacy workspace_id.
  2. Governance multi-scope CRUD — account/org/project scope params are correctly injected (or omitted) on get/create/update/delete, preventing silent wrong-scope API calls.
  3. Infrastructure deep links — list/get responses with nested environmentRef or caller-supplied environment_id still produce correct Harness UI links.

Why these tests materially reduce regression risk

These paths are high-blast-radius: the FME dual-mode migration and governance scope expansion changed shared dispatch behavior. A regression would misroute API calls or emit broken deep links without obvious runtime errors. The tests lock the request-shape contracts and prompt validation that production code now depends on.

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.

@puthrayaharness
puthrayaharness marked this pull request as ready for review August 20, 2026 22:24

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR Risk Assessment — Very Low

Evidence (diff-only)

File Change
tests/prompts/feature-flag-rollout.test.ts New (+123) — prompt scope validation & dual-mode tests
tests/registry/governance.test.ts Modified (+90) — CRUD scope param injection tests
tests/registry/infrastructure.test.ts Modified (+46) — deep-link fallback/alias tests

Total: 3 files, +259 / −0. No src/ or production code changes.

Risk factors

  • Codepaths: Test suite only; exercises existing prompt, registry dispatch, and deep-link extractors via mocks.
  • Blast radius: None — no runtime behavior changes.
  • Complexity: Straightforward Vitest cases with in-memory MCP transport and mocked HTTP client.
  • Infra / security / user-facing: No impact.

Decision

Item Result
Risk level Very Low
Review required No
Reviewers assigned None (not warranted at this level)
Approval Already approved by @puthrayaharness on 5b571aa — no additional approval from this automation
CODEOWNERS None configured in this repo

CI checks (build-and-test, smoke tests) are green. This PR adds regression coverage for recently merged production paths and is safe to merge from a risk perspective.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No inline review comments were found on this PR to address.

Checked via GitHub API (pull review comments, review threads, and issue comments). The only review is an approval from @puthrayaharness with no inline feedback. No code changes were made.

Open in Web View Automation 

Sent by Cursor Automation: Autofix PR review comments

@thisrohangupta

Copy link
Copy Markdown
Collaborator

Closing as superseded. This PR duplicates the older FME rollout/governance/infrastructure coverage and encodes the pre-native-support caveat. The current coverage and cleanup are being consolidated in #842, with the small source cleanup from #845 folded there.

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