Skip to content

FIX: Propagate dataset_name to jailbreak template seeds#2208

Merged
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-validate-jailbreak-dataset-name
Jul 17, 2026
Merged

FIX: Propagate dataset_name to jailbreak template seeds#2208
romanlutz merged 3 commits into
microsoft:mainfrom
romanlutz:romanlutz-validate-jailbreak-dataset-name

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

Jailbreak template seeds loaded by _JailbreakTemplatesDataset._load_seeds were previously created without a dataset_name, unlike seeds from other dataset providers. That left loaded jailbreak templates unattributed, so they could not be traced back to their source dataset once stored or queried in memory.

This sets seed.dataset_name = self.dataset_name on each template seed as it is loaded, so jailbreak template seeds carry the same dataset_name (jailbreak_templates) as the dataset they come from. The change is a one-line addition inside the existing load loop and does not alter loading, skip-on-invalid, or ordering behavior.

Tests and Documentation

  • Extended test_fetch_dataset_async_loads_templates_from_path to assert every loaded seed's dataset_name matches the dataset's dataset_name. The full tests/unit/datasets/test_jailbreak_dataset.py suite passes (8 passed).
  • Ran JupyText on doc/code/datasets/1_loading_datasets.py (jupytext --execute --set-kernel python3 --to notebook); it executes cleanly with no error outputs, and the regenerated 1_loading_datasets.ipynb is included in this PR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 52d2518d-ebe5-4888-8189-6146b6503448
@adrian-gavrila adrian-gavrila self-assigned this Jul 16, 2026
Copilot AI and others added 2 commits July 16, 2026 19:51
@romanlutz
romanlutz enabled auto-merge July 17, 2026 03:37
@romanlutz
romanlutz added this pull request to the merge queue Jul 17, 2026
Merged via the queue into microsoft:main with commit 7c7a373 Jul 17, 2026
53 checks passed
@romanlutz
romanlutz deleted the romanlutz-validate-jailbreak-dataset-name branch July 17, 2026 04:15
romanlutz pushed a commit to romanlutz/PyRIT that referenced this pull request Jul 20, 2026
Merge latest origin/main (27d20ee). Resolutions:
- 26 A-G split-owned code/test files reset to origin/main (now covered by
  PRs microsoft#2208-2214), so this branch carries no production-code duplication.
- matrix_atomic_attack_builder(.py/test) taken from main (orphaned core
  refactor does not belong on a notebook-validation branch).
- Executed notebook .ipynb outputs kept from this branch (regenerated next).

Result vs main: notebooks + notebook-source hardening + docs + frontend e2e only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 52d2518d-ebe5-4888-8189-6146b6503448
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