Skip to content

[BREAKING] MAINT: Remove expired single-turn system prompt#2245

Merged
romanlutz merged 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-remove-expired-deprecation
Jul 22, 2026
Merged

[BREAKING] MAINT: Remove expired single-turn system prompt#2245
romanlutz merged 1 commit into
microsoft:mainfrom
romanlutz:romanlutz-remove-expired-deprecation

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

Remove the expired SingleTurnAttackContext.system_prompt compatibility field before the v1.0.0 release. The field was non-functional and scheduled for removal in v0.17.0; callers must use prepended_conversation instead.

This also removes the stale kwargs example and verifies that system_prompt is now rejected as unsupported.

Tests and Documentation

  • uv run pytest tests\unit\executor\attack\single_turn\test_prompt_sending.py -q (59 passed)
  • Ruff check and format check on changed files
  • ty check on changed files
  • pre-commit run --files ... on changed files
  • No documentation update is needed because the removed field was already documented as non-functional and its replacement remains unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0161e1d6-8741-4f4a-87bc-6d8e0bf40176
Copilot AI review requested due to automatic review settings July 21, 2026 23:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes the expired, non-functional SingleTurnAttackContext.system_prompt compatibility field ahead of the v1.0.0 release, enforcing prepended_conversation as the supported mechanism for system prompts in single-turn attacks.

Changes:

  • Removed system_prompt from SingleTurnAttackContext, including its deprecation warning behavior.
  • Updated AttackStrategy.execute_async docstring to no longer reference system_prompt as a context kwarg example.
  • Updated unit tests to stop expecting a deprecation warning and to assert system_prompt is rejected as an unsupported parameter.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/unit/executor/attack/single_turn/test_prompt_sending.py Removes deprecated-parameter expectations and adds coverage that system_prompt is now rejected.
pyrit/executor/attack/single_turn/single_turn_attack_strategy.py Drops the deprecated system_prompt field and its deprecation-warning __post_init__.
pyrit/executor/attack/core/attack_strategy.py Updates execute_async docstring to reflect the supported context kwargs examples post-removal.

@jsong468 jsong468 self-assigned this Jul 21, 2026

@jsong468 jsong468 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TY!

@romanlutz
romanlutz added this pull request to the merge queue Jul 22, 2026
Merged via the queue into microsoft:main with commit 264611c Jul 22, 2026
53 checks passed
@romanlutz
romanlutz deleted the romanlutz-remove-expired-deprecation branch July 22, 2026 00:57
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.

4 participants