Skip to content

test: cover FME rollout prompt, governance CRUD scopes, infra deep link fallbacks - #844

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-e764
Closed

test: cover FME rollout prompt, governance CRUD scopes, infra deep link fallbacks#844
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-e764

Conversation

@cursor

@cursor cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Description

Adds regression tests for recently merged production paths that lacked coverage:

Risky behavior now covered

  1. Agents invoking the rollout prompt without valid scope get a clear error instead of generating broken MCP call instructions.
  2. Account/org scoped OPA policy CRUD no longer relies solely on list-path tests — write and delete paths are pinned across all scopes.
  3. Infrastructure openInHarness links stay correct when API responses omit top-level environmentRef or nest it under infrastructure.

Test files added/updated

  • tests/prompts/feature-flag-rollout.test.ts (new)
  • tests/registry/governance.test.ts (extended)
  • tests/registry/infrastructure.test.ts (extended)

Why these tests materially reduce regression risk

These paths sit on shared registry dispatch and prompt wiring with high agent blast radius. Scope mis-resolution or broken deep links fail silently in production but are cheap to assert in unit tests.

Validation

pnpm test tests/prompts/feature-flag-rollout.test.ts tests/registry/governance.test.ts tests/registry/infrastructure.test.ts
# 86 tests passed

Type of Change

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

Checklist

  • pnpm test passes (targeted files)
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm standards:check passes
  • pnpm docs:check passes
Open in Web View Automation 

cursoragent and others added 2 commits August 20, 2026 10:03
…nk fallbacks

Add regression tests for recently merged production paths:
- feature-flag-rollout prompt dual-mode scope validation (#806)
- policy/policy_set get/create/update/delete resource_scope (#819)
- infrastructure openInHarness param and nested response fallbacks (#809)

Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Add symmetric multi-scope coverage for policy/policy_set get (org) and
delete (account/org), a projectId-only guard on the FME rollout prompt,
and infrastructure update openInHarness nested environmentRef aliasing.

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 stale after #838: this branch still retains the removed native-rollout NYI expectation. #842 and #845 carry the current post-#838 coverage.

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