Repository navigation
Conversation
DEV-230024 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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 of your changes
DEV-230024
What was wrong.
get_assessmentstoredlimitas a plainintwithomitempty, solimit: 0looked the same as "not set" and the API default of 10 applied. The tool returned 10 assessments where the REST API returns a 400. A limit above 50 reached the API and came back as a generic "Failed to retrieve assessment" error.What changed.
Input.LimitandListAssessmentsParams.Limitare now*int, the same way the classification clients handle limit, so an explicit 0 is no longer treated as "not set".limit must be between 1 and 50; got Nbefore any API call. Leavinglimitout keeps the API default.edit_assessmentpasses its fixed limit of 50 as a pointer.One side effect: a direct lookup (
assessmentIdorassessmentReviewId) sent together withlimit: 0now gets the existing "cannot be combined with filters" error. Before, the 0 was silently dropped.How it was tested. New unit tests in
pkg/tools/get_assessment/tool_test.goagainst a stub server:limitquery parameter{"limit": 0}decoded from JSON arguments is rejectedgo test -race ./...passes (790 tests, 61 packages), including the schema tests inpkg/chip(TestRegisteredToolParamsHaveNoNullableUnions,TestNoToolDeclaresABooleanSubschema). The pointer field still produces a plainintegerin the input schema.go vetand golangci-lint v2.15.0 report nothing.Impact Analysis
The change is limited to the
get_assessmentinput and the assessments list client.edit_assessmentis the only other caller ofListAssessmentsParamsand sends the same request as before. Other tools (find_dq_rules,list_asset_types) still treat limit 0 as "use the default". This ticket doesn't cover them.Checklist
🤖 Generated with Claude Code