SEP-1789: Validate list_view column keys against the model the list route actually serializes - #1369
Open
peter-o-addo wants to merge 8 commits into
Open
SEP-1789: Validate list_view column keys against the model the list route actually serializes#1369peter-o-addo wants to merge 8 commits into
list_view column keys against the model the list route actually serializes#1369peter-o-addo wants to merge 8 commits into
Conversation
peter-o-addo
marked this pull request as ready for review
August 19, 2026 14:56
peter-o-addo
requested review from
marcuscruz-percona and
yyyyyyyan
as code owners
August 19, 2026 14:56
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns TaskExecutionApp response-model validation with the model serialized by derived list routes.
Changes:
- Exposes response-model resolution and validates builder/model agreement.
- Documents the required response contract.
- Adds mismatch, matching, and annotation tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
app/sep/apps/framework/api.py |
Exposes response-model resolution. |
app/sep/apps/framework/apps.py |
Adds construction-time agreement validation. |
docs/development/app-developer-guide.md |
Documents builder/model matching. |
tests/app/sep/apps/framework/test_apps.py |
Covers validation behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@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.
Summary
Reject TaskExecutionApp definitions where
response_modeldisagrees with an explicitresponse_builder, so list-view column validation and the derived list route measure the same model.app/sep/apps/framework/api.py,app/sep/apps/framework/apps.py: exportresolve_response_model, add construction-time agreement validation betweenresponse_modelandresponse_builder, and document that an explicit builder must declare the same return type.docs/development/app-developer-guide.md: note thatresponse_modelmust match an explicitresponse_builder's return annotation.tests/app/sep/apps/framework/test_apps.py: cover mismatch rejection, matching annotation acceptance, unchangedTypeErrorfor unannotated builders, and update the existing builder override fixture.Tested
response_builderreturns a different model thanresponse_model, app construction fails and the error mentions both model names.response_builderhas no return type annotation, construction raisesTypeErrorinstead ofValueError.response_builderandresponse_modelmatch, construction succeeds and the list route uses the builder’s model.response_builderis provided, or when using a schema passthrough app, construction still succeeds unchanged.Checklist
make test)make run-pre-commit)make makemigrations)changelog.d/if the change is user-facing (make changelog-add), or confirmed N/A (internal-only change, or a same-release-cycle fix for an unreleased sibling ticket)