Skip to content

[DT-3848][risk=no] Add the typed search fixture format and loader (5a/6) - #3350

Open
otchet-broad wants to merge 2 commits into
developfrom
otchet-dt-3848-fixture-test
Open

otchet-broad wants to merge 2 commits into
developfrom
otchet-dt-3848-fixture-test

Conversation

@otchet-broad

@otchet-broad otchet-broad commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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 the format and the loader for the typed search contract fixtures (src/test/resources/fixtures/typed-search/):

  • TypedSearchFixtures reads the fixtures and the key lists in registry/, which stand in for the server registry until DT-3849 builds it.
  • TypedSearchFixtureFormatTest checks the format of each fixture: its fields, the source document, the user's roles (UserRoles names), and the response envelope: a status of the contract, an error body { message, code } with code equal to the status (none for 429), and a text serverCheck, required for a 404.
  • README.md: the fixture format, for consent (DT-3849) and duos-ui (DT-4512, which copies the files).
  • registry/datasets.json: the dataset view key lists ([DT-3848][risk=no] Add the dataset view registry for typed search (2a/6) #3343) and the branded library keys (duos-ui libraryVersions.ts).
  • One fixture: dataset example 1.2, the facet metadata request.

5b (request check) and 5d (response check) are stacked on this PR; 5c (request self-test) is stacked on 5b. The fixtures follow in 5e to 5k, which need only this PR.

This is slice 5a of 6 for DT-3848. It does not depend on the documents merging first.


Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

🤖 Generated with Claude Code

Add TypedSearchFixtures, which reads the fixtures in fixtures/typed-search and the key
lists in registry/, and TypedSearchFixtureFormatTest, which checks the format of each
fixture. Add the README that describes the format, the dataset key lists, and the facet
metadata fixture. The request and response checks follow in 5b and 5c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@otchet-broad
otchet-broad requested a review from a team as a code owner November 25, 2026 22:00
@otchet-broad
otchet-broad requested review from fboulnois and kevinmarete and a balanced review from Copilot and removed request for a team November 25, 2026 22:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

All four product questions are decided, so the fixtures show the decided behaviour and need no
outcome tag; each fixture stands alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rushtong rushtong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with Claude and Codex, no medium or high findings 👍

Low Findings

  • Status has no type check: src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchFixtureFormatTest.java:73 asInt() reads "200" or 200.7 as 200.
  • Content after the first JSON value is ignored: src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchFixtures.java:52 The mapper does not enable FAIL_ON_TRAILING_TOKENS.
  • Registry files can overwrite each other: src/test/java/org/broadinstitute/consent/http/typedsearch/TypedSearchFixtures.java:62 Two files with the same view replace each other with no error, in directory order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants