Improve KFS request validation - #4462
Open
atobiszei wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves KServe (KFS) request validation by centralizing and extending coherency checks for raw_input_contents, and adds regression tests to ensure invalid requests are rejected consistently across both predict and MediaPipe paths.
Changes:
- Added a coherency validation that rejects requests where
raw_input_contents.size() != inputs_size(). - Removed a duplicated
raw_input_contentsvsinputscount check from the MediaPipe graph execution path in favor of the centralized validator. - Added unit tests covering the raw input contents count mismatch for both predict validation and MediaPipe inference.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/test/predict_validation_test.cpp | Adds a test case asserting invalid status when raw input buffer count doesn’t match input tensor count. |
| src/test/mediapipe_validation_test.cpp | Adds a test case asserting MediaPipe infer rejects raw buffer count mismatches. |
| src/kfs_frontend/kfs_utils.cpp | Adds centralized raw_input_contents vs inputs_size() coherency validation and updates includes. |
| src/kfs_frontend/kfs_graph_executor_impl.cpp | Removes the local raw buffer count check now covered by centralized validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
michalkulakowski
approved these changes
Aug 20, 2026
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.
JIRA:CVS-192922