fix: resource_scope fail-loud dispatch, search type filtering, Zod descriptions#184
Draft
thisrohangupta wants to merge 10 commits into
Draft
fix: resource_scope fail-loud dispatch, search type filtering, Zod descriptions#184thisrohangupta wants to merge 10 commits into
thisrohangupta wants to merge 10 commits into
Conversation
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
Fail dispatch when resource_scope is org or project but org_id/HARNESS_ORG or project_id/HARNESS_PROJECT are absent, so requests do not widen silently. harness_search now limits target types to definitions that support the requested scope. Zod 4 resource_scope fields use .optional().describe() so descriptions are preserved for agents. Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
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
Addresses the three architecture-review items raised on PR #182 (explicit
resource_scopefail-open behavior, broadharness_searchfan-out, and Zod 4.describe()ordering).resource_scopetoorgorproject, require a resolved organization (fromorg_idorHARNESS_ORG) and, for project scope, a resolved project (project_idorHARNESS_PROJECT) before building the request. This prevents empty scope params from widening the API call.harness_search: After URL defaults merge, filter list targets to resource types wheresupportsResourceScopeincludes the requested scope. Return a clear user-facing error if nothing remains. AddedRegistry.supportsResourceScope()for reuse.resource_scopeonharness_list,harness_get, andharness_searchnow uses.optional().describe(...)so descriptions are preserved for agents (Zod 4).Tests: new registry cases for missing org/project under explicit scope; new search case for
pipelines,connectors+resource_scope: accountensuring no pipeline list calls.Type of Change
Checklist
pnpm teston touched suites;pnpm typecheck;pnpm build)Note: This branch is based on the current head of PR #182 so the review fixes stack cleanly; it can be merged after #182 or the commits can be cherry-picked onto that PR branch as preferred by maintainers.
Slack Thread