Skip to content

fix: make repeat token dispatch exhaustive - #3654

Open
Slai.life (huong8373tt-beep) wants to merge 3 commits into
microsoft:mainfrom
huong8373tt-beep:fix/p311-03-repeat-token-dispatch
Open

Slai.life (huong8373tt-beep) wants to merge 3 commits into
microsoft:mainfrom
huong8373tt-beep:fix/p311-03-repeat-token-dispatch

Conversation

@huong8373tt-beep

@huong8373tt-beep Slai.life (huong8373tt-beep) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • name the supported repeat-token insertion modes as a closed Literal alias
  • add an assert_never guard to the validated mode dispatch
  • preserve existing defaults, validation, output, and identifier behavior

Part of #3166 (P311-03).

Validation

  • pytest -q tests/unit/converter/test_repeat_token_converter.py — 30 passed
  • ruff check pyrit/converter/repeat_token_converter.py tests/unit/converter/test_repeat_token_converter.py
  • ruff format --check pyrit/converter/repeat_token_converter.py tests/unit/converter/test_repeat_token_converter.py
  • ty check pyrit/converter/repeat_token_converter.py
  • git diff --check

Disclosure and authorization

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

@romanlutz Roman Lutz (romanlutz) changed the title fix(converter): make repeat token dispatch exhaustive fix: make repeat token dispatch exhaustive Oct 30, 2026

This branch has not been deployed

No deployments
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