Repository navigation
FIX: declare TARGET_REQUIREMENTS for AudioAchillesHeel scenario - #4714
Yusuf Kabiden (yqecea) wants to merge 1 commit into
Conversation
AudioAchillesHeel inherited the empty Scenario.TARGET_REQUIREMENTS, so a text-only objective target passed get_readiness() and every request failed at the target instead of the scenario refusing early. Declare the multi-message-pieces capability and the grouped text+audio_path input modalities, mirroring FigStep. Fixes microsoft#4705.
|
Yusuf Kabiden (@yqecea) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the AudioAchillesHeel target-requirement changes.
No open issues 🎉
What changed in this PR
Addresses #4705 by declaring AudioAchillesHeel’s target requirements so incompatible targets are rejected before audio requests are sent.
Changes:
- Require native multi-piece messages with grouped text and audio inputs.
- Update the mock target to advertise compatible capabilities.
- Add regression tests for the declared requirements and rejection of incompatible targets.
| File | Description |
|---|---|
tests/unit/scenario/garak/test_audio_achilles_heel.py |
Updates mock capabilities and tests rejection of targets lacking audio or multi-piece support. |
pyrit/scenario/scenarios/garak/audio_achilles_heel.py |
Declares the scenario’s grouped text/audio and native multi-piece target requirements. |
Review effort: Balanced
Description
Fixes #4705
AudioAchillesHeelinherited the emptyScenario.TARGET_REQUIREMENTS, so nothing checked the objective target's input modalities before the run: a text-only objective target passedget_readiness()andinitialize_async(), and every request then failed at the target instead of the scenario refusing early.TARGET_REQUIREMENTSonAudioAchillesHeelmirroringFigStep: nativeMULTI_MESSAGE_PIECESplus the grouped{text, audio_path}input modalities the scenario actually sends.mock_objective_targetfixture in the existing tests to declare matching capabilities (the mock previously declared none, which is exactly the target shape the scenario must now reject).validate()raises for both a target missingmulti_message_piecesand a text-only target.Red/green: on
main,AudioAchillesHeel.TARGET_REQUIREMENTSis empty (native_required=frozenset(),required_input_modalities=frozenset()), so a text-only target passes validation. With this change the scenario rejects it before any request is sent.pytest tests/unit/scenario/garak/passes 492/492 locally; ruff check and format are clean.