Skip to content

[BREAKING] MAINT Remove v1 deprecated compatibility paths#2195

Open
romanlutz wants to merge 6 commits into
microsoft:mainfrom
romanlutz:romanlutz-repository-cleanup-audit
Open

[BREAKING] MAINT Remove v1 deprecated compatibility paths#2195
romanlutz wants to merge 6 commits into
microsoft:mainfrom
romanlutz:romanlutz-repository-cleanup-audit

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

PyRIT 1.0 should not retain compatibility APIs and persistence columns whose removal is already due. This breaking maintenance change removes those surfaces while keeping configuration, memory migrations, integrations, and published documentation aligned with the v1 contract.

  • Removes Psychosocial(objectives=...), OpenAIChatTarget(max_tokens=...), and legacy CLI/default-config scenario: support. Legacy scenario blocks now fail explicitly instead of being silently ignored.
  • Removes ScoreEntries.task and ScenarioResultEntries.attack_results_json through reversible migration 24b44ef076b6. Downgrades restore task from objective and reconstruct scenario manifests from attack attribution data.
  • Moves ANSI and Garak catalogs onto their owning classes, modernizes requested type annotations, and removes stale compatibility wording.
  • Updates tests, examples, memory documentation, and rendered notebook outputs. Active contracts such as system_prompt_path and MessagePiece.labels remain supported after verification; Hugging Face endpoints continue to send their endpoint-specific max_tokens wire field via extra_body_parameters.

Tests and Documentation

  • 10,612 unit tests passed; 6 skipped.
  • 101 focused OpenAI/Hugging Face target tests passed; 6 skipped.
  • All pre-commit hooks passed, including Ruff, ty, documentation validation, async naming, notebook checks, and memory migration checks.
  • Migration upgrade/downgrade coverage passed, including data preservation and manifest reconstruction.
  • Changed Jupytext notebook pairs were regenerated and compared for logical source parity; rendered outputs were updated for the v1 schema and Psychosocial scenario version.

Remove obsolete public compatibility APIs, migrate superseded memory columns, and align docs, tests, typing, and owned constants with the v1 contract.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d3667fe5-fb0c-4010-8308-29c6efb42ea8
Comment thread pyrit/memory/memory_models.py Outdated
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