Repository navigation
FIX: Include the custom template value in the PolicyPuppetryConverter identifier - #4084
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The PolicyPuppetry identifier fix leaves its setting in KNOWN_GAPS, causing the strict-xfail contract test to fail with XPASS(strict) until the stale entry is removed.
1 open issue
What changed in this PR
Addresses #3759 by making PolicyPuppetryConverter identifiers distinguish custom template content, preventing different unnamed templates from sharing an identifier and default registry name.
Changes:
- Adds a truncated SHA-256 template-content hash to identifier parameters.
- Adds a regression test asserting that different custom templates produce different hashes.
| File | Description |
|---|---|
tests/unit/converter/test_policy_puppetry_converter.py |
Tests identifier differences between two custom templates. |
pyrit/converter/policy_puppetry_converter.py |
Includes template content in identifier generation. |
Review effort: Balanced
|
Closing for now, mirroring the handling of #3760/#4085: issue #3759 is assigned to Ayoub (@Ayoubhm07), who gets until 11/11 to say whether they want to implement it. If they pass, this PR will be reopened and reviewed. In general, please claim an issue and wait for ownership confirmation before starting work, so maintainers can coordinate and avoid duplicated effort. |
…emplate-identifier
The identifier now includes a template content hash, so the contract test's strict xfail for this setting would XPASS. The samples module already provides two distinct custom templates for the check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Resolve the KNOWN_GAPS conflict: main removed the PolicyPuppetryConverter entry (microsoft#4084) and this branch removed the TextJailbreakConverter entry, so only the CodeChameleonConverter entries remain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Description
PolicyPuppetryConverter._build_identifierrecorded only the template name. A customSeedPromptusually has no name, so converters wrapping different templates shared one hash and one default registry name.Fixes #3759