test: cover FME rollout prompt, governance CRUD scopes, infra deep links - #836
test: cover FME rollout prompt, governance CRUD scopes, infra deep links#836cursor[bot] wants to merge 1 commit into
Conversation
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>
|
|
There was a problem hiding this comment.
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.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
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.
Sent by Cursor Automation: Autofix PR review comments


Description
Adds regression tests for recently merged production paths that lacked CRUD/prompt-level coverage:
tests/prompts/feature-flag-rollout.test.ts— dual-mode scope validation (workspaceIdvsorgId+projectId) and Harness-native NYI caveat for the FME rollout prompt (feat: [FME-17249]: FME dual-mode Harness-native scope migration #806)tests/registry/governance.test.ts—get/create/update/deleteresource_scopeparam injection forpolicyandpolicy_setat account/org/project (feat: allow account and org scope for OPA policies and policy sets #819)tests/registry/infrastructure.test.ts— nestedenvironmentRefaliasing andenvironment_idparam fallback foropenInHarnessdeep links (feat: [AIPLAT-1334]: Point infrastructure openInHarness at environment Infrastructure section #809)Type of Change
Checklist
pnpm testpasses (78 targeted tests)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpassesRisky behavior now covered
workspace_id.environmentRefor caller-suppliedenvironment_idstill 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.