test: FME dual-mode prompt coverage and empty workspace_id scope fix - #822
Draft
cursor[bot] wants to merge 1 commit into
Draft
test: FME dual-mode prompt coverage and empty workspace_id scope fix#822cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…ce_id suppression Add regression tests for the feature-flag-rollout prompt’s Harness-native vs legacy scope validation, list-filter whitespace handling, and harness_list URL merge when filters carry an empty workspace_id. Fix registry scope injection to treat empty-string workspace_id as absent, matching applyUrlDefaults — prevents Harness-native org/project params from being dropped when agents pass a cleared workspace_id filter. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
This was referenced Aug 21, 2026
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
Triggered by PR #820 (version bump). Inspected recent merged FME dual-mode work (#806) and found meaningful regression gaps.
Risky behavior now covered
feature-flag-rolloutprompt — dual-mode scope validation (legacyworkspaceIdvs Harness-nativeorgId+projectId), partial-scope rejection, and Harness-native NYI caveat text that steers agents away from unsupported steps.workspace_idin filters no longer suppresses Harness-nativeorganization_identifier/project_identifierquery params (registry aligned withapplyUrlDefaults).org_id/project_idvalues are treated as unresolved project scope.harness_listtool path — end-to-end check that URL-derived org/project reach the FME v4 list API when filters carry a clearedworkspace_id.Test files added/updated
tests/prompts/feature-flag-rollout.test.ts(new)tests/registry/feature-flags.test.tstests/registry/list-filter-utils.test.tstests/tools/tool-handlers.test.tsProduction fix
src/registry/index.ts— treat empty-stringworkspace_idas absent when deciding whether to suppress Harness-native scope params.Why these tests materially reduce regression risk
The FME dual-mode migration is high blast-radius: agents can pass mutually exclusive scope selectors (
workspace_idvsorg_id+project_id) through prompts, filters, and URL defaults. Without these tests, a stray emptyworkspace_idfilter could silently drop scope params and produce 4xx/empty results against the Harness-native v4 API — the exact class of bug fixed in #806 forapplyUrlDefaultsbut missed in registry dispatch.Type of Change
Checklist
pnpm testpasses (targeted: prompt, feature-flags, list-filter-utils, tool-handlers — 282 tests)pnpm typecheckpassespnpm buildpassespnpm standards:checkpassespnpm docs:checkpasses (registry/tool counts unchanged)