Skip to content

Comments

feat: Remove variants from calibration responses, add dedicated variant endpoints#663

Open
bencap wants to merge 2 commits intorelease-2026.1.1from
feature/bencap/659/calibration-performance-improvements
Open

feat: Remove variants from calibration responses, add dedicated variant endpoints#663
bencap wants to merge 2 commits intorelease-2026.1.1from
feature/bencap/659/calibration-performance-improvements

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Feb 19, 2026

Score set API responses were slow (5+ seconds) because functional classifications eagerly serialized thousands of variants. This moves variant data to dedicated endpoints while keeping a lightweight variant_count summary in the default response.

Changes:

  • Remove variants field from functional classification view models
  • Add id and variant_count fields to SavedFunctionalClassification
  • Add variant_count column_property on the ORM model using a correlated COUNT subquery against the association table
  • Add FunctionalClassificationVariants response model
  • Add GET /{urn}/functional-classifications/{id}/variants endpoint
  • Add GET /{urn}/variants endpoint (all classifications)
  • Update test constants and assertions for new response shape

Breaking change: clients relying on variants in calibration responses must migrate to the new dedicated endpoints.

@bencap bencap requested review from jstone-dev and sallybg February 19, 2026 02:21
@bencap bencap linked an issue Feb 19, 2026 that may be closed by this pull request
16 tasks
@bencap bencap changed the title feat: remove variants from calibration responses, add dedicated variant endpoints feat: Remove variants from calibration responses, add dedicated variant endpoints Feb 19, 2026
…nt endpoints

Score set API responses were slow (5+ seconds) because functional
classifications eagerly serialized thousands of variants. This moves
variant data to dedicated endpoints while keeping a lightweight
variant_count summary in the default response.

Changes:
- Remove `variants` field from functional classification view models
- Add `id` and `variant_count` fields to SavedFunctionalClassification
- Add `variant_count` column_property on the ORM model using a
  correlated COUNT subquery against the association table
- Add `FunctionalClassificationVariants` response model
- Add GET /{urn}/functional-classifications/{id}/variants endpoint
- Add GET /{urn}/variants endpoint (all classifications)
- Update test constants and assertions for new response shape

Breaking change: clients relying on `variants` in calibration responses
must migrate to the new dedicated endpoints.
@bencap bencap force-pushed the feature/bencap/659/calibration-performance-improvements branch from fc3371d to 2e46417 Compare February 19, 2026 21:59
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.

Performance: Move Calibration Variants to Separate Endpoints

1 participant