test: cover FME rollout prompt, governance CRUD scopes, infra deep link fallbacks - #844
Closed
cursor[bot] wants to merge 2 commits into
Closed
test: cover FME rollout prompt, governance CRUD scopes, infra deep link fallbacks#844cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…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>
|
|
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds regression tests for recently merged production paths that lacked coverage:
tests/prompts/feature-flag-rollout.test.ts— dual-mode scope validation for the FME rollout prompt (feat: [FME-17249]: FME dual-mode Harness-native scope migration #806): rejects missing/partial scope (orgId-only and projectId-only), verifies legacyworkspace_idvs Harness-nativeorg_id/project_idinterpolation, and surfaces the NYI caveat for native mode.tests/registry/governance.test.ts— extends multi-scope coverage beyond list to get/create/update/delete forpolicyandpolicy_setat account/org/project scope (feat: allow account and org scope for OPA policies and policy sets #819), including symmetric get-at-org and delete-at-account/org cases.tests/registry/infrastructure.test.ts— deep-link fallbacks whenenvironmentRefis nested or only available via query param (feat: [AIPLAT-1334]: Point infrastructure openInHarness at environment Infrastructure section #809), plus update-path nestedenvironmentRefaliasing.Risky behavior now covered
openInHarnesslinks stay correct when API responses omit top-levelenvironmentRefor nest it underinfrastructure.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
Type of Change
Checklist
pnpm testpasses (targeted files)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpasses