Skip to content

MAINT: make PromptShield parser dispatch exhaustive - #3797

Merged
Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
huong8373tt-beep:fix/p311-03-promptshield-input-parser
Nov 2, 2026
Merged

Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
huong8373tt-beep:fix/p311-03-promptshield-input-parser

Conversation

@huong8373tt-beep

@huong8373tt-beep Slai.life (huong8373tt-beep) commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • make the closed PromptShield entry-field dispatch explicit for None and preserve the historical fallback for unexpected runtime values
  • add a focused regression test for the fallback path

Part of #3166 (P311-03).

Validation:

  • focused PromptShield unit tests: 23 passed
  • Ruff check: passed
  • Ruff format: passed
  • ty check: passed
  • git diff --check: passed

Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.

Signed-off-by: Slai.life <huong8373tt@gmail.com>
@huong8373tt-beep

Copy link
Copy Markdown
Contributor Author

Thanks for the focused review. I agree the parser should have one implementation. I’m going to move the shared document parsing below the match so both the None case and the type-checking fallback reach the same block, then rerun the targeted tests and CI.

Signed-off-by: Slai.life <huong8373tt@gmail.com>
@huong8373tt-beep
Slai.life (huong8373tt-beep) force-pushed the fix/p311-03-promptshield-input-parser branch from ad807e6 to f3d5cbe Compare November 2, 2026 05:12
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 2, 2026
Merged via the queue into microsoft:main with commit f418546 Nov 2, 2026
66 checks passed
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.

2 participants