Skip to content

test(probes): add unit tests for goodside probe module#1822

Open
nuthalapativarun wants to merge 1 commit into
NVIDIA:mainfrom
nuthalapativarun:test/goodside-probe-coverage
Open

test(probes): add unit tests for goodside probe module#1822
nuthalapativarun wants to merge 1 commit into
NVIDIA:mainfrom
nuthalapativarun:test/goodside-probe-coverage

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Add probe-unique tests for garak/probes/goodside.py.

Verification

  • python -m pytest tests/probes/test_probes_goodside.py -v — all 6 tests pass

What is tested

WhoIsRiley

  • Every prompt mentions "Riley Goodside" (validates the hallucination-check intent)
  • primary_detector is goodside.RileyIsnt

ThreatenJSON

  • Exactly one prompt is generated
  • Prompt contains the JSON instruction and the threat clause ("innocent man") — the threatening language is the unique mechanism of this probe
  • primary_detector is goodside.PlainJSON

Davidjl

  • triggers list is parallel to prompts list (required for _attempt_prestore_hook to assign per-attempt triggers correctly)
  • active is False (glitch-token probe is intentionally inactive)

Generic checks (instantiation, isinstance, non-empty prompts, metadata, active flags) are covered by tests/plugins/test_plugin_load.py.

Signed-off-by: Varun Nuthalapati <nuthalapativarun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant