Skip to content

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
rootcodelabs:llm-354
Open

Verified Input Sanitizer Safety for #service Payloads and added buttons Field to OrchestrationResponse and TestOrchestrationResponse#367
nuwangeek wants to merge 52 commits intobuerokratt:wipfrom
rootcodelabs:llm-354

Conversation

@nuwangeek
Copy link
Collaborator

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 #service prefix. The most important changes are grouped below.

Support for choice buttons in orchestration responses

  • Added a new optional buttons field to both OrchestrationResponse and TestOrchestrationResponse models to allow passing multiple-choice button options in step responses. (src/models/request_models.py) [1] [2]
  • Updated orchestration and test orchestration request handlers to log the presence of buttons in the response and ensure the buttons field is correctly propagated. (src/llm_orchestration_service_api.py) [1] [2] [3]

Input sanitizer unit tests

  • Added a new test suite (tests/test_input_sanitizer.py) that verifies the sanitizer preserves the #service prefix and routing characters, strips only HTML constructs, and normalizes whitespace as expected.

nuwangeek and others added 30 commits February 20, 2026 16:06
Get update from wip into llm-316
get update from wip into llm-304
Service layer validation in tool classifier (buerokratt#321)
Pulling changes from BYK wip to LLM-Module WIP
Get update from wip into optimization/data-enrichment
Get update from optimization/data-enrichment into optimization/vector-indexer
@nuwangeek nuwangeek requested a review from Copilot March 19, 2026 06:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 buttons field to OrchestrationResponse and TestOrchestrationResponse.
  • Logged buttons in /orchestrate and /orchestrate/test handlers and mapped buttons when converting OrchestrationResponse -> TestOrchestrationResponse.
  • Added tests/test_input_sanitizer.py covering #service prefix 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.

@nuwangeek nuwangeek marked this pull request as draft March 19, 2026 10:21
nuwangeek and others added 3 commits March 20, 2026 05:48
…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)
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.

3 participants