Skip to content

RoundRobinTarget accepts different JSON-schema normalizer templates and silently replaces the second target's instructions #3752

Closed

Description

@romanlutz

Describe the bug

RoundRobinTarget considers inner targets compatible by normalizer class name, although their JSON-schema templates differ. It adopts the first target's pipeline and silently sends its instructions to the second target.

Steps/Code to Reproduce

Create two same-class targets with otherwise identical capabilities/policies and JsonSchemaNormalizer templates WRAPPER_A and WRAPPER_B. Send directly to each, then construct RoundRobinTarget and inspect the second rotation's payload/result.

Expected Results

Reject targets with different effective normalization behavior when the composite adopts only one pipeline, or preserve each target's own instructions.

Actual Results

TargetConfiguration.as_identifier_params emits identical dictionaries because the pipeline records class names only. RoundRobinTarget accepts both and sends WRAPPER_A to target B on its second rotation; deterministic response changes from false to true.

Verified source references: configuration projection, RoundRobinTarget.

Proposed fix/regression: compare stable ordered effective normalizer configuration including schema templates and nested settings; reject opaque noncomparable configurations. Test different-template rejection and same-template acceptance.

Screenshots

Not applicable; payload/result evidence is inline.

Versions

Tested commit d3446e0, PyRIT 1.2.0.dev0, offline deterministic local target scope. Evidence: files/evidence/round11/normalizer-snapshot.json; local path is not an attachment.

Activity

  1. Kaap10 commented on Nov 1, 2026

    @Kaap10
    Contributor

    I reproduced this locally. Because TargetConfiguration.as_identifier_params() only checks the normalizer class name, targets with different schema templates look identical. RoundRobinTarget accepts them and ends up sending the first target's schema instructions to the second target.

    I would like to work on this by including normalizer parameters in the pipeline identity, making RoundRobinTarget reject mismatched templates, and adding regression tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions