Repository navigation
[DT-3848][risk=no] Add the typed search request self-test (5c/6) - #3353
Open
otchet-broad wants to merge 2 commits into
Open
otchet-broad wants to merge 2 commits into
otchet-broad wants to merge 2 commits into
Conversation
Add TypedSearchRequestSelfTest and self-test/requests.json: 24 requests that each break one rule, a request one past each limit of the contract (ids, filters, values, text), and an offset past the largest int that must pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
otchet-broad
requested review from
fboulnois and
kevinmarete
and removed request for
a team
November 25, 2026 22:00
…st-self-test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevinmarete
approved these changes
Nov 26, 2026
rushtong
reviewed
Nov 27, 2026
rushtong
left a comment
Contributor
There was a problem hiding this comment.
Reviewed with Claude and Codex.
1. [Medium] Self-test does not exercise the role rules: src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchRequestSelfTest.java:69 Each bad request runs with the roles fixed to ADMIN. The test discards the access errors and asserts only that a shape error exists. The "cannot use scope" (403) rule and the "cannot use projection" rule never fire, so their removal leaves the test green. The class Javadoc claims that each rule is checked.
Low Findings
- Limits tested only above the limit:
src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchRequestSelfTest.java:44No case asserts that a request exactly at a limit passes, so an off-by-one error stays hidden.
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.
Addresses
https://broadworkbench.atlassian.net/browse/DT-3848 (epic DT-4500)
Security risk: no — test files only; no application code or configuration changes.
Summary
Adds
TypedSearchRequestSelfTestandself-test/requests.json: 24 requests that each break one rule of the contract, a request one past each limit of contract section 6 (10,001 ids, 1,025 filters, 1,025 values, 1,001 characters of search text or of a filter value), and an offset past the largest int that must pass. Each must be rejected byTypedSearchRequestCheck.Stacked on 5b (#3351); merge that first. This is slice 5c of 6 for DT-3848.
Have you read CONTRIBUTING.md lately? If not, do that first.
🤖 Generated with Claude Code