Is your feature request related to a problem? Please describe.
AttackTechniqueFactory.create() handles both complete converter-configuration overrides and additive request-converter composition alongside unrelated scoring and adversarial setup. The distinction matters: selecting extra request converters must not discard a technique's built-in behavior or its response converters.
This is F3 of three small factory extractions. It is ready for implementation and can land without the other factory extractions.
Describe the solution you'd like
Extract the existing converter-composition rules into a small private, typed helper at the technique layer. Have the factory use it while preserving its public parameters and current behavior.
- Keep full configuration replacement distinct from additive request-converter composition.
- Preserve the existing ordering between the selected base request pipeline and extra request converters.
- Preserve the response-converter pipeline from the effective base configuration.
- Retain the explicit
supports_additional_request_converters capability and existing constructor checks. A constructor accepting a converter parameter alone does not imply semantic support for additive composition.
- Do not mutate the registered factory's stored configuration or caller-supplied converter lists during composition.
Acceptance criteria:
Describe alternatives you've considered, if relevant
Do not move converter execution into the factory, implement a second converter pipeline in the backend/UI, or create a generic configuration framework. Keep one clear internal composition helper and reuse the existing configuration types.
Additional context
Starting points: pyrit/scenario/core/attack_technique_factory.py, AttackConverterConfig, ConverterConfiguration, and tests/unit/scenario/core/test_attack_technique_factory.py. Follow doc/code/framework.md and the scenario, Python, and test instructions.
Related consumer: #2758 will expose registered techniques and ordered extra converters in the GUI. This extraction preserves the contracts it consumes and does not implement that GUI issue; #2758 is not a prerequisite for this refactor. Coordinate with #2494 where the same factory file is edited, but leave adversarial prompt assembly out of this change.
Is your feature request related to a problem? Please describe.
AttackTechniqueFactory.create()handles both complete converter-configuration overrides and additive request-converter composition alongside unrelated scoring and adversarial setup. The distinction matters: selecting extra request converters must not discard a technique's built-in behavior or its response converters.This is F3 of three small factory extractions. It is ready for implementation and can land without the other factory extractions.
Describe the solution you'd like
Extract the existing converter-composition rules into a small private, typed helper at the technique layer. Have the factory use it while preserving its public parameters and current behavior.
supports_additional_request_converterscapability and existing constructor checks. A constructor accepting a converter parameter alone does not imply semantic support for additive composition.Acceptance criteria:
Describe alternatives you've considered, if relevant
Do not move converter execution into the factory, implement a second converter pipeline in the backend/UI, or create a generic configuration framework. Keep one clear internal composition helper and reuse the existing configuration types.
Additional context
Starting points:
pyrit/scenario/core/attack_technique_factory.py,AttackConverterConfig,ConverterConfiguration, andtests/unit/scenario/core/test_attack_technique_factory.py. Followdoc/code/framework.mdand the scenario, Python, and test instructions.Related consumer: #2758 will expose registered techniques and ordered extra converters in the GUI. This extraction preserves the contracts it consumes and does not implement that GUI issue; #2758 is not a prerequisite for this refactor. Coordinate with #2494 where the same factory file is edited, but leave adversarial prompt assembly out of this change.