Verified Input Sanitizer Safety for #service Payloads and added buttons Field to OrchestrationResponse and TestOrchestrationResponse#367
Open
nuwangeek wants to merge 52 commits intobuerokratt:wipfrom
Open
Conversation
Get update from wip into llm-316
Get update from llm-316
Intent enrichment pipeline (buerokratt#319)
get update from wip into llm-304
Service layer validation in tool classifier (buerokratt#321)
Get update from wip
Pulling changes from BYK wip to LLM-Module WIP
Get update from wip into optimization/data-enrichment
…mance improvement
Get update from optimization/data-enrichment into optimization/vector-indexer
Optimize intent data enrichment and service classification (buerokratt#325)
Optimize first user query response generation time (buerokratt#326)
Get update from llm-309 before getting context generation workflow changes
Get update from llm-310 into llm/service-integration
Get update from llm-310
Context based response generation workflow (buerokratt#327)
Sync wip branches 3/18/2026
There was a problem hiding this comment.
Pull request overview
This PR extends the orchestration response schema to optionally include “choice buttons” metadata and adds a new unit test suite focused on ensuring InputSanitizer preserves #service, /METHOD/... routing prefixes while stripping HTML.
Changes:
- Added an optional
buttonsfield toOrchestrationResponseandTestOrchestrationResponse. - Logged
buttonsin/orchestrateand/orchestrate/testhandlers and mappedbuttonswhen convertingOrchestrationResponse -> TestOrchestrationResponse. - Added
tests/test_input_sanitizer.pycovering#serviceprefix pass-through, HTML stripping, and whitespace normalization expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
tests/test_input_sanitizer.py |
Adds sanitizer regression tests around #service prefix preservation and HTML/whitespace handling. |
src/models/request_models.py |
Introduces optional buttons field on orchestration response models. |
src/llm_orchestration_service_api.py |
Logs buttons and propagates it into TestOrchestrationResponse conversion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…uttons - Improved logging for button presence and count in orchestration requests. - Introduced ChoiceButton model for better structure in orchestration responses. - Updated OrchestrationResponse and TestOrchestrationResponse to use ChoiceButton. - Adjusted input sanitizer to unescape HTML before stripping tags for better security. - Added unit test to ensure entity-encoded script tags are handled correctly.
fixed the test production UI issue (buerokratt#366)
Get update from wip
This was referenced Mar 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.
This pull request adds support for including optional choice buttons in orchestration responses and introduces comprehensive unit tests for the input sanitizer logic, especially regarding the safety of the
#serviceprefix. The most important changes are grouped below.Support for choice buttons in orchestration responses
buttonsfield to bothOrchestrationResponseandTestOrchestrationResponsemodels to allow passing multiple-choice button options in step responses. (src/models/request_models.py) [1] [2]buttonsfield is correctly propagated. (src/llm_orchestration_service_api.py) [1] [2] [3]Input sanitizer unit tests
tests/test_input_sanitizer.py) that verifies the sanitizer preserves the#serviceprefix and routing characters, strips only HTML constructs, and normalizes whitespace as expected.