Skip to content

TEST: Fuzzer MCTS search score, stop conditions and score normalization lack unit tests #4319

Open

Description

FuzzerGenerator and _MCTSExplorer have no direct unit tests for some of the logic that steers the jailbreak search:

  • _calculate_uct_score: the step-0 guard against log(0), and the ordering it gives between less and more visited or rewarded nodes.
  • _should_stop_generation: the query-limit boundary (stop only when the next batch would exceed max_query_limit) and the jailbreak goal.
  • _normalize_score_to_float: booleans, clamping to [0, 1], and unexpected types.

A regression in any of these would silently change which templates the fuzzer explores or when it stops. I'd like to add focused tests for them in a new test file, separate from the jailbreak-counting change in #4231.

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions